Skip to content

Commit f4a5004

Browse files
committed
fix: deeplink for non-owned tokens
1 parent 0f989a9 commit f4a5004

File tree

1 file changed

+9
-2
lines changed
  • javascript/tokenscript-viewer/src/components/common/tokens-grid

1 file changed

+9
-2
lines changed

javascript/tokenscript-viewer/src/components/common/tokens-grid/tokens-grid.tsx

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,19 +146,26 @@ export class TokensGrid {
146146
}
147147

148148
if (cardRes.card.type === "onboarding"){
149+
const reason = await cardRes.card.isEnabledOrReason();
149150
if (
150-
await cardRes.card.isEnabledOrReason() === true
151+
reason === true
151152
) {
152153
this.urlActionInvoked = true;
153154
setTimeout(() => this.showCard(cardRes.card), 100);
154155
return;
155156
}
157+
this.showToast.emit({
158+
type: 'error',
159+
title: "The card is not available",
160+
description: "The provided card is not available" + (reason !== false ? ": "+reason : '')
161+
});
162+
return;
156163
}
157164

158165
if (!this.currentTokensFlat.length)
159166
return;
160167

161-
for (let token of this.currentTokensFlat){
168+
for (let token of [...this.currentTokensFlat, ...this.notOwnedTokens]){
162169

163170
const tokenId = ("tokenId" in token) ? token.tokenId : undefined;
164171

0 commit comments

Comments
 (0)