Merge #707: [0.18 backport] sendtomainchain_pak: Fix minimum send amount message

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

Pull request description:

  backport of #706

Tree-SHA512: a1f16636210eb28c221a442c113a609da906079b3688dc1dc53e33d0409096638a48036032ba7349257a4d599342272df40dd9335bbc9ac1008c439602a94f8a
This commit is contained in:
Gregory Sanders 2019-09-17 13:07:01 -04:00
commit 8161038c7b
No known key found for this signature in database
GPG key ID: F3F68E2D86A48FDB
2 changed files with 2 additions and 2 deletions

View file

@ -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) {

View file

@ -145,7 +145,7 @@ class PAKTest (BitcoinTestFramework):
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"