Skip to content

Commit

Permalink
enhancement: making the prompt more user friendly
Browse files Browse the repository at this point in the history
enhancement: using link button in prompt
  • Loading branch information
dafuga committed Aug 22, 2024
1 parent 7a19c1c commit fe51d5c
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,23 @@ export class WalletPluginMetaMask extends AbstractWalletPlugin implements Wallet
await this.setSnap()
if (!this.installedSnap) {
context?.ui?.prompt({
title: 'Snap not found',
body: `Plese visit ${this.setupPageUrl} for help setting up the snap.`,
elements: [],
title: 'Antelope Snap Setup Required',
body: `
It looks like the Antelope snap for MetaMask isn't installed yet.
Click the button below to go to our setup page:
`,
elements: [
{
type: 'button',
label: 'Go to Setup Page',
data: {
onClick: () => {
window.open(this.setupPageUrl, '_blank')
},
},
},
],
})
}
}
Expand Down

0 comments on commit fe51d5c

Please sign in to comment.