-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve chains support and error messages
- Loading branch information
Showing
3 changed files
with
10 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,18 @@ | ||
import { InjectedConnector } from '@web3-react/injected-connector' | ||
import { WalletLinkConnector } from '@web3-react/walletlink-connector' | ||
|
||
import utilsConfig from './utilsConfig.json' | ||
|
||
const supportedChainIds = Object.keys(utilsConfig).map(k => Number.parseInt(k)) | ||
|
||
const environment = process.env.NEXT_PUBLIC_ENVIRONMENT | ||
const nodeUrl = process.env.NEXT_PUBLIC_NODE_URL | ||
export const injected = new InjectedConnector({ | ||
supportedChainIds: [43111, 743111] | ||
supportedChainIds | ||
}) | ||
|
||
export const walletlink = new WalletLinkConnector({ | ||
url: nodeUrl, | ||
appName: `Pure Finance${environment ? ` ${environment}` : ''}` | ||
appName: `Pure Finance${environment ? ` ${environment}` : ''}`, | ||
supportedChainIds, | ||
url: nodeUrl | ||
}) |