mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-16 13:01:19 +02:00
Merge pull request #119 from instagibbs/ensurewallet
Make sure we check wallet is available and unlocked for pegging
This commit is contained in:
commit
b16e7fbb48
1 changed files with 2 additions and 0 deletions
|
|
@ -2845,6 +2845,8 @@ UniValue sendtomainchain(const UniValue& params, bool fHelp)
|
|||
|
||||
LOCK2(cs_main, pwalletMain->cs_wallet);
|
||||
|
||||
EnsureWalletIsUnlocked();
|
||||
|
||||
CParentBitcoinAddress address(params[0].get_str());
|
||||
if (!address.IsValid())
|
||||
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid Bitcoin address");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue