Skip to content

Commit b991cd3

Browse files
fix: Avoid nonce flicker when transaction is submitted
1 parent b0466bd commit b991cd3

File tree

2 files changed

+0
-26
lines changed

2 files changed

+0
-26
lines changed

ui/pages/confirmations/components/confirm/footer/footer.test.tsx

-24
Original file line numberDiff line numberDiff line change
@@ -125,20 +125,8 @@ describe('ConfirmFooter', () => {
125125
// TODO: Replace `any` with type
126126
// eslint-disable-next-line @typescript-eslint/no-explicit-any
127127
.mockImplementation(() => ({} as any));
128-
const updateCustomNonceSpy = jest
129-
.spyOn(Actions, 'updateCustomNonce')
130-
// TODO: Replace `any` with type
131-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
132-
.mockImplementation(() => ({} as any));
133-
const setNextNonceSpy = jest
134-
.spyOn(Actions, 'setNextNonce')
135-
// TODO: Replace `any` with type
136-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
137-
.mockImplementation(() => ({} as any));
138128
fireEvent.click(cancelButton);
139129
expect(rejectSpy).toHaveBeenCalled();
140-
expect(updateCustomNonceSpy).toHaveBeenCalledWith('');
141-
expect(setNextNonceSpy).toHaveBeenCalledWith('');
142130
});
143131

144132
it('invoke required actions when submit button is clicked', () => {
@@ -149,20 +137,8 @@ describe('ConfirmFooter', () => {
149137
// TODO: Replace `any` with type
150138
// eslint-disable-next-line @typescript-eslint/no-explicit-any
151139
.mockImplementation(() => ({} as any));
152-
const updateCustomNonceSpy = jest
153-
.spyOn(Actions, 'updateCustomNonce')
154-
// TODO: Replace `any` with type
155-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
156-
.mockImplementation(() => ({} as any));
157-
const setNextNonceSpy = jest
158-
.spyOn(Actions, 'setNextNonce')
159-
// TODO: Replace `any` with type
160-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
161-
.mockImplementation(() => ({} as any));
162140
fireEvent.click(submitButton);
163141
expect(resolveSpy).toHaveBeenCalled();
164-
expect(updateCustomNonceSpy).toHaveBeenCalledWith('');
165-
expect(setNextNonceSpy).toHaveBeenCalledWith('');
166142
});
167143

168144
it('displays a danger "Confirm" button there are danger alerts', async () => {

ui/pages/confirmations/components/confirm/footer/footer.tsx

-2
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,9 @@ import useAlerts from '../../../../../hooks/useAlerts';
2020
import {
2121
rejectPendingApproval,
2222
resolvePendingApproval,
23-
setNextNonce,
2423
///: BEGIN:ONLY_INCLUDE_IF(build-main,build-beta,build-flask)
2524
updateAndApproveTx,
2625
///: END:ONLY_INCLUDE_IF
27-
updateCustomNonce,
2826
} from '../../../../../store/actions';
2927
import { isSignatureTransactionType } from '../../../utils';
3028
import { useConfirmContext } from '../../../context/confirm';

0 commit comments

Comments
 (0)