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

Move common transaction state/mutations into statelessTransaction #96

Merged
merged 14 commits into from
Apr 8, 2019

Conversation

c-johnson
Copy link
Contributor

Cuts down on the state mutation boilerplate for executing transactions by moving all the common transaction details into statelessTransaction.js

@pkova
Copy link
Contributor

pkova commented Apr 4, 2019

I think you forgot (to commit) CreateGalaxy.js!

Apologies if this is a WIP PR, noticed this since I'm doing some work on #93 but realized I better wait for this one to be merged.

}
});
this.createUnsignedTxn = this.createUnsignedTxn.bind(this)
this.statelessRef = React.createRef();
Copy link
Member

Choose a reason for hiding this comment

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

The React docs say you need to add a ref attribute to some DOM element for this to work? I know this ends up with having a pointer to the StatelessTransaction in statelessRef.current, but how does that hook up? I don't see it happen anywhere.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah, good catch! I missed this one. It's there now.

@c-johnson
Copy link
Contributor Author

Indeed I did @pkova! It's updated now.

@Fang- Fang- self-requested a review April 4, 2019 20:13
Copy link
Member

@Fang- Fang- left a comment

Choose a reason for hiding this comment

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

Three times as many lines deleted as were added, I'd say this is a good refactoring. Thanks! (:

@c-johnson c-johnson merged commit bf5e9bb into master Apr 8, 2019
@c-johnson c-johnson deleted the stateless-transaction branch April 8, 2019 17:15
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.

3 participants