Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Error prompt when canceling a transaction #21261

Closed
benjisclowder opened this issue Oct 9, 2023 · 1 comment
Closed

[Bug]: Error prompt when canceling a transaction #21261

benjisclowder opened this issue Oct 9, 2023 · 1 comment
Labels
regression-RC DEPRECATED: Please use "regresssion-RC-x.y.z" label instead regression-RC-11.3.0 release-11.3.0 Issue or pull request that will be included in release 11.3.0 release-blocker This bug is blocking the next release team-confirmations-secure-ux DEPRECATED: please use "team-confirmations" label instead team-confirmations-system DEPRECATED: please use "team-confirmations" label instead type-bug

Comments

@benjisclowder
Copy link
Contributor

Describe the bug

Error is prompted in the console when attempting to cancel a transaction.

Expected behavior

No errors are shown.

Screenshots

cancel.transaction.mov

Steps to reproduce

  1. Open MetaMask and enter your password
  2. Switch to a test network: e.g. Goerli
  3. Proceed to the send flow
  4. Send 0.1 ETH to an address: e.g. 0x3D0b9b4056D86f8d9889B2C8e26FFCedC62D3036
  5. Edit the gas settings in Market --> Advanced: Max base fee to 0.0000001 and Priority Fee to 0.0000001
  6. Confirm the transaction
  7. Cancel transaction

Error messages or log output

