mirror of
https://github.com/haveno-dex/haveno.git
synced 2024-10-01 01:35:48 -04:00
fix 'not enough money' bug by trying any subaddress
This commit is contained in:
parent
7308206a10
commit
0b3763f900
@ -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 New Issue
Block a user