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

Improve signing process for a fully signed transaction - Closes #4059 #4070

Merged
merged 4 commits into from
Jan 13, 2022

Conversation

reyraa
Copy link
Contributor

@reyraa reyraa commented Jan 12, 2022

What was the problem?

This PR resolves #4059

How was it solved?

  • Created a new action to prepare the imported tx for broadcasting, but not sign it.
  • Used the above action.

How was it tested?

  • Added unit tests
  • Tested manually

@reyraa reyraa self-assigned this Jan 12, 2022
Copy link
Contributor

@isalga isalga left a comment

Choose a reason for hiding this comment

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

LGTM


it('should return the tx ready to be broadcasted', () => {
expect(signatureSkipped(props)).toEqual(
expect.objectContaining({ type: actionTypes.signatureSkipped }),
Copy link
Contributor

Choose a reason for hiding this comment

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

Would be good to add data: binaryTx be added to the assertion

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't perform any logic there and that part is actually extensively tested in utils/transaction.js. I think it's redundant, but if you still believe I have to test it I can add that too.

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, one more thing, the use of flattenTransaction and createTransactionObject is really getting out of hand. We need a proper refactoring round there. I have to change all these tests anyways. Otherwise I don't know how we can handle the sapphire phase.

@reyraa reyraa force-pushed the 4059-improve-signing-process branch from fce2a4a to 9e3c140 Compare January 13, 2022 07:44
@ManuGowda ManuGowda self-requested a review January 13, 2022 10:00
@reyraa reyraa merged commit 270c027 into release/2.2.0 Jan 13, 2022
@reyraa reyraa deleted the 4059-improve-signing-process branch January 13, 2022 13:46
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