From 9362690e3e105dfb28a646177ee92ad4102031db Mon Sep 17 00:00:00 2001 From: Denys Karmazyn Date: Fri, 6 Sep 2024 17:02:14 +0200 Subject: [PATCH] feat(tokens): display mainnet tokens total USD (#2271) # Motivation The goal is to display mainnet tokens total USD balances in `NetworkSwitscher`. Screenshot 2024-09-06 at 17 00 56 --- .../lib/components/networks/MainnetNetwork.svelte | 12 ++++++++++++ .../src/lib/components/networks/Network.svelte | 3 ++- .../lib/components/networks/NetworkButton.svelte | 13 ++++++++++--- .../lib/components/networks/NetworksSwitcher.svelte | 11 ++++++++++- 4 files changed, 34 insertions(+), 5 deletions(-) create mode 100644 src/frontend/src/lib/components/networks/MainnetNetwork.svelte diff --git a/src/frontend/src/lib/components/networks/MainnetNetwork.svelte b/src/frontend/src/lib/components/networks/MainnetNetwork.svelte new file mode 100644 index 0000000000..49566c0451 --- /dev/null +++ b/src/frontend/src/lib/components/networks/MainnetNetwork.svelte @@ -0,0 +1,12 @@ + + + diff --git a/src/frontend/src/lib/components/networks/Network.svelte b/src/frontend/src/lib/components/networks/Network.svelte index 04014b9b8d..f13743a214 100644 --- a/src/frontend/src/lib/components/networks/Network.svelte +++ b/src/frontend/src/lib/components/networks/Network.svelte @@ -3,6 +3,7 @@ import type { Network, NetworkId } from '$lib/types/network'; export let network: Network; + export let usdBalance: number | undefined = undefined; let id: NetworkId; let name: string; @@ -10,4 +11,4 @@ $: ({ id, name, icon } = network); - + diff --git a/src/frontend/src/lib/components/networks/NetworkButton.svelte b/src/frontend/src/lib/components/networks/NetworkButton.svelte index 6a58ae5e6f..b672c8f0e7 100644 --- a/src/frontend/src/lib/components/networks/NetworkButton.svelte +++ b/src/frontend/src/lib/components/networks/NetworkButton.svelte @@ -1,17 +1,19 @@ -