Skip to content

Commit

Permalink
Merge pull request #4 from greymass/fixing-include-testnets
Browse files Browse the repository at this point in the history
Making includeTestnets behavior identical to legacy API
  • Loading branch information
dafuga authored Jan 22, 2025
2 parents 104eae9 + f1b0b87 commit 052523a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/routes/lookup/[publicKey]/+server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ import {lookupNetwork} from '$lib/lookup'

export const GET = async ({params, url, fetch}: RequestEvent) => {
const {publicKey} = params
const includeTestnets = url.searchParams.get('includeTestnets') === 'true'
const testnetParam = url.searchParams.get('includeTestnets')
const includeTestnets = testnetParam !== null && testnetParam !== 'false'

if (!publicKey) {
throw error(400, {message: 'Public key is required'})
Expand Down

0 comments on commit 052523a

Please sign in to comment.