Skip to content

Commit

Permalink
devnet switch fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Alekh-Srivastava committed Dec 19, 2023
1 parent 4c8743e commit ab74be6
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions packages/site/src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -529,8 +529,18 @@ if(forecastCronJobActive) {
setIsMainnet(true);
} else {
setIsMainnet(false);
const updatedBalance = await sendGetBalance(network);
setBalance(updatedBalance);
try{
const updatedBalance = await sendGetBalance(network);
setBalance(updatedBalance);
}
catch (error){
const accountinfo: any = await sendGetAccount(password, network);
const { accountInfo } = accountinfo;
const { address, bal } = accountInfo;
setAddress(address);
setBalance(bal);
}

}
};
return (
Expand Down

0 comments on commit ab74be6

Please sign in to comment.