From 1bfec1843303fe5f50524aa2236eb28ab04e26bc Mon Sep 17 00:00:00 2001 From: Vlad Stan Date: Tue, 11 Oct 2022 15:36:24 +0300 Subject: [PATCH] feat: send tokens UI --- .../cashu/templates/cashu/wallet.html | 70 +++++++++++++++++++ 1 file changed, 70 insertions(+) diff --git a/lnbits/extensions/cashu/templates/cashu/wallet.html b/lnbits/extensions/cashu/templates/cashu/wallet.html index d0e90493c..385143e16 100644 --- a/lnbits/extensions/cashu/templates/cashu/wallet.html +++ b/lnbits/extensions/cashu/templates/cashu/wallet.html @@ -63,6 +63,7 @@ page_container %} rounded color="primary" class="full-width" + @click="showSendTokensDialog" > Send @@ -266,6 +267,58 @@ page_container %} + + +
+
+
+ How much would you like to send? +
+
+ + + +
+
+ +
+
+ Show Tokens + + Close +
+
+
+
@@ -374,8 +427,14 @@ page_container %} invoice: '', bolt11: '' }, + sendData: { + amount: 0, + memo: '', + tokens: '' + }, showInvoiceDetails: false, showPayInvoice: false, + showSendTokens: false, tokens: [], tab: 'tokens', @@ -797,6 +856,13 @@ page_container %} this.showPayInvoice = true }, + showSendTokensDialog: function () { + this.sendData.tokens = '' + this.sendData.amount = 0 + this.sendData.memo = '' + this.showSendTokens = true + }, + requestInvoice: async function () { try { const {data} = await LNbits.api.request( @@ -892,6 +958,10 @@ page_container %} await this.fetchPromisesFromMint(paymentHash, newTokens.newTokens) }, + buildAnsShowTokens: async function () { + this.sendData.tokens = 'toookeeens:' + this.sendData.amount + }, + buildTokens: async function (amounts, paymentHash) { const blindedMessages = [] const secrets = []