Skip to content

Commit

Permalink
Fix: prompt -> confirm (#3939)
Browse files Browse the repository at this point in the history
* Fix: prompt -> confirm

* Update unit test
  • Loading branch information
katspaugh authored Jul 12, 2024
1 parent 25b58bf commit cdec625
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ describe('useSafeWalletProvider', () => {
} as unknown as router.NextRouter)

// @ts-expect-error - auto accept prompt
jest.spyOn(window, 'prompt').mockReturnValue(true)
jest.spyOn(window, 'confirm').mockReturnValue(true)

const { result } = renderHook(() => _useTxFlowApi('1', '0x1234567890000000000000000000000000000000'), {
initialReduxState: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ export const _useTxFlowApi = (chainId: string, safeAddress: string): WalletSDK |
throw new Error(`Chain ${chainId} not supported`)
}

if (prompt(`${appInfo.name} wants to switch to ${cfg.shortName}. Do you want to continue?`)) {
if (confirm(`${appInfo.name} wants to switch to ${cfg.shortName}. Do you want to continue?`)) {
router.push({
pathname: AppRoutes.index,
query: {
Expand Down

0 comments on commit cdec625

Please sign in to comment.