Skip to content

Commit

Permalink
mfix
Browse files Browse the repository at this point in the history
  • Loading branch information
cuteolaf committed Aug 15, 2023
1 parent 4450af4 commit 38c2a0b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 1 addition & 3 deletions src/components/Modals/AddAddress/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ export const AddAddressModal = ({ open, onClose }: AddAddressModalProps) => {
</MenuItem>
))}
</TextField>
{networkId !== undefined &&
{networkId !== undefined && (
<div>
<FormHelperText
sx={{
Expand All @@ -141,8 +141,6 @@ export const AddAddressModal = ({ open, onClose }: AddAddressModalProps) => {
<span>{`Ss58 prefix: ${networks[networkId].ss58Prefix}`}</span>
</FormHelperText>
</div>
) : (
<></>
)}
</FormControl>
<FormControl className='form-item'>
Expand Down
4 changes: 3 additions & 1 deletion src/contracts/identity/context.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,9 @@ const IdentityContractProvider = ({ children }: Props) => {
const getChainInfo = async (
rpcUrls: string[]
): Promise<NetworkConsts | null> => {
const rpc = rpcUrls[0];
const count = rpcUrls.length;
const rpcIndex = Math.min(Math.floor(Math.random() * count), count - 1);
const rpc = rpcUrls[rpcIndex];
try {
const provider = new WsProvider(rpc);
const api = new ApiPromise({ provider, rpc: jsonrpc });
Expand Down

0 comments on commit 38c2a0b

Please sign in to comment.