Skip to content

Commit

Permalink
Prettier and test
Browse files Browse the repository at this point in the history
  • Loading branch information
Adamj1232 committed May 14, 2024
1 parent 769ef99 commit d080804
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions packages/metamask/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ function metamask({
label: 'MetaMask',
getIcon: async () => (await import('./icon.js')).default,
getInterface: async ({ appMetadata }) => {
sdk = (window as any).mmsdk || sdk; // Prevent conflict with existing mmsdk instances
sdk = (window as any).mmsdk || sdk // Prevent conflict with existing mmsdk instances

if (sdk) {
// Prevent re-initializing instance as it causes issues with MetaMask sdk mobile provider.
Expand Down Expand Up @@ -76,13 +76,13 @@ function metamask({
_source: 'web3-onboard'
})

await sdk.init();
const provider = sdk.getProvider();
await sdk.init()
const provider = sdk.getProvider()

const _disconnect = sdk.disconnect
if(provider) {
(provider as any).disconnect = () => {
sdk?.terminate();
if (provider) {
;(provider as any).disconnect = () => {
sdk?.terminate()
}
}

Expand Down

0 comments on commit d080804

Please sign in to comment.