From 77880f9bf8b034b43043ff3ed958c56c7204c8c6 Mon Sep 17 00:00:00 2001 From: Anton Kovalenko Date: Wed, 6 Jul 2022 21:17:41 +0300 Subject: [PATCH] Add telegram notification to encrypted dests --- src/App.svelte | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/src/App.svelte b/src/App.svelte index bb70d0a..f5bbd69 100644 --- a/src/App.svelte +++ b/src/App.svelte @@ -8,7 +8,7 @@ import InputMask from './InputMask.svelte'; import payways from './payways.js'; - + import QR from './QR.svelte'; import CTC from './CTC.svelte'; @@ -19,7 +19,7 @@ import PayFlow from './PayFlow.svelte'; import { ecEncrypt } from './ecies.js'; - + let payway = payways[0]; setTimeout(()=>{ @@ -32,6 +32,7 @@ let realAmount; let extAccount; let briefAccount; + let notifyTelegramId; let encrypt = false; $: inputId = payway.iid||payway.id; @@ -45,8 +46,10 @@ $: realAmount = amounts[payway.id] && ( Math.max(Math.min(amounts[payway.id], payway.max),payway.min)) - - $: extAccount = accountReady ? (encrypt? "0g" + ecEncrypt(accounts[inputId].padEnd(8)): accounts[inputId]):""; + + $: extAccount = accountReady ? (encrypt? "0g" + + ecEncrypt(((notifyTelegramId ? "-t"+notifyTelegramId+" ":"") + + accounts[inputId]).padEnd(8)): accounts[inputId]):""; $: briefAccount = extAccount ? (encrypt ? extAccount.slice(0,28)+"…" : extAccount):"" @@ -173,6 +176,15 @@ + {#if encrypt} + + {/if} + {/key} +