mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-04-19 15:26:03 -04:00
Fix missing password key
This commit is contained in:
parent
3ddd2bd408
commit
9339ab57cc
@ -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);
|
||||
|
||||
|
@ -191,7 +191,7 @@ public class WithdrawalView extends ActivatableView<VBox, Void> {
|
||||
};
|
||||
try {
|
||||
Coin requiredFee = walletService.getRequiredFee(withdrawFromTextField.getText(),
|
||||
withdrawToTextField.getText(), senderAmount);
|
||||
withdrawToTextField.getText(), senderAmount, null);
|
||||
Coin receiverAmount = senderAmount.subtract(requiredFee);
|
||||
if (BitsquareApp.DEV_MODE) {
|
||||
doWithdraw(receiverAmount, callback);
|
||||
|
Loading…
x
Reference in New Issue
Block a user