Skip to content

Commit

Permalink
show basetoken amount on smartcontract popups
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkNerdi committed May 27, 2024
1 parent e040eaf commit b4696e6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@
}
}
$: preparedTransaction.gasPrice = Converter.bigIntToHex(gasPrices?.[selectedGasSpeed] ?? gasPrices.required)
$: baseCoinTransfer = {
token: getTokenFromSelectedAccountTokens(BASE_TOKEN_ID, evmNetwork.id),
rawAmount: Converter.bigIntLikeToBigInt(preparedTransaction.value),
}
setParsedContractData()
function setParsedContractData(): void {
Expand Down Expand Up @@ -217,13 +221,10 @@
/>

<div class="space-y-5">
{#if !preparedTransaction.data}
{@const baseCoinTransfer = {
token: getTokenFromSelectedAccountTokens(BASE_TOKEN_ID, evmNetwork.id),
rawAmount: Converter.bigIntLikeToBigInt(preparedTransaction.value),
}}
{#if preparedTransaction.value}
<TransactionAssetSection {baseCoinTransfer} />
{:else if parsedData?.type === ParsedSmartContractType.CoinTransfer}
{/if}
{#if parsedData?.type === ParsedSmartContractType.CoinTransfer}
{@const baseCoinTransfer = {
token: getTokenFromSelectedAccountTokens(BASE_TOKEN_ID, evmNetwork.id),
rawAmount: parsedData.rawAmount,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ import { IToken } from '@core/token/interfaces'

export type TokenTransferData = {
rawAmount: bigint
token: IToken
token?: IToken
unit?: string
}

0 comments on commit b4696e6

Please sign in to comment.