mirror of
https://github.com/sparrowwallet/sparrow.git
synced 2024-12-25 05:06:45 +00:00
cormorant: improve error message when core wallet support is disabled
This commit is contained in:
parent
c7ab8e4601
commit
432e0642ca
1 changed files with 3 additions and 0 deletions
|
@ -125,6 +125,9 @@ public class BitcoindClient {
|
||||||
}
|
}
|
||||||
|
|
||||||
ListWalletDirResult listWalletDirResult = getBitcoindService().listWalletDir();
|
ListWalletDirResult listWalletDirResult = getBitcoindService().listWalletDir();
|
||||||
|
if(listWalletDirResult == null) {
|
||||||
|
throw new RuntimeException("Wallet support must be enabled in Bitcoin Core");
|
||||||
|
}
|
||||||
boolean exists = listWalletDirResult.wallets().stream().anyMatch(walletDirResult -> walletDirResult.name().equals(CORE_WALLET_NAME));
|
boolean exists = listWalletDirResult.wallets().stream().anyMatch(walletDirResult -> walletDirResult.name().equals(CORE_WALLET_NAME));
|
||||||
legacyWalletExists = listWalletDirResult.wallets().stream().anyMatch(walletDirResult -> walletDirResult.name().equals(Bwt.DEFAULT_CORE_WALLET));
|
legacyWalletExists = listWalletDirResult.wallets().stream().anyMatch(walletDirResult -> walletDirResult.name().equals(Bwt.DEFAULT_CORE_WALLET));
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue