Skip to content

Commit

Permalink
fix: add network hexadecimal chain id
Browse files Browse the repository at this point in the history
  • Loading branch information
0xtiti committed Sep 17, 2024
1 parent 8181f17 commit f5b0bf4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/AddNetworkButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export const AddNetworkButton = () => {

try {
await addNetwork({
chainId: chain as string,
chainId: '0x' + Number(chain)?.toString(16),
chainName: chainData?.metadata.name,
rpcUrls: chainData?.metadata.publicRpcs[0],
name: chainData?.baseToken.name,
Expand All @@ -39,6 +39,7 @@ export const AddNetworkButton = () => {
} catch (error) {
console.error('Failed to add network:', error);
alert(t('CHAIN.addNetworkFailed'));
setIsNetworkAdded(false);
}
};

Expand Down

0 comments on commit f5b0bf4

Please sign in to comment.