From 0ba17a8d5f8b399955b64a3b5a31ec799ad29778 Mon Sep 17 00:00:00 2001 From: Erik Brakke Date: Fri, 28 Apr 2023 09:41:01 -0600 Subject: [PATCH] minor fixes for vite --- src/pages/WalletPage.vue | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/pages/WalletPage.vue b/src/pages/WalletPage.vue index 4a2ab399..62aefd26 100644 --- a/src/pages/WalletPage.vue +++ b/src/pages/WalletPage.vue @@ -795,6 +795,7 @@ import { axios } from "boot/axios"; import { date } from "quasar"; import { splitAmount, bigIntStringify } from "src/js/utils"; import * as nobleSecp256k1 from "@noble/secp256k1"; +import * as bolt11Decoder from "light-bolt11-decoder"; import { step1Alice, step3Alice } from "src/js/dhke"; import { uint8ToBase64 } from "src/js/base64"; import * as _ from "underscore"; @@ -1195,14 +1196,11 @@ export default { this.payInvoiceData.show = true; let invoice; try { - invoice = require("light-bolt11-decoder").decode( - this.payInvoiceData.data.request - ); + invoice = bolt11Decoder.decode(this.payInvoiceData.data.request); } catch (error) { this.notifyWarning("Failed to decode invoice", null, 3000); this.payInvoiceData.show = false; throw error; - return; } // invoice.amount = invoice.sections[2] / 1000;