-
Notifications
You must be signed in to change notification settings - Fork 96
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
Fix pending details missing - Closes #1269 #1273
Conversation
Is this in progress? I thought the described problem is just in Wallet, so account page should not be affected, bu you are solving more than described in the issue. |
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 have some refactoring suggestions below
Also, reading pendingTransactions in this component doesn't feel good. I would rather see the transaction object as something coming from the parent component.
Overall, this file is huge and worth some refactor. So I approve this PR. And I created a follow-up refactoring task #1282
(this.props.pendingTransactions.find(tx => tx.id === transactionId) || {}); | ||
|
||
const isSendTransaction = this.props.transaction.type === transactions.send | ||
|| (this.props.pendingTransactions && this.props.pendingTransactions.length > 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.
Not sure what is the goal, but logic here seems wrong. if there are some pending transactions, it doesn't mean that they are of "send" type.
const transaction = isTransactionEmpty || (isTransactionEmpty && | ||
this.props.pendingTransactions.find(tx => tx.id === transactionId)) ? | ||
this.props.transaction : | ||
(this.props.pendingTransactions.find(tx => tx.id === transactionId) || {}); |
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.
The same 4 lines again on line 143. Would be worth a helper function.
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.
Cool
What issue have I solved?
-- #1269
How have I implemented/fixed it?
Checking for a pending transaction if there is no any in transaction store
How has this been tested?
Review checklist