preserve withdraw fields when page reactivated while in progress
Some checks failed
CI / build (macos-13) (push) Has been cancelled
CI / build (ubuntu-latest) (push) Has been cancelled
CI / build (windows-latest) (push) Has been cancelled
Codacy Coverage Reporter / Publish coverage (push) Has been cancelled
CodeQL / Analyze (java) (push) Has been cancelled

This commit is contained in:
woodser 2024-08-20 08:30:48 -04:00 committed by GitHub
parent e18d281ca9
commit caebd58303
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -242,8 +242,12 @@ public class WithdrawalView extends ActivatableView<VBox, Void> {
if (GUIUtil.isReadyForTxBroadcastOrShowPopup(xmrWalletService)) {
try {
// collect tx fields to local variables
String withdrawToAddress = withdrawToTextField.getText();
boolean sendMax = this.sendMax;
BigInteger amount = this.amount;
// validate address
final String withdrawToAddress = withdrawToTextField.getText();
if (!MoneroUtils.isValidAddress(withdrawToAddress, XmrWalletService.getMoneroNetworkType())) {
throw new IllegalArgumentException(Res.get("validation.xmr.invalidAddress"));
}
@ -298,7 +302,7 @@ public class WithdrawalView extends ActivatableView<VBox, Void> {
BigInteger receiverAmount = tx.getOutgoingTransfer().getDestinations().get(0).getAmount();
BigInteger fee = tx.getFee();
String messageText = Res.get("shared.sendFundsDetailsWithFee",
HavenoUtils.formatXmr(amount, true),
HavenoUtils.formatXmr(receiverAmount.add(fee), true),
withdrawToAddress,
HavenoUtils.formatXmr(fee, true),
HavenoUtils.formatXmr(receiverAmount, true));