Skip to content

Commit

Permalink
Fix: brave/brave-ios#8104: Incorrect account for auto-filled send tok…
Browse files Browse the repository at this point in the history
…en in Send (brave/brave-ios#8121)
  • Loading branch information
nuo-xu committed Sep 22, 2023
1 parent 3adcf0e commit d9b4463
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/BraveWallet/Crypto/Stores/KeyringStore.swift
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ public class KeyringStore: ObservableObject {
self.isDefaultKeyringCreated = defaultKeyring.isKeyringCreated
}
self.allKeyrings = allKeyrings
if let selectedAccountKeyring = allKeyrings.first(where: { $0.coin == selectedAccount?.coin }) {
if let selectedAccountKeyring = allKeyrings.first(where: { $0.id == selectedAccount?.keyringId }) {
if self.selectedAccount.address != selectedAccountAddress {
if let selectedAccount = selectedAccountKeyring.accountInfos.first(where: { $0.address == selectedAccountAddress }) {
self.selectedAccount = selectedAccount
Expand Down

0 comments on commit d9b4463

Please sign in to comment.