mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-08-03 12:16:27 -04:00
Fix missing password key
This commit is contained in:
parent
3ddd2bd408
commit
9339ab57cc
2 changed files with 5 additions and 4 deletions
|
@ -440,10 +440,11 @@ public class WalletService {
|
|||
|
||||
public Coin getRequiredFee(String fromAddress,
|
||||
String toAddress,
|
||||
Coin amount) throws AddressFormatException, IllegalArgumentException, InsufficientMoneyException {
|
||||
Coin amount,
|
||||
KeyParameter aesKey) throws AddressFormatException, IllegalArgumentException, InsufficientMoneyException {
|
||||
Coin fee;
|
||||
try {
|
||||
wallet.completeTx(getSendRequest(fromAddress, toAddress, amount, null));
|
||||
wallet.completeTx(getSendRequest(fromAddress, toAddress, amount, aesKey));
|
||||
fee = Coin.ZERO;
|
||||
} catch (InsufficientMoneyException e) {
|
||||
log.info("The amount to be transferred is not enough to pay the transaction fees of {}. " +
|
||||
|
@ -480,7 +481,7 @@ public class WalletService {
|
|||
Coin amount,
|
||||
KeyParameter aesKey,
|
||||
FutureCallback<Transaction> callback) throws AddressFormatException, IllegalArgumentException, InsufficientMoneyException {
|
||||
Coin fee = getRequiredFee(fromAddress, toAddress, amount);
|
||||
Coin fee = getRequiredFee(fromAddress, toAddress, amount, aesKey);
|
||||
Wallet.SendResult sendResult = wallet.sendCoins(getSendRequest(fromAddress, toAddress, amount.subtract(fee), aesKey));
|
||||
Futures.addCallback(sendResult.broadcastComplete, callback);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue