forked from MetaMask/template-snap-monorepo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Show Reconnect button if the installed snap is a local snap (MetaMask#10
) * Show Connect button if the installed snap is a local snap * show a reconnect button instead of the regular connect button * apply requested changes * fix fullwidth logic
- Loading branch information
1 parent
3bfcb8a
commit 67c0ff3
Showing
9 changed files
with
89 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
export { type GetSnapsResponse } from './snap'; | ||
export { type GetSnapsResponse, type Snap } from './snap'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
export type GetSnapsResponse = { | ||
[k: string]: { | ||
permissionName?: string; | ||
id?: string; | ||
version?: string; | ||
initialPermissions?: { [k: string]: unknown }; | ||
}; | ||
export type GetSnapsResponse = Record<string, Snap>; | ||
|
||
export type Snap = { | ||
permissionName: string; | ||
id: string; | ||
version: string; | ||
initialPermissions: Record<string, unknown>; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { Snap } from '../types'; | ||
import { isLocalSnap } from './snap'; | ||
|
||
export const shouldDisplayReconnectButton = (installedSnap?: Snap) => | ||
installedSnap && isLocalSnap(installedSnap?.id); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters