From 46668f56dbf85deeee68794815cd23db6dc62728 Mon Sep 17 00:00:00 2001 From: jl777 Date: Sat, 21 Jul 2018 04:48:21 -1100 Subject: [PATCH] Test --- src/wallet/rpcwallet.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index 6ed2bc180..9991f7405 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -4862,11 +4862,12 @@ UniValue tokentransfer(const UniValue& params, bool fHelp) UniValue tokenbid(const UniValue& params, bool fHelp) { - uint64_t bidamount; double price; uint256 tokenid; + uint64_t bidamount,numtokens; std::string hex; double price; uint256 tokenid; if ( fHelp || params.size() != 3 ) throw runtime_error("tokenbid numtokens tokenid price\n"); numtokens = atoi(params[0].get_str().c_str()); - tokenid = ParseHex(params[1].get_str()); + std::vector tokid(ParseHex(params[1].get_str())); + memcpy(&tokenid,tokid.data(),sizeof(tokenid)); price = atof(params[2].get_str().c_str()); bidamount = (price * numtokens) * COIN; hex = CreateBuyOffer(0,bidamount,tokenid,numtokens);