Skip to content

Commit

Permalink
Merge ElementsProject#707: [0.18 backport] sendtomainchain_pak: Fix m…
Browse files Browse the repository at this point in the history
…inimum send amount message

9add5a8 Fix feature_pak.py in light of ElementsProject#706 (Gregory Sanders)
817ebcd sendtomainchain_pak: Fix minimum send amount message (Gregory Sanders)

Pull request description:

  backport of ElementsProject#706

Tree-SHA512: a1f16636210eb28c221a442c113a609da906079b3688dc1dc53e33d0409096638a48036032ba7349257a4d599342272df40dd9335bbc9ac1008c439602a94f8a
  • Loading branch information
instagibbs committed Sep 17, 2019
2 parents eed409a + 9add5a8 commit 8161038
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/wallet/rpcwallet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5207,7 +5207,7 @@ UniValue sendtomainchain_pak(const JSONRPCRequest& request)
//amount
CAmount nAmount = AmountFromValue(request.params[1]);
if (nAmount < 100000)
throw JSONRPCError(RPC_INVALID_PARAMETER, "Invalid amount for send, must send more than 0.0001 BTC");
throw JSONRPCError(RPC_INVALID_PARAMETER, "Invalid amount for send, must send more than 0.00100000 BTC");

bool subtract_fee = false;
if (request.params.size() > 2) {
Expand Down
2 changes: 1 addition & 1 deletion test/functional/feature_pak.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ def run_test(self):
self.log.info("Test various RPC arguments")

# Fail to peg-out too-small value
assert_raises_rpc_error(-8, "Invalid amount for send, must send more than 0.0001 BTC", self.nodes[1].sendtomainchain, "", Decimal('0.0009'))
assert_raises_rpc_error(-8, "Invalid amount for send, must send more than 0.00100000 BTC", self.nodes[1].sendtomainchain, "", Decimal('0.0009'))

# Use wrong network's extended pubkey
mainnetxpub = "xpub6AATBi58516uxLogbuaG3jkom7x1qyDoZzMN2AePBuQnMFKUV9xC2BW9vXsFJ9rELsvbeGQcFWhtbyM4qDeijM22u3AaSiSYEvuMZkJqtLn"
Expand Down

0 comments on commit 8161038

Please sign in to comment.