Skip to content

Commit

Permalink
fix: turn off storage for tlink views
Browse files Browse the repository at this point in the history
  • Loading branch information
micwallace committed Oct 22, 2024
1 parent bd58c7c commit e7a92c8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions javascript/tokenscript-viewer/src/components/app/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ export class AppRoot {

constructor() {

if (this.viewerType !== "opensea")
if (this.viewerType !== "opensea" && this.viewerType.indexOf("tlink") === -1)
dbProvider.checkCompatibility();

this.tsEngine = new TokenScriptEngine(
Expand All @@ -110,7 +110,7 @@ export class AppRoot {
() => this.attestationStorageAdapter,
() => this.tsLocalStorageAdapter,
{
noLocalStorage: this.viewerType === "opensea" || this.params.has("___bypassCache"),
noLocalStorage: this.viewerType === "opensea" || this.viewerType.indexOf("tlink") === 0 || this.params.has("___bypassCache"),
trustedKeys: [
{
issuerName: "Smart Token Labs",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export async function getTokenScriptWithProvidedTokenContext(
providedTokenIdDetails: ITokenDetail;

constructor(engine: TokenScriptEngine) {
super();
super(!engine.config.noLocalStorage);
this.engine = engine;
}

Expand Down

0 comments on commit e7a92c8

Please sign in to comment.