aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2024-10-23 21:49:08 -0700
committerAdam Soltys <[email protected]>2024-10-23 21:49:08 -0700
commitd0e7d2d11fbeb86545ba32b1e5eca7f420123951 (patch)
treeb6bf8f4d997a38bcb3bcf102a7d5971e04d8d8ca
parent81896d50c3722903b663146f021689cddfaefc54 (diff)
downloadcoinos-ui-d0e7d2d11fbeb86545ba32b1e5eca7f420123951.tar.gz
coinos-ui-d0e7d2d11fbeb86545ba32b1e5eca7f420123951.zip
link to ecash token from payment details
-rw-r--r--src/locales/en.json1
-rw-r--r--src/routes/(app)/payment/[id]/+page.svelte13
2 files changed, 12 insertions, 2 deletions
diff --git a/src/locales/en.json b/src/locales/en.json
index b55884dd..64fa3d51 100644
--- a/src/locales/en.json
+++ b/src/locales/en.json
@@ -355,6 +355,7 @@
"fundingAmount": "Funding amount",
"fast": "Fast",
"ecashDesc": "Ecash tokens get funded with an amount of bitcoin. They can be redeemed into a coinos account or loaded into other wallets. You can use them to give bitcoin to someone who may not have a wallet yet. Learn more at",
+ "ecashToken": "Ecash token",
"medium": "Medium",
"maxFeeDesc": "Set an upper limit on the network routing fee. If set too low the payment may fail. You can set it higher and try again. We debit the full amount while attempting the payment but credit back any unused portion.",
"slow": "Slow",
diff --git a/src/routes/(app)/payment/[id]/+page.svelte b/src/routes/(app)/payment/[id]/+page.svelte
index d49a3cb2..b07bbb35 100644
--- a/src/routes/(app)/payment/[id]/+page.svelte
+++ b/src/routes/(app)/payment/[id]/+page.svelte
@@ -188,14 +188,23 @@
</div>
</div>
- {#if memo}
+ {#if type === types.ecash}
+ <a href={`/ecash/${memo}`} class="block">
+ <button
+ class="rounded-2xl py-5 px-6 font-bold hover:bg-neutral-700 flex bg-black text-white gap-2 items-center"
+ >
+ <img src="/images/cash.png" class="w-8" />
+ <div>{$t("payments.ecashToken")}</div>
+ </button>
+ </a>
+ {:else if memo}
<div>
<span class="text-lg text-secondary">{$t("payments.memo")}</span>
<div>{memo}</div>
</div>
{/if}
- {#if type === "lightning"}
+ {#if type === types.lightning}
<div>
<span class="text-lg text-secondary">{$t("payments.preimage")}</span>
<div>{ref}</div>