-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'chore/update-testnet-network-metadata' into charlie-demo
- Loading branch information
Showing
67 changed files
with
514 additions
and
335 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
66 changes: 23 additions & 43 deletions
66
packages/desktop/views/dashboard/send-flow/views/components/EvmTransactionDetails.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,55 +1,35 @@ | ||
<script lang="ts"> | ||
import { localize } from '@core/i18n' | ||
import { NetworkId } from '@core/network' | ||
import { getNameFromNetworkId } from '@core/network/actions/getNameFromNetworkId' | ||
import { getBaseToken } from '@core/profile/actions' | ||
import { formatTokenAmountBestMatch } from '@core/token' | ||
import { BigIntLike } from '@ethereumjs/util' | ||
import { NetworkAvatar, Text } from '@ui' | ||
import { NetworkLabel } from '@ui' | ||
import { Table } from '@bloomwalletio/ui' | ||
export let destinationNetworkId: NetworkId | undefined = undefined | ||
export let estimatedGasFee: BigIntLike | undefined = undefined | ||
export let maxGasFee: BigIntLike | undefined = undefined | ||
$: destinationNetwork = getNameFromNetworkId(destinationNetworkId) | ||
</script> | ||
|
||
<div class="border border-solid border-gray-200 dark:border-gray-700 rounded-lg"> | ||
{#if destinationNetwork} | ||
<section class="key-value-box border-gray-200 dark:border-gray-700"> | ||
<Text>{localize('general.destinationNetwork')}</Text> | ||
<div class="flex flex-row items-center gap-2"> | ||
<NetworkAvatar networkId={destinationNetworkId} size="sm" /> | ||
<Text color="gray-600">{destinationNetwork}</Text> | ||
</div> | ||
</section> | ||
{/if} | ||
<!-- TODO: use correct locales --> | ||
{#if estimatedGasFee} | ||
<section class="key-value-box border-gray-200 dark:border-gray-700"> | ||
<div class="flex flex-row"> | ||
<Text>{localize('general.estimatedFee')}</Text> | ||
</div> | ||
<Text color="gray-600">{formatTokenAmountBestMatch(Number(estimatedGasFee), getBaseToken())}</Text> | ||
</section> | ||
{/if} | ||
{#if maxGasFee} | ||
<section class="key-value-box border-gray-200 dark:border-gray-700"> | ||
<div class="flex flex-row"> | ||
<Text>{localize('general.maxFees')}</Text> | ||
</div> | ||
<Text color="gray-600">{formatTokenAmountBestMatch(Number(maxGasFee), getBaseToken())}</Text> | ||
</section> | ||
{/if} | ||
</div> | ||
|
||
<style lang="scss"> | ||
.key-value-box { | ||
@apply flex flex-row justify-between items-center p-4; | ||
@apply border-b border-solid; | ||
&:last-child { | ||
@apply border-0; | ||
} | ||
} | ||
</style> | ||
<Table | ||
items={[ | ||
{ | ||
key: localize('general.destinationNetwork'), | ||
slot: { | ||
component: NetworkLabel, | ||
props: { | ||
networkId: destinationNetworkId, | ||
}, | ||
}, | ||
}, | ||
{ | ||
key: localize('general.estimatedFee'), | ||
value: estimatedGasFee ? formatTokenAmountBestMatch(Number(estimatedGasFee), getBaseToken()) : undefined, | ||
}, | ||
{ | ||
key: localize('general.maxFees'), | ||
value: maxGasFee ? formatTokenAmountBestMatch(Number(maxGasFee), getBaseToken()) : undefined, | ||
}, | ||
]} | ||
/> |
Oops, something went wrong.