-
Notifications
You must be signed in to change notification settings - Fork 5k
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
Conversation
There was a problem hiding this 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) |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Does that mean that users now don't receive notifications that transactions are rejected and (maybe) need to be resent? |
fixes #3896