aboutsummaryrefslogtreecommitdiffstats
path: root/src/routes/(app)/tx
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2023-01-22 21:03:57 -0800
committerAdam Soltys <[email protected]>2023-01-22 21:03:57 -0800
commit29ed3a4366eb9719d32dac390764bf119c40afff (patch)
tree89217b59e723ea8b08a12fdac1caa5c63844fa2f /src/routes/(app)/tx
parent681e307d00e38ee9bc336e547660f56e71b646c6 (diff)
downloadcoinos-ui-29ed3a4366eb9719d32dac390764bf119c40afff.tar.gz
coinos-ui-29ed3a4366eb9719d32dac390764bf119c40afff.zip
rename txns
Diffstat (limited to 'src/routes/(app)/tx')
-rw-r--r--src/routes/(app)/tx/[id]/+page.server.js6
-rw-r--r--src/routes/(app)/tx/[id]/+page.svelte62
2 files changed, 0 insertions, 68 deletions
diff --git a/src/routes/(app)/tx/[id]/+page.server.js b/src/routes/(app)/tx/[id]/+page.server.js
deleted file mode 100644
index cbd7355e..00000000
--- a/src/routes/(app)/tx/[id]/+page.server.js
+++ /dev/null
@@ -1,6 +0,0 @@
-import { auth, get } from '$lib/utils';
-
-export async function load({ cookies, params }) {
- let tx = await get(`/payments/${params.id}`, auth(cookies));
- return { tx };
-}
diff --git a/src/routes/(app)/tx/[id]/+page.svelte b/src/routes/(app)/tx/[id]/+page.svelte
deleted file mode 100644
index a2bb1459..00000000
--- a/src/routes/(app)/tx/[id]/+page.svelte
+++ /dev/null
@@ -1,62 +0,0 @@
-<script>
- import { t } from '$lib/translations';
- import { back, copy, f, s, sats } from '$lib/utils';
- import { Avatar, Icon } from '$comp';
- import { format } from 'date-fns';
- import { PUBLIC_EXPLORER as expl } from '$env/static/public';
-
- export let data;
- let { user, tx } = data;
- let { username } = user;
- let { amount, hash, created, rate, type, preimage, fee, currency } = tx;
- fee = fee || 0;
-
- let fiat = (Math.abs(amount) * rate) / sats;
-</script>
-
-<button class="ml-5 md:ml-20 mt-5 md:mt-10 hover:opacity-80" on:click={back}>
- <Icon icon="arrow-left" style="w-10" />
-</button>
-
-<div class="container mx-auto max-w-lg px-4 space-y-2 sm:space-y-5 break-all">
- <h1 class="px-3 md:px-0 text-center text-3xl md:text-4xl font-semibold mb-10">
- {$t(amount < 0 ? 'payments.sent' : 'payments.received')}
- </h1>
-
- <div>
- <div class="font-bold">{$t('payments.amount')}</div>
- <div class="text-xl">
- {f(fiat, currency)}
- <span class="text-secondary">⚡️{`${s(Math.abs(amount) + fee)}`}</span>
- </div>
- </div>
-
- <div>
- <div class="font-bold">{$t('payments.date')}</div>
- <div>
- {format(new Date(created), 'MMMM d')},
- {format(new Date(created), 'h:mm aaa')}
- </div>
- </div>
-
- {#if type === 'lightning'}
- <div>
- <div class="font-bold">{$t('payments.preimage')}</div>
- <div>
- {preimage}
- </div>
- </div>
- {:else}
- <div>
- <div class="font-bold">{$t('payments.id')}</div>
- <div class="flex">
- <div>
- <a href={`${expl}/tx/${hash}`} target="_blank" class="text-blue-600">{hash}</a>
- </div>
- <button class="flex font-bold hover:opacity-80 mb-auto" on:click={() => copy(hash)}
- ><Icon icon="copy" style="mr-1" />
- </button>
- </div>
- </div>
- {/if}
-</div>