Closed yrliou closed 3 years ago
Right now we always get the account list of default keyring in https://github.com/brave/brave-core/blob/master/browser/brave_wallet/brave_wallet_provider_delegate_impl.cc#L168, we should handle hardware keyring case here too, otherwise dapps APIs calling GetAllowedAccounts and CheckAccountAllowed will be checking the from address against the wrong list, hence it will always get auth error.
GetAllowedAccounts
CheckAccountAllowed
Turns out that even it's called GetDefaultKeyringInfo which calls GetAccountInfosForKeyring(kDefaultKeyringId), currently we append hardware accounts there too, so this issue does not exist. Closing as invalid.
GetDefaultKeyringInfo
GetAccountInfosForKeyring(kDefaultKeyringId)
Right now we always get the account list of default keyring in https://github.com/brave/brave-core/blob/master/browser/brave_wallet/brave_wallet_provider_delegate_impl.cc#L168, we should handle hardware keyring case here too, otherwise dapps APIs calling
GetAllowedAccounts
andCheckAccountAllowed
will be checking the from address against the wrong list, hence it will always get auth error.