Skip to content

Commit

Permalink
fix: fix stuck after nonce too low error (#10049)
Browse files Browse the repository at this point in the history
<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->

## **Description**

<!--
Write a short description of the changes included in this pull request,
also include relevant motivation and context. Have in mind the following
questions:
1. What is the reason for the change?
2. What is the improvement/solution?
-->

This PR aims to fix send flow after getting `nonce too low` error. 

## **Related issues**

Fixes: #9729

## **Manual testing steps**

1. Go to send flow
2. Before send, change it to lower nonce to get error
3. Get error and see it's redirected to the latest screen you're on
4. Try send flow again
5. It should successfully send 

## **Screenshots/Recordings**

<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->

### **Before**

Forwarded from tests

https://github.com/MetaMask/metamask-mobile/assets/104780023/655e0a17-0768-422b-a337-7909bc560e84

### **After**


https://github.com/MetaMask/metamask-mobile/assets/7644512/a1265c59-b870-4fab-9b29-a2657cb78008

## **Pre-merge author checklist**

- [ ] I’ve followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile
Coding
Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [ ] I've completed the PR template to the best of my ability
- [ ] I’ve included tests if applicable
- [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [ ] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

## **Pre-merge reviewer checklist**

- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.
  • Loading branch information
OGPoyraz authored Jun 24, 2024
1 parent ae94f09 commit a6fa898
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/components/Views/confirmations/SendFlow/Confirm/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -974,6 +974,8 @@ class Confirm extends PureComponent {
MetaMetricsEvents.QR_HARDWARE_TRANSACTION_CANCELED,
);
}
resetTransaction();
navigation?.dangerouslyGetParent()?.pop();
}
this.setState({ transactionConfirmed: false });
};
Expand Down

0 comments on commit a6fa898

Please sign in to comment.