Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Display local/completed transactions #3630

Merged
merged 16 commits into from
Nov 29, 2016
Merged

Display local/completed transactions #3630

merged 16 commits into from
Nov 29, 2016

Conversation

jacogr
Copy link
Contributor

@jacogr jacogr commented Nov 27, 2016

  • TxList component for transaction display (split from Account/Transactions)
  • Display local transactions under signer page

Normal transaction list -

parity 2016-11-27 12-13-57

Signer list -

parity 2016-11-27 12-14-26

@jacogr jacogr added A3-inprogress ⏳ Pull request is in progress. No review needed at this stage. M7-ui labels Nov 27, 2016
@ngotchac
Copy link
Contributor

47 years ago

screenshot_2016-11-28_13-30-52

}

loadBlocks (_blockNumbers) {
const blockNumbers = Object.keys(
Copy link
Contributor

Choose a reason for hiding this comment

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

Lodash uniq method on requested blocks?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Cool.

});
}

loadTransactions (_txhashes) {
Copy link
Contributor

Choose a reason for hiding this comment

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

This should be an @action right ?

Copy link
Contributor Author

@jacogr jacogr Nov 28, 2016

Choose a reason for hiding this comment

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

Could be. Technically the only updates happen in the addTransactions function. So @action won't hurt, however the function itself doesn't update the object state by modifying the variables directly. (Split the change out into a different @action - async does not play well with setStrict)

Copy link
Contributor

Choose a reason for hiding this comment

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

Mh that's right, didn't think of that. Not sure what it changes.

fetchLocalTransactions = () => {
const nextTimeout = () => {
if (this.doPolling) {
setTimeout(this.fetchLocalTransactions, 1500);
Copy link
Contributor

Choose a reason for hiding this comment

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

Might be safer to add clearTimeout with the timeout id no?

@ngotchac
Copy link
Contributor

Looks good except the wrong date (when not mined yet) and a few small comments :)

@jacogr jacogr added A0-pleasereview 🤓 Pull request needs code review. and removed A3-inprogress ⏳ Pull request is in progress. No review needed at this stage. labels Nov 28, 2016
@jacogr
Copy link
Contributor Author

jacogr commented Nov 28, 2016

Next PR will cover MethodDecoding (pre-confirmation), gas edits & re-submissions.

PropTypes.array,
PropTypes.object
]).isRequired,
isTest: PropTypes.bool.isRequired
Copy link
Contributor

Choose a reason for hiding this comment

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

isTest is required but not provided. I think it should be removed from here.

Copy link
Contributor Author

@jacogr jacogr Nov 29, 2016

Choose a reason for hiding this comment

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

Provided via mapStateToProps - however we do have an issue with the new 'undefined' state now. (In multiple places) It is a Required property without doubt.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah yep that's right... So maybe it's not required ? Or it could be defaulted to false in mapStateToProps

Copy link
Contributor Author

@jacogr jacogr Nov 29, 2016

Choose a reason for hiding this comment

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

Well, it is required to be provided - if we don't have it, we will get the links wrong. The issue however is that it turned into a tri-state at this point as opposed to the original bool and the isRequired doesn't see it as such, not can it. (We need a different solution for that problem, it is not local to this component - sadly.)

I think that providing a default is hacking around the visibility of the issue.

Copy link
Contributor

Choose a reason for hiding this comment

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

Agreed, not in the scope of this issue. Should be null/true/false and the prop type should be a nullable boolean I guess.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Unfortunately my nullable cleanups are stuck in the I18N PR (and that needs a bit of playing with still on the actual webpack/babel build side of things), will pull it out and make it available so at least we have easier to use functions.

@@ -44,39 +46,59 @@ class RequestsPage extends Component {
isTest: PropTypes.bool.isRequired
Copy link
Contributor

Choose a reason for hiding this comment

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

Same as above

@ngotchac
Copy link
Contributor

Looks good overall. The Local and Finished transactions seems redundant (we already discussed about it, just wanted to write it down)

@jacogr
Copy link
Contributor Author

jacogr commented Nov 29, 2016

Agreed on the Finished. Only benefit now is showing the Rejected transactions, as soon as we have resubmissions in place, it should be dropped and combined with the Local - that way it makes sense, can reject and re-submit again.

@ngotchac ngotchac added A8-looksgood 🦄 Pull request is reviewed well. and removed A0-pleasereview 🤓 Pull request needs code review. labels Nov 29, 2016
@jacogr jacogr merged commit 5e8f6f2 into master Nov 29, 2016
@jacogr jacogr deleted the jg-signer-local branch November 29, 2016 12:50
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A8-looksgood 🦄 Pull request is reviewed well.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants