Repository navigation
Fix rlogin issues #570
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix rlogin issues #570
Changes from 2 commits
da262a1
bc14b9e
2028d33
78e1edc
ada69cd
9e7fe4e
fc11639
285fc62
c6e1866
6fd8c6c
3aa2950
4bd2480
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -1,18 +1,41 @@ | ||||||
| import { createRLogin } from '@rsksmart/rlogin-essentials'; | ||||||
| import RLogin from '@rsksmart/rlogin'; | ||||||
| import WalletConnectProvider from '@walletconnect/web3-provider'; | ||||||
|
jessgusclark marked this conversation as resolved.
Outdated
|
||||||
| // import { trezorProviderOptions } from '@rsksmart/rlogin-trezor-provider'; | ||||||
| // import { ledgerProviderOptions } from '@rsksmart/rlogin-ledger-provider'; | ||||||
|
|
||||||
| const trezorOptions = { | ||||||
| manifestEmail: 'info@iovlabs.org', | ||||||
| manifestAppUrl: process.env.REACT_APP_URL, | ||||||
| }; | ||||||
| const createRLogin = () => { | ||||||
| const rpcUrls = process.env.REACT_APP_ENVIRONMENT_ID === '30' ? { | ||||||
| 30: 'https://public-node.rsk.co', | ||||||
| } : { | ||||||
| 31: 'https://public-node.testnet.rsk.co', | ||||||
| }; | ||||||
|
|
||||||
| const isMainnet = process.env.REACT_APP_ENVIRONMENT_ID === '30'; | ||||||
| const providerOptions = Object.assign({ | ||||||
| walletconnect: { | ||||||
| package: WalletConnectProvider, | ||||||
| options: { | ||||||
| rpcUrls, | ||||||
| bridge: 'https://walletconnect-bridge.rifos.org/', | ||||||
| }, | ||||||
| }, | ||||||
| /* 'custom-ledger': ledgerProviderOptions, | ||||||
| 'custom-trezor': { | ||||||
| ...trezorProviderOptions, | ||||||
| options: { | ||||||
| manifestEmail: 'info@iovlabs.org', | ||||||
| manifestAppUrl: process.env.REACT_APP_URL, | ||||||
| }, | ||||||
| }, */ | ||||||
| }); | ||||||
|
|
||||||
| const rpcUrls = isMainnet ? { | ||||||
| 30: 'https://public-node.rsk.co', | ||||||
| } : { | ||||||
| 31: 'https://public-node.testnet.rsk.co', | ||||||
| }; | ||||||
| const supportedChains = Object.keys(rpcUrls).map(Number); | ||||||
|
|
||||||
| const rLogin = createRLogin(rpcUrls, trezorOptions); | ||||||
| return new RLogin(({ | ||||||
| cacheProvider: false, | ||||||
| providerOptions, | ||||||
| rpcUrls, | ||||||
| supportedChains, | ||||||
| })); | ||||||
|
jessgusclark marked this conversation as resolved.
Outdated
|
||||||
| }; | ||||||
|
|
||||||
| export default rLogin; | ||||||
| export default createRLogin(); | ||||||
|
||||||
| export default createRLogin(); | |
| export default createRLogin; |
Uh oh!
There was an error while loading. Please reload this page.