Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/components/navBar/ChainSelector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export function ChainSelector({ className }: { className?: string }) {
await switchChain(wagmiAdapter.wagmiConfig, { chainId });
};

const filteredChains = getSupportedChains();
const chains = getSupportedChains();

return (
<Select
Expand All @@ -29,7 +29,7 @@ export function ChainSelector({ className }: { className?: string }) {
<SelectValue placeholder="Select Chain" />
</SelectTrigger>
<SelectContent className="border-grey-600">
{filteredChains.map((chain) => (
{chains.map((chain) => (
<SelectItem key={chain.id} value={chain.id.toString()}>
<img src={chain.icon} className="size-4" alt="" /> {chain.name}
</SelectItem>
Expand Down
18 changes: 17 additions & 1 deletion src/config/config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import arbitrumIcon from '@/assets/chain-icons/arbitrum.svg';
import iexecLogo from '@/assets/iexec-logo.svg';
import { bellecour, arbitrum } from '../utils/wagmiNetworks';
import { bellecour, arbitrum, arbitrumSepolia } from '../utils/wagmiNetworks';

export const ITEMS_PER_PAGE = 6;

Expand All @@ -11,6 +11,7 @@ export const CONTACT_URL =
// Chain ID constants
export const BELLECOUR_CHAIN_ID = 134;
export const ARBITRUM_CHAIN_ID = 42161;
export const ARBITRUM_SEPOLIA_CHAIN_ID = 421614;

// Workerpool configuration
export const WORKERPOOL_ADDRESS_OR_ENS = 'prod-v8-learn.main.pools.iexec.eth';
Expand Down Expand Up @@ -58,4 +59,19 @@ export const SUPPORTED_CHAINS = [
web3telegram: '0x53AFc09a647e7D5Fa9BDC784Eb3623385C45eF89',
},
},
{
id: ARBITRUM_SEPOLIA_CHAIN_ID,
name: 'Arbitrum Sepolia',
slug: 'arbitrum-sepolia-testnet',
color: '#28A0F080',
icon: arbitrumIcon,
blockExplorerUrl: 'https://sepolia.arbiscan.io/',
subgraphUrl: {
poco: 'https://thegraph.arbitrum-sepolia-testnet.iex.ec/api/subgraphs/id/2GCj8gzLCihsiEDq8cYvC5nUgK6VfwZ6hm3Wj8A3kcxz',
dataprotector:
'https://thegraph.arbitrum-sepolia-testnet.iex.ec/api/subgraphs/id/5YjRPLtjS6GH6bB4yY55Qg4HzwtRGQ8TaHtGf9UBWWd',
},
wagmiNetwork: arbitrumSepolia,
tokenSymbol: 'RLC',
},
] as const;
11 changes: 7 additions & 4 deletions src/externals/iexecSdkClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ export async function initIExecSDKs({ connector }: { connector?: Connector }) {
return;
}

const dataProtectorParent = new IExecDataProtector(provider);
const dataProtectorParent = new IExecDataProtector(provider, {
allowExperimentalNetworks: true,
});

iExecDataProtectorCore = dataProtectorParent.core;
iExecDataProtectorSharing = dataProtectorParent.sharing;
Expand All @@ -63,15 +65,16 @@ export async function initIExecSDKs({ connector }: { connector?: Connector }) {
});
DATA_PROTECTOR_SHARING_CLIENT_RESOLVES.length = 0;

iExecWeb3mail = new IExecWeb3mail(provider);
iExecWeb3mail = new IExecWeb3mail(provider, {
allowExperimentalNetworks: true,
});
WEB3MAIL_CLIENT_RESOLVES.forEach((resolve) => {
return resolve(iExecWeb3mail);
});
WEB3MAIL_CLIENT_RESOLVES.length = 0;

//TODO: Remove hardcoded IPFS node when new IExecWeb3telegram version is released
iExecWeb3telegram = new IExecWeb3telegram(provider, {
ipfsNode: 'https://ipfs-upload.v8-bellecour.iex.ec',
allowExperimentalNetworks: true,
});
WEB3TELEGRAM_CLIENT_RESOLVES.forEach((resolve) => {
return resolve(iExecWeb3telegram);
Expand Down
2 changes: 1 addition & 1 deletion src/hooks/useWatchAccount.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ export function useWatchAccount() {
setChainId(accountChain.id);
}

cleanIExecSDKs();
// Update dataProtector client
if (status === 'connected') {
initIExecSDKs({ connector });
return;
}
cleanIExecSDKs();
}, [
connector,
status,
Expand Down
9 changes: 7 additions & 2 deletions src/utils/wagmiNetworks.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
import { AppKitNetwork, arbitrum } from '@reown/appkit/networks';
import {
AppKitNetwork,
arbitrum,
arbitrumSepolia,
} from '@reown/appkit/networks';

export { arbitrum } from '@reown/appkit/networks';
export { arbitrum, arbitrumSepolia } from '@reown/appkit/networks';

export const bellecour: AppKitNetwork = {
id: 0x86,
Expand All @@ -26,6 +30,7 @@ export const bellecour: AppKitNetwork = {
const wagmiNetworks = {
bellecour,
arbitrum,
arbitrumSepolia,
};

export default wagmiNetworks;