From fea990390a883b5a1fe38096d1172aa78e0fc80b Mon Sep 17 00:00:00 2001 From: Riccardo Balbo Date: Fri, 18 Oct 2024 17:20:24 +0200 Subject: [PATCH] remove strict toggle --- wallets/blink/client.js | 3 +-- wallets/blink/server.js | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/wallets/blink/client.js b/wallets/blink/client.js index c24c186fb..0f2e6d012 100644 --- a/wallets/blink/client.js +++ b/wallets/blink/client.js @@ -3,7 +3,6 @@ export * from 'wallets/blink' export async function testSendPayment ({ apiKey, currency }, { logger }) { logger.info('trying to fetch ' + currency + ' wallet') - const strict = false const scopes = await getScopes(apiKey) if (!scopes.includes(SCOPE_READ)) { throw new Error('missing READ scope') @@ -11,7 +10,7 @@ export async function testSendPayment ({ apiKey, currency }, { logger }) { if (!scopes.includes(SCOPE_WRITE)) { throw new Error('missing WRITE scope') } - if (strict && scopes.includes(SCOPE_RECEIVE)) { + if (scopes.includes(SCOPE_RECEIVE)) { throw new Error('RECEIVE scope must not be present') } diff --git a/wallets/blink/server.js b/wallets/blink/server.js index 96c9967f7..f21f92970 100644 --- a/wallets/blink/server.js +++ b/wallets/blink/server.js @@ -4,12 +4,11 @@ import { msatsToSats } from '@/lib/format' export * from 'wallets/blink' export async function testCreateInvoice ({ apiKeyRecv, currencyRecv }) { - const strict = true const scopes = await getScopes(apiKeyRecv) if (!scopes.includes(SCOPE_READ)) { throw new Error('missing READ scope') } - if (strict && scopes.includes(SCOPE_WRITE)) { + if (scopes.includes(SCOPE_WRITE)) { throw new Error('WRITE scope must not be present') } if (!scopes.includes(SCOPE_RECEIVE)) {