Skip to content

Commit

Permalink
fix: Adjust first tx fee estimation message
Browse files Browse the repository at this point in the history
  • Loading branch information
usame-algan committed Feb 14, 2024
1 parent 75cb5f7 commit 970cadc
Showing 1 changed file with 29 additions and 22 deletions.
51 changes: 29 additions & 22 deletions src/features/counterfactual/CounterfactualForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -114,28 +114,35 @@ export const CounterfactualForm = ({
return (
<>
<form onSubmit={handleSubmit}>
<Alert severity="info" sx={{ mb: 2 }}>
Executing this transaction will also activate your account. Additional network fees will apply. Base fee is{' '}
<strong>
{getTotalFeeFormatted(
advancedParams.maxFeePerGas,
advancedParams.maxPriorityFeePerGas,
BigInt(gasLimit?.baseGas || '0') + BigInt(gasLimit?.safeTxGas || '0'),
chain,
)}{' '}
{chain?.nativeCurrency.symbol}
</strong>
, one time activation fee is{' '}
<strong>
{getTotalFeeFormatted(
advancedParams.maxFeePerGas,
advancedParams.maxPriorityFeePerGas,
BigInt(gasLimit?.safeDeploymentGas || '0'),
chain,
)}{' '}
{chain?.nativeCurrency.symbol}
</strong>
. This is an estimation and the final cost can be higher.
<Alert severity="info" sx={{ mb: 2, border: 0 }}>
Executing this transaction will activate your account.
<br />
<ul style={{ margin: 0, padding: '4px 16px 0' }}>
<li>
Base fee: &asymp;{' '}
<strong>
{getTotalFeeFormatted(
advancedParams.maxFeePerGas,
advancedParams.maxPriorityFeePerGas,
BigInt(gasLimit?.baseGas || '0') + BigInt(gasLimit?.safeTxGas || '0'),
chain,
)}{' '}
{chain?.nativeCurrency.symbol}
</strong>
</li>
<li>
One-time activation fee: &asymp;{' '}
<strong>
{getTotalFeeFormatted(
advancedParams.maxFeePerGas,
advancedParams.maxPriorityFeePerGas,
BigInt(gasLimit?.safeDeploymentGas || '0'),
chain,
)}{' '}
{chain?.nativeCurrency.symbol}
</strong>
</li>
</ul>
</Alert>

<div className={classNames(css.params)}>
Expand Down

0 comments on commit 970cadc

Please sign in to comment.