`get_private_keys` responds unexpectedly after Trezor/WC activation
Describe the bug
- Launch KDF, and activate Trezor device.
- Activate a coin using
"priv_key_policy": {"type":"Trezor"} - Query
get_private_keysfor the Trezor activated coin - See address and keypairs not matching activation output for same derivation path indexes.
What would you expect? Two options:
- If KDF session has an active trezor connection, disable all privkey export capability (global restriction)
- If a coin activated with
"priv_key_policy": {"type":"Trezor"}queriesget_private_keys, return an error - but retain export capability for any other coin.
Additional info
When querying an activated coin via the legacy show_priv_key method, an error is returned (as expected)
{
"error": "rpc:195] RPC call failed: lp_coins:5507] eth:2656] 'display_priv_key' is not supported for Hardware Wallets"
}
I've confirmed the above also applies to WalletConnect, which should apply similar limitations to priv key export..
{
"error": "rpc:195] RPC call failed: lp_coins:5507] eth:2659] 'display_priv_key' is not supported for WalletConnect"
}
This is expected as trezor or walletconnect don't expose private keys, if we want pubkeys and address exports instead, then we should rename the method or create a new one.
I see the problem, we want to bypass the coins that are using HW wallets or wallet connect instead of returning an error. I guess this is a bug.
Put a medium priority to this as trezor is used in GUIs for all coins when logging in with it and wallet connect is not yet in GUIs.