Skip to content

Commit

Permalink
feat: disable gas selection if isTransferring
Browse files Browse the repository at this point in the history
  • Loading branch information
Tuditi committed May 16, 2024
1 parent 9551ce6 commit 4e9737e
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,7 @@
destinationNetworkId={evmNetwork.id}
transaction={preparedTransaction}
{gasPrices}
{busy}
/>
</div>
</PopupTemplate>
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@
transaction={preparedTransaction}
sendFlowParameters={$sendFlowParameters}
network={evmNetwork}
{busy}
/>
{:else if !isSourceNetworkLayer2 && preparedOutput && $sendFlowParameters}
{#if isDestinationNetworkLayer2}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
export let transaction: EvmTransactionData
export let gasPrices: IGasPricesBySpeed
export let storageDeposit: bigint = BigInt(0)
export let busy: boolean
const { gasLimit, estimatedGas } = transaction
Expand Down Expand Up @@ -47,7 +48,13 @@
}}
>
<div slot="boundValue">
<SetTransactionFeeMenu bind:selectedGasSpeed {gasPrices} gasUnit={gasLimit} {formatGasFee} />
<SetTransactionFeeMenu
bind:selectedGasSpeed
{gasPrices}
gasUnit={gasLimit}
{formatGasFee}
disabled={busy}
/>
</div>
</TableRow>
{/if}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
export let network: IEvmNetwork
export let selectedGasSpeed: GasSpeed
export let gasPrices: IGasPricesBySpeed
export let busy: boolean
$: transactionAsset = getTransactionAsset(sendFlowParameters)
function getTransactionAsset(_sendFlowParameters: SendFlowParameters): {
Expand Down Expand Up @@ -69,5 +70,6 @@
{transaction}
{storageDeposit}
{gasPrices}
{busy}
/>
</div>

0 comments on commit 4e9737e

Please sign in to comment.