From c765c5ae2d3406b5b9aa91ce8d732109bc536d5f Mon Sep 17 00:00:00 2001 From: Zahary Karadjov Date: Thu, 13 Aug 2020 14:32:10 +0300 Subject: [PATCH] Bugfix: Correct wallet by UIID search in 'deposits create' --- beacon_chain/keystore_management.nim | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/beacon_chain/keystore_management.nim b/beacon_chain/keystore_management.nim index b43911767..f5735e2e9 100644 --- a/beacon_chain/keystore_management.nim +++ b/beacon_chain/keystore_management.nim @@ -441,16 +441,16 @@ proc findWallet*(config: BeaconNodeConf, name: WalletName): Result[Wallet, strin try: for kind, walletFile in walkDir(config.walletsDir): if kind != pcFile: continue - let fullPath = config.walletsDir / walletFile - if walletFile == name.string: - return loadWallet(fullPath) - walletFiles.add fullPath + let walletId = splitFile(walletFile).name + if cmpIgnoreCase(walletId, name.string) == 0: + return loadWallet(walletFile) + walletFiles.add walletFile except OSError: return err "failure to list wallet directory" for walletFile in walletFiles: let wallet = loadWallet(walletFile) - if wallet.isOk and wallet.get.name == name: + if wallet.isOk and cmpIgnoreCase(wallet.get.name.string, name.string) == 0: return wallet return err "failure to locate wallet file"