Skip to content

Commit

Permalink
Make it impossible to submit the send transaction form while incomplete
Browse files Browse the repository at this point in the history
... therefore avoid the crash on empty amount
  • Loading branch information
csillag committed Sep 30, 2022
1 parent 2ccc23e commit 3498dac
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/app/pages/AccountPage/Features/SendTransaction/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export function SendTransaction(props: SendTransactionProps) {

return (
<Box border={{ color: 'background-front-border', size: '1px' }} round="5px" background="background-front">
<Form>
<Form onSubmit={onSubmit}>
<Box fill gap="medium" pad="medium">
<FormField
htmlFor="recipient-id"
Expand Down Expand Up @@ -100,12 +100,7 @@ export function SendTransaction(props: SendTransactionProps) {
/>
</FormField>
<Box direction="row" justify="between" margin={{ top: 'medium' }}>
<Button
type="submit"
label={t('account.sendTransaction.send', 'Send')}
onClick={onSubmit}
primary
/>
<Button type="submit" label={t('account.sendTransaction.send', 'Send')} primary />
</Box>
</Box>
</Form>
Expand Down

0 comments on commit 3498dac

Please sign in to comment.