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

transactions - remove rejected transactions from history #4667

Merged
merged 8 commits into from
Jul 10, 2018
Merged

Conversation

frankiebee
Copy link
Contributor

@frankiebee frankiebee commented Jun 25, 2018

fixes #3896

@kumavis kumavis changed the title I#3896 transactions - remove rejected transactions from history Jul 2, 2018
@bdresser bdresser added this to the Sprint 07 [7.9 - 7.20] milestone Jul 10, 2018
brunobar79
brunobar79 previously approved these changes Jul 10, 2018
Copy link
Contributor

@brunobar79 brunobar79 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One minor comment but 💯!

@@ -288,6 +288,7 @@ class TransactionStateManager extends EventEmitter {
*/
setTxStatusRejected (txId) {
this._setTxStatus(txId, 'rejected')
this._removeTx(txId)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd make sure the tests are aware that the TX list is changing after this, so if someone deletes it by accident, the tests will catch it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done and done

txStateManager.setTxStatusRejected(1)
const result = txStateManager.getTxList()
assert.ok(Array.isArray(result))
assert.equal(result.length, 1)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe all you need to do is to restore this test and check that the length is 0

Copy link
Contributor

@brunobar79 brunobar79 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@metamaskbot
Copy link
Collaborator

Builds ready [b304998]: mascara, chrome, firefox, edge, opera

@frankiebee frankiebee merged commit 33e6b94 into develop Jul 10, 2018
@abitrolly
Copy link
Contributor

Does that mean that users now don't receive notifications that transactions are rejected and (maybe) need to be resent?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Discard rejected transactions from history
5 participants