Error in event handler: TypeError: Cannot destructure property 'id' of 'e[(e.length - 1)]' as it is undefined.
  at chrome-extension://dofbkecmjglnaakpmejcnfefopfjickf/ui-12.js:1:8747
  at s.handleResponse (chrome-extension://dofbkecmjglnaakpmejcnfefopfjickf/ui-12.js:1:81072)
  at a.emit (chrome-extension://dofbkecmjglnaakpmejcnfefopfjickf/common-3.js:18:111667)
  at v (chrome-extension://dofbkecmjglnaakpmejcnfefopfjickf/common-5.js:1:293993)
  at w (chrome-extension://dofbkecmjglnaakpmejcnfefopfjickf/common-5.js:1:293808)
  at y.push (chrome-extension://dofbkecmjglnaakpmejcnfefopfjickf/common-5.js:1:294622)
  at t.exports._write (chrome-extension://dofbkecmjglnaakpmejcnfefopfjickf/common-5.js:1:122084)
  at y (chrome-extension://dofbkecmjglnaakpmejcnfefopfjickf/common-5.js:1:307233)
  at chrome-extension://dofbkecmjglnaakpmejcnfefopfjickf/common-5.js:1:310417
  at g.write (chrome-extension://dofbkecmjglnaakpmejcnfefopfjickf/common-5.js:1:310444)
  at i.h (chrome-extension://dofbkecmjglnaakpmejcnfefopfjickf/common-5.js:3:107261)
  at a.emit (chrome-extension://dofbkecmjglnaakpmejcnfefopfjickf/common-3.js:18:111667)
  at S (chrome-extension://dofbkecmjglnaakpmejcnfefopfjickf/common-5.js:3:102066)
  at x (chrome-extension://dofbkecmjglnaakpmejcnfefopfjickf/common-5.js:3:101896)
  at T.push (chrome-extension://dofbkecmjglnaakpmejcnfefopfjickf/common-5.js:3:102683)
  at i._onMessage (chrome-extension://dofbkecmjglnaakpmejcnfefopfjickf/common-3.js:18:115216)
  at chrome-extension://dofbkecmjglnaakpmejcnfefopfjickf/common-3.js:18:115012

Version

11.3.0

Build type

None

Browser

Chrome, Firefox

Operating system

MacOS

Hardware wallet

No response

Additional context

No response

Severity

No response

@benjisclowder benjisclowder added type-bug release-blocker This bug is blocking the next release regression-RC DEPRECATED: Please use "regresssion-RC-x.y.z" label instead team-confirmations-system DEPRECATED: please use "team-confirmations" label instead release-11.3.0 Issue or pull request that will be included in release 11.3.0 labels Oct 9, 2023
@benjisclowder benjisclowder changed the title [Bug]: Error prompt when cancelling a transaction [Bug]: Error prompt when canceling a transaction Oct 9, 2023
@matthewwalsh0 matthewwalsh0 added the team-confirmations-secure-ux DEPRECATED: please use "team-confirmations" label instead label Oct 9, 2023
segun added a commit that referenced this issue Oct 11, 2023
## **Description**
Error is prompted in the console when attempting to cancel a transaction
and transaction is not cancelled.

The error comes from a call to selector where we are passing in
`state.metamask` object instead of state object. To fix, we pass in an
object where `metamask` is a property and value is `state.metamask`

## **Expected behavior**

No errors are shown and transaction is cancelled.

## **Manual testing steps**

1. Open MetaMask and enter your password
2. Switch to a test network: e.g. Goerli
3. Proceed to the send flow
4. Send 0.1 ETH to an address: e.g.
0x3D0b9b4056D86f8d9889B2C8e26FFCedC62D3036
5. Edit the gas settings in Market --> Advanced: Max base fee to
0.0000001 and Priority Fee to 0.0000001
6. Confirm the transaction
7. Cancel transaction

## **Screenshots/Recordings**

### **Before**


https://github.com/MetaMask/metamask-extension/assets/120041701/d371c902-b0bb-4e52-b152-549f1a487375

### **After**


https://github.com/MetaMask/metamask-extension/assets/44811/40dd2071-a9ca-4d31-9241-dfc76aaacd9f


## **Related issues**

_Fixes #21261

## **Pre-merge author checklist**

- [x] I’ve followed [MetaMask Coding
Standards](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/CODING_GUIDELINES.md).
- [x] I've clearly explained:
  - [x] What problem this PR is solving.
  - [x] How this problem was solved.
  - [x] How reviewers can test my changes.
- [x] I’ve indicated what issue this PR is linked to: Fixes #???
- [ ] I’ve included tests if applicable.
- [x] I’ve documented any added code.
- [x] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/LABELING_GUIDELINES.md)).
- [x] I’ve properly set the pull request status:
  - [x] In case it's not yet "ready for review", I've set it to "draft".
- [x] In case it's "ready for review", I've changed it from "draft" to
"non-draft".

## **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.

Signed-off-by: Akintayo A. Olusegun <[email protected]>
@danjm
Copy link
Contributor

danjm commented Oct 11, 2023

fixed by #21269

@danjm danjm closed this as completed Oct 11, 2023
danjm pushed a commit that referenced this issue Oct 18, 2023
## **Description**
Error is prompted in the console when attempting to cancel a transaction
and transaction is not cancelled.

The error comes from a call to selector where we are passing in
`state.metamask` object instead of state object. To fix, we pass in an
object where `metamask` is a property and value is `state.metamask`

## **Expected behavior**

No errors are shown and transaction is cancelled.

## **Manual testing steps**

1. Open MetaMask and enter your password
2. Switch to a test network: e.g. Goerli
3. Proceed to the send flow
4. Send 0.1 ETH to an address: e.g.
0x3D0b9b4056D86f8d9889B2C8e26FFCedC62D3036
5. Edit the gas settings in Market --> Advanced: Max base fee to
0.0000001 and Priority Fee to 0.0000001
6. Confirm the transaction
7. Cancel transaction

## **Screenshots/Recordings**

### **Before**


https://github.com/MetaMask/metamask-extension/assets/120041701/d371c902-b0bb-4e52-b152-549f1a487375

### **After**


https://github.com/MetaMask/metamask-extension/assets/44811/40dd2071-a9ca-4d31-9241-dfc76aaacd9f


## **Related issues**

_Fixes #21261

## **Pre-merge author checklist**

- [x] I’ve followed [MetaMask Coding
Standards](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/CODING_GUIDELINES.md).
- [x] I've clearly explained:
  - [x] What problem this PR is solving.
  - [x] How this problem was solved.
  - [x] How reviewers can test my changes.
- [x] I’ve indicated what issue this PR is linked to: Fixes #???
- [ ] I’ve included tests if applicable.
- [x] I’ve documented any added code.
- [x] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/LABELING_GUIDELINES.md)).
- [x] I’ve properly set the pull request status:
  - [x] In case it's not yet "ready for review", I've set it to "draft".
- [x] In case it's "ready for review", I've changed it from "draft" to
"non-draft".

## **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.

Signed-off-by: Akintayo A. Olusegun <[email protected]>
k-g-j pushed a commit that referenced this issue Nov 1, 2023
## **Description**
Error is prompted in the console when attempting to cancel a transaction
and transaction is not cancelled.

The error comes from a call to selector where we are passing in
`state.metamask` object instead of state object. To fix, we pass in an
object where `metamask` is a property and value is `state.metamask`

## **Expected behavior**

No errors are shown and transaction is cancelled.

## **Manual testing steps**

1. Open MetaMask and enter your password
2. Switch to a test network: e.g. Goerli
3. Proceed to the send flow
4. Send 0.1 ETH to an address: e.g.
0x3D0b9b4056D86f8d9889B2C8e26FFCedC62D3036
5. Edit the gas settings in Market --> Advanced: Max base fee to
0.0000001 and Priority Fee to 0.0000001
6. Confirm the transaction
7. Cancel transaction

## **Screenshots/Recordings**

### **Before**


https://github.com/MetaMask/metamask-extension/assets/120041701/d371c902-b0bb-4e52-b152-549f1a487375

### **After**


https://github.com/MetaMask/metamask-extension/assets/44811/40dd2071-a9ca-4d31-9241-dfc76aaacd9f


## **Related issues**

_Fixes #21261

## **Pre-merge author checklist**

- [x] I’ve followed [MetaMask Coding
Standards](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/CODING_GUIDELINES.md).
- [x] I've clearly explained:
  - [x] What problem this PR is solving.
  - [x] How this problem was solved.
  - [x] How reviewers can test my changes.
- [x] I’ve indicated what issue this PR is linked to: Fixes #???
- [ ] I’ve included tests if applicable.
- [x] I’ve documented any added code.
- [x] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/LABELING_GUIDELINES.md)).
- [x] I’ve properly set the pull request status:
  - [x] In case it's not yet "ready for review", I've set it to "draft".
- [x] In case it's "ready for review", I've changed it from "draft" to
"non-draft".

## **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.

Signed-off-by: Akintayo A. Olusegun <[email protected]>
@github-project-automation github-project-automation bot moved this to To be fixed in Bugs by team Apr 9, 2024
@github-project-automation github-project-automation bot moved this to To be fixed in Bugs by severity May 15, 2024
@github-project-automation github-project-automation bot moved this to To be fixed in Bugs by team May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
regression-RC DEPRECATED: Please use "regresssion-RC-x.y.z" label instead regression-RC-11.3.0 release-11.3.0 Issue or pull request that will be included in release 11.3.0 release-blocker This bug is blocking the next release team-confirmations-secure-ux DEPRECATED: please use "team-confirmations" label instead team-confirmations-system DEPRECATED: please use "team-confirmations" label instead type-bug
Projects
None yet
Development

No branches or pull requests

4 participants