-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(tokens): display mainnet tokens total USD (#2271)
# Motivation The goal is to display mainnet tokens total USD balances in `NetworkSwitscher`. <img width="324" alt="Screenshot 2024-09-06 at 17 00 56" src="https://github.com/user-attachments/assets/d4546250-064a-4a7b-9cf6-4cf93d538e81">
- Loading branch information
1 parent
f1c620a
commit 9362690
Showing
4 changed files
with
34 additions
and
5 deletions.
There are no files selected for viewing
12 changes: 12 additions & 0 deletions
12
src/frontend/src/lib/components/networks/MainnetNetwork.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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<script lang="ts"> | ||
import NetworkComponent from '$lib/components/networks/Network.svelte'; | ||
import { enabledMainnetTokensUsdBalancesPerNetwork } from '$lib/derived/tokens.derived'; | ||
import type { Network } from '$lib/types/network'; | ||
export let network: Network; | ||
let usdBalance: number; | ||
$: usdBalance = $enabledMainnetTokensUsdBalancesPerNetwork[network.id] ?? 0; | ||
</script> | ||
|
||
<NetworkComponent {network} {usdBalance} on:icSelected /> |
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