From 2f49899874433ecf1ed356630b315999f0d21adf Mon Sep 17 00:00:00 2001 From: Tom Kirkpatrick Date: Sun, 3 May 2020 18:33:41 +0200 Subject: [PATCH] fix(wallet): properly decode invoice in getTag --- utils/crypto.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/crypto.js b/utils/crypto.js index ed3d08a66a5..e39d65e802b 100644 --- a/utils/crypto.js +++ b/utils/crypto.js @@ -59,7 +59,7 @@ export const decodePayReq = (payReq, addDefaults = true) => { */ export const getTag = (invoice, tagName) => { try { - const decodedInvoice = typeof invoice === 'string' ? decodePayReq.decode(invoice) : invoice + const decodedInvoice = typeof invoice === 'string' ? decodePayReq(invoice) : invoice return decodedInvoice.tags.find(t => t.tagName === tagName).data } catch (e) { return null