remove strict toggle
This commit is contained in:
parent
1ef2af3f5d
commit
fea990390a
|
@ -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')
|
||||
}
|
||||
|
||||
|
|
|
@ -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)) {
|
||||
|
|
Loading…
Reference in New Issue