Skip to content

Commit

Permalink
remove strict toggle
Browse files Browse the repository at this point in the history
  • Loading branch information
riccardobl committed Oct 18, 2024
1 parent 1ef2af3 commit fea9903
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions wallets/blink/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,14 @@ 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')
}
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')
}

Expand Down
3 changes: 1 addition & 2 deletions wallets/blink/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down

0 comments on commit fea9903

Please sign in to comment.