Bugfix: Correct wallet by UIID search in 'deposits create'
This commit is contained in:
parent
098b73d75b
commit
c765c5ae2d
|
@ -441,16 +441,16 @@ proc findWallet*(config: BeaconNodeConf, name: WalletName): Result[Wallet, strin
|
||||||
try:
|
try:
|
||||||
for kind, walletFile in walkDir(config.walletsDir):
|
for kind, walletFile in walkDir(config.walletsDir):
|
||||||
if kind != pcFile: continue
|
if kind != pcFile: continue
|
||||||
let fullPath = config.walletsDir / walletFile
|
let walletId = splitFile(walletFile).name
|
||||||
if walletFile == name.string:
|
if cmpIgnoreCase(walletId, name.string) == 0:
|
||||||
return loadWallet(fullPath)
|
return loadWallet(walletFile)
|
||||||
walletFiles.add fullPath
|
walletFiles.add walletFile
|
||||||
except OSError:
|
except OSError:
|
||||||
return err "failure to list wallet directory"
|
return err "failure to list wallet directory"
|
||||||
|
|
||||||
for walletFile in walletFiles:
|
for walletFile in walletFiles:
|
||||||
let wallet = loadWallet(walletFile)
|
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 wallet
|
||||||
|
|
||||||
return err "failure to locate wallet file"
|
return err "failure to locate wallet file"
|
||||||
|
|
Loading…
Reference in New Issue