From d86c23b554a2cf45e441abd77c547c45ece68971 Mon Sep 17 00:00:00 2001 From: koutst Date: Mon, 23 Dec 2024 09:31:54 -0500 Subject: [PATCH 1/2] Round transaction fee on backend, fix capitalization, fix valid address when empty --- components/Ethereum/ETHAddressInput.js | 4 ++-- components/Modals/WithdrawalModal.js | 12 ++++-------- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/components/Ethereum/ETHAddressInput.js b/components/Ethereum/ETHAddressInput.js index 84648232a8..74568a5443 100644 --- a/components/Ethereum/ETHAddressInput.js +++ b/components/Ethereum/ETHAddressInput.js @@ -26,12 +26,12 @@ const ETHAddressInput = (props) => { return (
- Invalid address + Invalid Address
); } - if (!connectedMetaMask && ethAccountIsValid) { + if (ethAccount && !connectedMetaMask && ethAccountIsValid) { return (
diff --git a/components/Modals/WithdrawalModal.js b/components/Modals/WithdrawalModal.js index aa27db4e40..211ba15b3a 100644 --- a/components/Modals/WithdrawalModal.js +++ b/components/Modals/WithdrawalModal.js @@ -23,7 +23,7 @@ import API from "~/config/api"; import { Helpers } from "@quantfive/js-web-config"; import colors, { alertColors } from "~/config/themes/colors"; -import { sanitizeNumber, formatBalance } from "~/config/utils/form"; +import { sanitizeNumber } from "~/config/utils/form"; import { getEtherscanLink, getBasescanLink, @@ -106,7 +106,7 @@ class WithdrawalModal extends Component { if (this.props.address !== prevProps.address) { this.setState({ ethAccount: this.props.address, - ethAccountIsValid: true, + ethAccountIsValid: false, }); } if (!this.state.buttonEnabled && this.state.userBalance) { @@ -696,9 +696,7 @@ class WithdrawalModal extends Component { Learn more about fees.
-
- {formatBalance(transactionFee)} -
+
{transactionFee}
@@ -707,9 +705,7 @@ class WithdrawalModal extends Component { The total RSC transferred after fees.
-
- {formatBalance(amount - transactionFee)} -
+
{amount - transactionFee}
{isUnderInvestigation && ( From fa7e3f2e10340881ce6eacab7d40fef0fce09ac5 Mon Sep 17 00:00:00 2001 From: koutst Date: Mon, 23 Dec 2024 13:08:34 -0500 Subject: [PATCH 2/2] Update message network dropdown --- components/Modals/WithdrawalModal.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/Modals/WithdrawalModal.js b/components/Modals/WithdrawalModal.js index 211ba15b3a..657c7d3206 100644 --- a/components/Modals/WithdrawalModal.js +++ b/components/Modals/WithdrawalModal.js @@ -609,8 +609,8 @@ class WithdrawalModal extends Component { )} > {value === "BASE" - ? "Recommended network for most users" - : "Legacy option"} + ? "Recommended network for low fees" + : "Higher fees, with increased decentralization"} )}