Skip to content

Commit

Permalink
fix: allow onboarding and unlocking wallet without Infura mainnet con…
Browse files Browse the repository at this point in the history
…nectivity (#23388)

Fixes issue where custom networks are not configurable until after
wallet is unlocked.

## Related issues
- Resolves #23333 
- #22713
- Origin: #20277
  • Loading branch information
legobeat authored Mar 13, 2024
1 parent 5349e6a commit ef0e1a8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ export const NetworkListMenu = ({ onClose }) => {
<Text>{t('showTestnetNetworks')}</Text>
<ToggleButton
value={showTestNetworks}
disabled={currentlyOnTestNetwork || !isUnlocked}
disabled={currentlyOnTestNetwork}
onToggle={handleToggle}
/>
</Box>
Expand All @@ -426,7 +426,6 @@ export const NetworkListMenu = ({ onClose }) => {
<Box padding={4}>
<ButtonSecondary
size={ButtonSecondarySize.Lg}
disabled={!isUnlocked}
startIconName={IconName.Add}
block
onClick={() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,9 @@ describe('NetworkListMenu', () => {
expect(queryByText('Chain 5')).not.toBeInTheDocument();
});

it('disables the "Add Network" button when MetaMask is locked', () => {
it('enables the "Add Network" button when MetaMask is locked', () => {
const { queryByText } = render(false, '0x5', 'chain5', false);
expect(queryByText('Add network')).toBeDisabled();
expect(queryByText('Add network')).toBeEnabled();
});

it('enables the "Add Network" button when MetaMask is true', () => {
Expand Down

0 comments on commit ef0e1a8

Please sign in to comment.