Skip to content

Commit

Permalink
allow for forced non re-direct mode
Browse files Browse the repository at this point in the history
  • Loading branch information
Nick Taras authored and Nick Taras committed Sep 28, 2023
1 parent 9855cb7 commit 9ede23d
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/client/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -747,7 +747,8 @@ export class Client {
}

private async loadRemoteOutletTokens(issuer: OffChainTokenConfig): Promise<OutletTokenResult | void> {
this.tokenStore.setTokens(issuer.collectionID, [])
const redirectRequired = shouldUseRedirectMode(this.config.offChainRedirectMode)
if (redirectRequired) this.tokenStore.setTokens(issuer.collectionID, [])
this.ui.showLoader(
`<h4>${this.config.uiOptions?.reDirectIssuerEventHeading ?? 'Connecting to Issuers...'}</h4>`,
`<small>${this.config.uiOptions?.reDirectIssuerBodyEvent ?? 'Your browser will re-direct shortly'}</small>`,
Expand All @@ -770,11 +771,9 @@ export class Client {
},
this.config.messagingForceTab,
this.config.type === 'active' ? this.ui : null,
window.location.href,
redirectRequired ? window.location.href : false,
)

if (!res) return // Site is redirecting

return res.data?.tokens ?? {}
}

Expand Down

0 comments on commit 9ede23d

Please sign in to comment.