From b2310e9b98bbaa5918003208157e0594307a033f Mon Sep 17 00:00:00 2001 From: secondl1ght <85003930+secondl1ght@users.noreply.github.com> Date: Wed, 3 Aug 2022 22:57:04 -0600 Subject: add tx type to history, add address to settings and other ui updates --- src/routes/[username]/dashboard.svelte | 8 +++----- src/routes/[username]/settings.svelte | 9 +++++++++ src/routes/[username]/transactions.svelte | 19 ++++++++++++------- 3 files changed, 24 insertions(+), 12 deletions(-) (limited to 'src') diff --git a/src/routes/[username]/dashboard.svelte b/src/routes/[username]/dashboard.svelte index 6f38a812..11295728 100644 --- a/src/routes/[username]/dashboard.svelte +++ b/src/routes/[username]/dashboard.svelte @@ -56,14 +56,12 @@ > {accountBalanceBtc} BTC ({accountBalanceSats} SATS) + >{accountBalanceSats} SATS -

- You will be charged a 1% withdrawal fee ({$rate ? feeAmount : 'fetching rate...'}) on your balance. +

+ You will be charged a 1% withdrawal fee on the amount.

diff --git a/src/routes/[username]/settings.svelte b/src/routes/[username]/settings.svelte index ae8e91c1..82ed7305 100644 --- a/src/routes/[username]/settings.svelte +++ b/src/routes/[username]/settings.svelte @@ -71,6 +71,15 @@ +
+ + +
+
Email Notifications diff --git a/src/routes/[username]/transactions.svelte b/src/routes/[username]/transactions.svelte index 0e635298..24e3e146 100644 --- a/src/routes/[username]/transactions.svelte +++ b/src/routes/[username]/transactions.svelte @@ -16,30 +16,35 @@
-
+

AMOUNT

-

TIME

+

TYPE

+

TIME

{#if transactions.length} {#each transactions as tx} -
+
{new Intl.NumberFormat('en-US', { + >{tx.amount > 0 && '+'}{new Intl.NumberFormat('en-US', { style: 'currency', currency: 'USD' }).format(tx.amount * (tx.rate / 100000000))} ({new Intl.NumberFormat('en-US', { maximumFractionDigits: 0 }).format(tx.amount)} - SATS) + >{new Intl.NumberFormat('en-US', { maximumFractionDigits: 0 }).format(tx.amount)} + SATS
-
+
+ {tx.amount < 0 ? 'Sent' : 'Received'} +
+ +
{new Date(tx.createdAt).toLocaleDateString(undefined, { dateStyle: 'medium' })}
-- cgit v1.2.3