mirror of
https://github.com/boldsuck/haveno.git
synced 2024-12-22 03:59: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 {
|
||||
return createTradeTxFromSubaddress(feeAmount, feeAddress, sendAmount, sendAddress, subaddressIndices.get(i));
|
||||
} 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
|
||||
if (!subaddressIndices.isEmpty()) log.info("Could not create trade tx from preferred subaddresses, trying any subaddress");
|
||||
return createTradeTxFromSubaddress(feeAmount, feeAddress, sendAmount, sendAddress, null);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue