mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-27 14:35:52 +00:00
rpchandler
This commit is contained in:
@@ -766,7 +766,7 @@ Json::Value RPCHandler::handleJSONSubmit(const Json::Value& jvRequest)
|
|||||||
else txJSON["Fee"]=(int)theConfig.FEE_ACCOUNT_CREATE;
|
else txJSON["Fee"]=(int)theConfig.FEE_ACCOUNT_CREATE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!txJSON.isMember("Paths") && (!jvRequest.isMember("build_path") || jvRequest["build_path"].asBool()))
|
if(!txJSON.isMember("Paths") && jvRequest.isMember("build_path") )
|
||||||
{
|
{
|
||||||
if(txJSON["Amount"].isObject() || txJSON.isMember("SendMax") )
|
if(txJSON["Amount"].isObject() || txJSON.isMember("SendMax") )
|
||||||
{ // we need a ripple path
|
{ // we need a ripple path
|
||||||
@@ -798,11 +798,14 @@ Json::Value RPCHandler::handleJSONSubmit(const Json::Value& jvRequest)
|
|||||||
|
|
||||||
Pathfinder pf(srcAddress, dstAccountID, srcCurrencyID, dstAmount);
|
Pathfinder pf(srcAddress, dstAccountID, srcCurrencyID, dstAmount);
|
||||||
pf.findPaths(5, 1, spsPaths);
|
pf.findPaths(5, 1, spsPaths);
|
||||||
|
if(!spsPaths.isEmpty())
|
||||||
|
{
|
||||||
txJSON["Paths"]=spsPaths.getJson(0);
|
txJSON["Paths"]=spsPaths.getJson(0);
|
||||||
if(txJSON.isMember("Flags")) txJSON["Flags"]=txJSON["Flags"].asUInt() | 2;
|
if(txJSON.isMember("Flags")) txJSON["Flags"]=txJSON["Flags"].asUInt() | 2;
|
||||||
else txJSON["Flags"]=2;
|
else txJSON["Flags"]=2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}else if( txJSON["type"]=="OfferCreate" )
|
}else if( txJSON["type"]=="OfferCreate" )
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user