Skip to content

Commit

Permalink
Add a button to trigger a fatal error in e2e page
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaw3d committed Apr 25, 2023
1 parent a224491 commit 8acf260
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/app/pages/E2EPage/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,18 @@ import React, { useEffect } from 'react'
import { useNavigate } from 'react-router-dom'
import * as monitor from 'vendors/monitor'
import * as oasisscan from 'vendors/oasisscan'
import { useDispatch } from 'react-redux'
import { walletActions } from '../../state/wallet'

export function E2EPage() {
return (
<div>
<TestVendors></TestVendors>
<br />
<TestUnsafeInputs></TestUnsafeInputs>
<br />
<TriggerFatalError></TriggerFatalError>
<br />
</div>
)
}
Expand Down Expand Up @@ -103,3 +109,17 @@ function UnsafePasswordField(props: {
</FormField>
)
}

function TriggerFatalError() {
const dispatch = useDispatch()
return (
<div>
<Button
label="Trigger fatal saga error"
onClick={() => {
dispatch(walletActions.openWalletFromPrivateKey({ privateKey: '0xAA', choosePassword: undefined }))
}}
/>
</div>
)
}

0 comments on commit 8acf260

Please sign in to comment.