Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
playing around with useHighestPriorityConnector (#355)
* first pass at useHighestPriorityConnector * prefix increment * some cleanup * add some tests
- Loading branch information
1 parent
dfe6669
commit 0eeeadf
Showing
13 changed files
with
198 additions
and
53 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
node_modules/ | ||
packages/*/dist/ | ||
packages/example/.next/ | ||
.env.local |
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
INFURA_KEY=84842078b09946638c03157f83405213 | ||
ALCHEMY_KEY=_gg7wSSi0KMBsdKnGVfHDueq6xMB9EkC | ||
MAGIC_KEY=pk_live_1F99B3C570C9B08F |
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,4 +1,4 @@ | ||
import { initializeConnector } from '@web3-react/core' | ||
import { Frame } from '@web3-react/frame' | ||
|
||
export const [frame, hooks] = initializeConnector<Frame>((actions) => new Frame(actions, undefined, false)) | ||
export const [frame, hooks, store] = initializeConnector<Frame>((actions) => new Frame(actions, undefined, false)) |
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,17 +1,27 @@ | ||
import type { Web3ReactHooks } from '@web3-react/core' | ||
import type { Connector } from '@web3-react/types' | ||
import { frame, hooks as frameHooks } from './frame' | ||
import { hooks as magicHooks, magic } from './magic' | ||
import { hooks as metaMaskHooks, metaMask } from './metaMask' | ||
import { hooks as networkHooks, network } from './network' | ||
import { hooks as walletConnectHooks, walletConnect } from './walletConnect' | ||
import { hooks as walletLinkHooks, walletLink } from './walletLink' | ||
import type { Frame } from '@web3-react/frame' | ||
import type { Magic } from '@web3-react/magic' | ||
import type { MetaMask } from '@web3-react/metamask' | ||
import type { Network } from '@web3-react/network' | ||
import type { Web3ReactStore } from '@web3-react/types' | ||
import type { WalletConnect } from '@web3-react/walletconnect' | ||
import type { WalletLink } from '@web3-react/walletlink' | ||
import { frame, hooks as frameHooks, store as frameStore } from './frame' | ||
import { hooks as magicHooks, magic, store as magicStore } from './magic' | ||
import { hooks as metaMaskHooks, metaMask, store as metaMaskStore } from './metaMask' | ||
import { hooks as networkHooks, network, store as networkStore } from './network' | ||
import { hooks as walletConnectHooks, store as walletConnectStore, walletConnect } from './walletConnect' | ||
import { hooks as walletLinkHooks, store as walletLinkStore, walletLink } from './walletLink' | ||
|
||
export const connectors: [Connector, Web3ReactHooks][] = [ | ||
[network, networkHooks], | ||
[metaMask, metaMaskHooks], | ||
[walletConnect, walletConnectHooks], | ||
[walletLink, walletLinkHooks], | ||
[frame, frameHooks], | ||
[magic, magicHooks], | ||
export const connectors: [ | ||
MetaMask | WalletConnect | WalletLink | Network | Frame | Magic, | ||
Web3ReactHooks, | ||
Web3ReactStore | ||
][] = [ | ||
[metaMask, metaMaskHooks, metaMaskStore], | ||
[walletConnect, walletConnectHooks, walletConnectStore], | ||
[walletLink, walletLinkHooks, walletLinkStore], | ||
[network, networkHooks, networkStore], | ||
[frame, frameHooks, frameStore], | ||
[magic, magicHooks, magicStore], | ||
] |
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,4 +1,4 @@ | ||
import { initializeConnector } from '@web3-react/core' | ||
import { MetaMask } from '@web3-react/metamask' | ||
|
||
export const [metaMask, hooks] = initializeConnector<MetaMask>((actions) => new MetaMask(actions)) | ||
export const [metaMask, hooks, store] = initializeConnector<MetaMask>((actions) => new MetaMask(actions)) |
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
0eeeadf
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs: