Skip to content

Commit

Permalink
Merge pull request #1899 from ResearchHub/do-not-round-transaction-fee
Browse files Browse the repository at this point in the history
Round transaction fee on backend
  • Loading branch information
koutst authored Dec 23, 2024
2 parents 9ff7c16 + fa7e3f2 commit f92278f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 12 deletions.
4 changes: 2 additions & 2 deletions components/Ethereum/ETHAddressInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ const ETHAddressInput = (props) => {
return (
<div className={css(styles.connectStatus)}>
<div className={css(styles.dot, styles.invalidAddress)} />
<span className={css(styles.red)}>Invalid address</span>
<span className={css(styles.red)}>Invalid Address</span>
</div>
);
}

if (!connectedMetaMask && ethAccountIsValid) {
if (ethAccount && !connectedMetaMask && ethAccountIsValid) {
return (
<div className={css(styles.connectStatus)}>
<div className={css(styles.dot, styles.connected)} />
Expand Down
16 changes: 6 additions & 10 deletions components/Modals/WithdrawalModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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"}
</div>
)}
</div>
Expand Down Expand Up @@ -696,9 +696,7 @@ class WithdrawalModal extends Component {
Learn more about fees.
</a>
</div>
<div className={css(styles.right)}>
{formatBalance(transactionFee)}
</div>
<div className={css(styles.right)}>{transactionFee}</div>
</div>
<div className={css(styles.row)}>
<div className={css(styles.left)}>
Expand All @@ -707,9 +705,7 @@ class WithdrawalModal extends Component {
The total RSC transferred after fees.
</div>
</div>
<div className={css(styles.right)}>
{formatBalance(amount - transactionFee)}
</div>
<div className={css(styles.right)}>{amount - transactionFee}</div>
</div>

{isUnderInvestigation && (
Expand Down

0 comments on commit f92278f

Please sign in to comment.