diff --git a/src/rpc/crosschain.cpp b/src/rpc/crosschain.cpp index 7d299fc1a..8853b3fb2 100644 --- a/src/rpc/crosschain.cpp +++ b/src/rpc/crosschain.cpp @@ -145,9 +145,9 @@ UniValue calc_MoM(const UniValue& params, bool fHelp) UniValue migrate_converttoexport(const UniValue& params, bool fHelp) { - if (fHelp || params.size() != 3) + if (fHelp || params.size() != 3 || params.size() != 2) throw runtime_error( - "migrate_converttoexport rawTx dest_symbol export_amount\n" + "migrate_converttoexport rawTx dest_symbol\n" "\nConvert a raw transaction to a cross-chain export.\n" "If neccesary, the transaction should be funded using fundrawtransaction.\n" "Finally, the transaction should be signed using signrawtransaction\n" @@ -174,17 +174,13 @@ UniValue migrate_converttoexport(const UniValue& params, bool fHelp) if (strcmp(ASSETCHAINS_SYMBOL,targetSymbol.c_str()) == 0) throw runtime_error("cant send a coin to the same chain"); - CAmount burnAmount = AmountFromValue(params[2]); + CAmount burnAmount = 0; + + for (int i=0; i 1000000LL*COIN) - throw JSONRPCError(RPC_TYPE_ERROR, "Invalid amount for export, cannot export more than 1 million coins per export."); - { - CAmount needed = 0; - for (int i=0; i