From e4c1c9bade10ee6ee0675c46dbe30df2ae556b51 Mon Sep 17 00:00:00 2001 From: benthecarman Date: Wed, 31 Jan 2024 12:19:16 +0000 Subject: [PATCH] Remove description hash check for lnurl --- api/resolvers/wallet.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/api/resolvers/wallet.js b/api/resolvers/wallet.js index 3e427dc1..7f381387 100644 --- a/api/resolvers/wallet.js +++ b/api/resolvers/wallet.js @@ -5,7 +5,7 @@ import serialize from './serial' import { decodeCursor, LIMIT, nextCursorEncoded } from '../../lib/cursor' import lnpr from 'bolt11' import { SELECT } from './item' -import { lnAddrOptions, lnurlPayDescriptionHash } from '../../lib/lnurl' +import { lnAddrOptions } from '../../lib/lnurl' import { msatsToSats, msatsToSatsDecimal } from '../../lib/format' import { amountSchema, lnAddrSchema, ssValidate, withdrawlSchema } from '../../lib/validate' import { ANON_BALANCE_LIMIT_MSATS, ANON_INV_PENDING_LIMIT, ANON_USER_ID, BALANCE_LIMIT_MSATS, INV_PENDING_LIMIT, USER_IDS_BALANCE_NO_LIMIT } from '../../lib/constants' @@ -488,9 +488,6 @@ export async function sendToLnAddr (parent, { addr, amount, maxFee, comment, ... }) throw new Error('automated withdrawals to other stackers are not allowed') } - if (decoded.description_hash !== lnurlPayDescriptionHash(`${options.metadata}${stringifiedPayerData}`)) { - throw new Error('description hash does not match') - } if (!decoded.mtokens || BigInt(decoded.mtokens) !== BigInt(milliamount)) { throw new Error('invoice has incorrect amount') }