Skip to content

Commit

Permalink
ignore 0x prefix when find wallet by address
Browse files Browse the repository at this point in the history
  • Loading branch information
XuNeal committed Mar 13, 2019
1 parent ebbd87f commit 3052b20
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/Wallet/Identity.swift
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ extension Identity {

func findWalletByAddress(_ address: String, on chainType: ChainType) -> BasicWallet? {
return keystore.wallets.first { (wallet) -> Bool in
return wallet.address == address && wallet.imTokenMeta.chain == chainType
return wallet.address.removePrefix0xIfNeeded() == address.removePrefix0xIfNeeded() && wallet.imTokenMeta.chain == chainType
}
}

Expand Down

0 comments on commit 3052b20

Please sign in to comment.