Skip to content

Commit

Permalink
fix: chainId
Browse files Browse the repository at this point in the history
  • Loading branch information
heisenberg-2077 committed Oct 20, 2023
1 parent f2a3907 commit cfb2be6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/ui/views/ImportCoboArgus/ImportCoboArgus.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ type Type = 'select-chain' | 'add-address' | 'select-address';
export const ImportCoboArgus = () => {
const { state } = useLocation<{
address: string;
chainId: number;
chainId: number | string;
}>();
const { t } = useTranslation();
const [selectedChain, setSelectedChain] = React.useState<CHAINS_ENUM>();
Expand Down Expand Up @@ -88,7 +88,9 @@ export const ImportCoboArgus = () => {
React.useEffect(() => {
if (!state) return;
const { chainId, address } = state;
const chain = findChainByID(chainId);
const chain = findChainByID(
typeof chainId === 'number' ? chainId : parseInt(chainId, 10)
);

if (chain) {
setStep('add-address');
Expand Down

0 comments on commit cfb2be6

Please sign in to comment.