Skip to content

Commit

Permalink
fix 'requests a switch chain approval' scenario
Browse files Browse the repository at this point in the history
  • Loading branch information
jiexi committed Dec 9, 2024
1 parent 63b99eb commit bf33584
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,9 @@ describe('Ethereum Chain Utils', () => {
});

describe('with no existing CAIP-25 permission', () => {
it('requests a switch chain approval', async () => {
it('requests a switch chain approval if isAddFlow: false', async () => {
const { mocks, switchChain } = createMockedSwitchChain();
mocks.isAddFlow = false;
await switchChain('example.com', '0x1', 'mainnet', 'approvalFlowId');

expect(mocks.requestPermissionApprovalForOrigin).toHaveBeenCalledWith({
Expand Down

0 comments on commit bf33584

Please sign in to comment.