From 72278b8eb8ae04335a074d49bedef4149c5a93fa Mon Sep 17 00:00:00 2001 From: Nick Taras Date: Wed, 18 Oct 2023 15:27:59 +1100 Subject: [PATCH] look for tokenid if the new attestation format isnt present. --- src/outlet/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/outlet/index.ts b/src/outlet/index.ts index e97c0578..d0a6a66a 100644 --- a/src/outlet/index.ts +++ b/src/outlet/index.ts @@ -212,8 +212,8 @@ export class Outlet extends LocalOutlet { const token: string = this.getDataFromQuery('tn-token') const wallet: string = this.getDataFromQuery('wallet') const address: string = this.getDataFromQuery('address') - const tokenParsed = JSON.parse(token) - const tokenId = tokenParsed.tokenId + const tokenParsed = token ? JSON.parse(token) : undefined + const tokenId = tokenParsed.tokenId ?? this.getDataFromQuery('tokenId') requiredParams(tokenId, 'tokenId is missing') const redirect = this.getDataFromQuery('redirect') === 'true' ? window.location.href : false try {