Skip to content

Commit e7a92c8

Browse files
committed
fix: turn off storage for tlink views
1 parent bd58c7c commit e7a92c8

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

javascript/tokenscript-viewer/src/components/app/app.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ export class AppRoot {
101101

102102
constructor() {
103103

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

107107
this.tsEngine = new TokenScriptEngine(
@@ -110,7 +110,7 @@ export class AppRoot {
110110
() => this.attestationStorageAdapter,
111111
() => this.tsLocalStorageAdapter,
112112
{
113-
noLocalStorage: this.viewerType === "opensea" || this.params.has("___bypassCache"),
113+
noLocalStorage: this.viewerType === "opensea" || this.viewerType.indexOf("tlink") === 0 || this.params.has("___bypassCache"),
114114
trustedKeys: [
115115
{
116116
issuerName: "Smart Token Labs",

javascript/tokenscript-viewer/src/components/viewers/util/getTokenScriptWithProvidedTokenContext.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export async function getTokenScriptWithProvidedTokenContext(
2727
providedTokenIdDetails: ITokenDetail;
2828

2929
constructor(engine: TokenScriptEngine) {
30-
super();
30+
super(!engine.config.noLocalStorage);
3131
this.engine = engine;
3232
}
3333

0 commit comments

Comments
 (0)