From 9496050bdf55d69369d3c8238f14e0a370f61ce5 Mon Sep 17 00:00:00 2001 From: MJK Date: Sat, 29 Sep 2012 18:29:02 -0700 Subject: [PATCH] Towards pathfinder() changes --- src/RPCServer.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/RPCServer.cpp b/src/RPCServer.cpp index ba6415daf3..17c2b4b6b1 100644 --- a/src/RPCServer.cpp +++ b/src/RPCServer.cpp @@ -1779,17 +1779,17 @@ Json::Value RPCServer::doSend(const Json::Value& params) // Destination exists, ordinary send. STPathSet spsPaths; - /* uint160 srcCurrencyID; - bool ret_b; - ret_b = false; - STAmount::currencyFromString(srcCurrencyID, sSrcCurrency); + bool ret_b; + ret_b = false; - Pathfinder pf(naSrcAccountID, naDstAccountID, srcCurrencyID, saDstAmount); - - ret_b = pf.findPaths(5, 1, spsPaths); - // TODO: Nope; the above can't be right - */ + if (!saSrcAmountMax.isNative() || !saDstAmount.isNative()) + { + STAmount::currencyFromString(srcCurrencyID, sSrcCurrency); + Pathfinder pf(naSrcAccountID, naDstAccountID, srcCurrencyID, saDstAmount); + ret_b = pf.findPaths(5, 1, spsPaths); + } + trans = Transaction::sharedPayment( naAccountPublic, naAccountPrivate, naSrcAccountID,