mirror of
https://github.com/boldsuck/haveno.git
synced 2024-12-22 12:09:22 +00:00
fix 'not enough money' bug by trying any subaddress
This commit is contained in:
parent
7308206a10
commit
0b3763f900
1 changed files with 2 additions and 1 deletions
|
@ -692,11 +692,12 @@ public class XmrWalletService {
|
||||||
try {
|
try {
|
||||||
return createTradeTxFromSubaddress(feeAmount, feeAddress, sendAmount, sendAddress, subaddressIndices.get(i));
|
return createTradeTxFromSubaddress(feeAmount, feeAddress, sendAmount, sendAddress, subaddressIndices.get(i));
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
if (i == subaddressIndices.size() - 1 && reserveExactAmount) throw e; // throw if no subaddress with exact output
|
log.info("Cannot create trade tx from preferred subaddress index " + subaddressIndices.get(i) + ": " + e.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// try any subaddress
|
// try any subaddress
|
||||||
|
if (!subaddressIndices.isEmpty()) log.info("Could not create trade tx from preferred subaddresses, trying any subaddress");
|
||||||
return createTradeTxFromSubaddress(feeAmount, feeAddress, sendAmount, sendAddress, null);
|
return createTradeTxFromSubaddress(feeAmount, feeAddress, sendAmount, sendAddress, null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue