Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Commit

Permalink
fix(wallet): properly decode invoice in getTag
Browse files Browse the repository at this point in the history
  • Loading branch information
mrfelton committed May 3, 2020
1 parent 7ae1b9b commit 2f49899
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion utils/crypto.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2f49899

Please sign in to comment.