From 319944a660acc17a216caeae8b2f0909aa8aeed3 Mon Sep 17 00:00:00 2001 From: David de Kloet <122978264+dskloetd@users.noreply.github.com> Date: Mon, 9 Dec 2024 08:28:08 +0100 Subject: [PATCH] Add USD value banner on tokens page (#5934) # Motivation Using the banner component from https://github.com/dfinity/nns-dapp/pull/5932 on the tokens page. # Changes 1. Calculate the sum of USD values in `frontend/src/lib/pages/Tokens.svelte`. 2. Add `UsdValueBanner` if `ENABLE_USD_VALUES` is enabled. # Tests 1. Unit tests added. 2. Tested manually at https://qsgjb-riaaa-aaaaa-aaaga-cai.dskloet-ingress.devenv.dfinity.network/ # Todos - [ ] Add entry to changelog (if necessary). not yet --- frontend/src/lib/pages/Tokens.svelte | 35 ++++++++++-- frontend/src/tests/lib/pages/Tokens.spec.ts | 55 +++++++++++++++++++ .../page-objects/TokensPage.page-object.ts | 5 ++ 3 files changed, 91 insertions(+), 4 deletions(-) diff --git a/frontend/src/lib/pages/Tokens.svelte b/frontend/src/lib/pages/Tokens.svelte index 5d911b859a3..3b0329fb44f 100644 --- a/frontend/src/lib/pages/Tokens.svelte +++ b/frontend/src/lib/pages/Tokens.svelte @@ -1,10 +1,11 @@ - +
+ {#if $ENABLE_USD_VALUES} + + + + {/if} + (showImportTokenModal = false)} /> {/if} - +