Fix sendMax path bug

This commit is contained in:
seelabs
2016-06-07 09:53:23 -04:00
parent 11c4ca00d5
commit 434855f500
2 changed files with 14 additions and 1 deletions

View File

@@ -176,7 +176,9 @@ toStrand (
STPathElement::typeAll, src, curIssue.currency, curIssue.account);
boost::optional<STPathElement> sendMaxPE;
if (sendMaxIssue && sendMaxIssue->account != src)
if (sendMaxIssue && sendMaxIssue->account != src &&
(path.empty () || !path[0].isAccount () ||
path[0].getAccountID () != sendMaxIssue->account))
sendMaxPE.emplace (sendMaxIssue->account, boost::none, boost::none);
STPathElement const lastNode (dst, boost::none, boost::none);