Skip to content

Commit

Permalink
createrawtransaction: fix output asset type logic
Browse files Browse the repository at this point in the history
  • Loading branch information
instagibbs committed Jul 20, 2017
1 parent 446bcab commit 7c7a765
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/rpc/rawtransaction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -555,11 +555,10 @@ UniValue createrawtransaction(const JSONRPCRequest& request)
// Defaults to policyAsset
CAsset asset(policyAsset);
if (!assets.isNull()) {
if (find_value(assets, name_).isNull())
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, string("Given output_asset address is not a valid given output address: ")+name_);
asset = CAsset(ParseHashO(assets, name_));
if (!find_value(assets, name_).isNull()) {
asset = CAsset(ParseHashO(assets, name_));
}
}

if (name_ == "data") {
std::vector<unsigned char> data = ParseHexV(sendTo[name_].getValStr(),"Data");

Expand Down

0 comments on commit 7c7a765

Please sign in to comment.