Skip to content

Commit b647e76

Browse files
committed
[DDW-1076] Wait for in flights validations
1 parent c18ef26 commit b647e76

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

source/renderer/app/components/wallet/WalletSendForm.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,8 @@ class WalletSendForm extends Component<Props, State> {
275275
return;
276276
}
277277

278+
await this.waitForInFlightValidations();
279+
278280
const adaAmountField = this.form.$('adaAmount');
279281
const adaAmount = new BigNumber(adaAmountField.value || 0);
280282

@@ -290,6 +292,11 @@ class WalletSendForm extends Component<Props, State> {
290292
});
291293
};
292294

295+
waitForInFlightValidations = () =>
296+
new Promise((resolve) =>
297+
setTimeout(resolve, this.props.validationDebounceWait)
298+
);
299+
293300
handleOnReset = () => {
294301
// Cancel all debounced field validations
295302
this.form.each((field) => {

source/renderer/app/containers/wallet/dialogs/send-confirmation/SendConfirmation.view.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import {
2323
isPasswordValid,
2424
} from './helpers';
2525
import styles from './styles.scss';
26+
import { toFixedUserFormat } from '../../../../utils/formatters';
2627

2728
const View = ({
2829
intl,
@@ -106,7 +107,7 @@ const View = ({
106107
className={styles.root}
107108
closeButton={<DialogCloseButton />}
108109
>
109-
<b>ada amount: {adaAmount} </b>
110+
<b>ada amount: {toFixedUserFormat(adaAmount, 0)} </b>
110111
<br />
111112
<b>inputs:</b>
112113
<p

0 commit comments

Comments
 (0)