Skip to content

Commit

Permalink
Add: wallet saga update onboard supported chains array
Browse files Browse the repository at this point in the history
  • Loading branch information
rdig committed Jul 17, 2024
1 parent fc28ca0 commit 87770b6
Showing 1 changed file with 25 additions and 1 deletion.
26 changes: 25 additions & 1 deletion src/redux/sagas/wallet/onboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ import {
TOKEN_DATA,
GANACHE_NETWORK,
GANACHE_LOCAL_RPC_URL,
ARBITRUM_NETWORK,
ARBITRUM_SEPOLIA_NETWORK,
GNOSIS_NETWORK,
} from '~constants/index.ts';
import { Network } from '~types/network.ts';
import { getChainIdAsHex } from '~utils/chainId.ts';
Expand Down Expand Up @@ -99,7 +102,7 @@ const onboardConfig: InitOptions = {
[ProviderLabel.Zeal]: false,
[ProviderLabel.Phantom]: false,
[ProviderLabel.OKXWallet]: false,
[ProviderLabel.Zerion]: false,
[ProviderLabel.Zerion]: true, // Enabled
[ProviderLabel.Rainbow]: false,
[ProviderLabel.SafePal]: false,
[ProviderLabel.DeFiWallet]: false,
Expand Down Expand Up @@ -128,6 +131,27 @@ const onboardConfig: InitOptions = {
label: GANACHE_NETWORK.shortName,
rpcUrl: GANACHE_LOCAL_RPC_URL,
},
// arbitrum
{
// web3-onboard formats chain id as hex strings
id: getChainIdAsHex(ARBITRUM_NETWORK.chainId),
token: TOKEN_DATA[Network.ArbitrumOne].symbol,
label: ARBITRUM_NETWORK.shortName,
},
// arbitrum sepolia (testnet)
{
// web3-onboard formats chain id as hex strings
id: getChainIdAsHex(ARBITRUM_SEPOLIA_NETWORK.chainId),
token: TOKEN_DATA[Network.ArbitrumSepolia].symbol,
label: ARBITRUM_SEPOLIA_NETWORK.shortName,
},
// gnosis
{
// web3-onboard formats chain id as hex strings
id: getChainIdAsHex(GNOSIS_NETWORK.chainId),
token: TOKEN_DATA[Network.Gnosis].symbol,
label: GNOSIS_NETWORK.shortName,
},
],
accountCenter: {
desktop: { enabled: false },
Expand Down

0 comments on commit 87770b6

Please sign in to comment.