Fix missing password key

This commit is contained in:
Manfred Karrer 2016-01-27 02:24:56 +01:00
parent 3ddd2bd408
commit 9339ab57cc
2 changed files with 5 additions and 4 deletions

View File

@ -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);

View File

@ -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);