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

Sign mode eip191 #20

Closed
wants to merge 9 commits into from
Closed

Conversation

sunnya97
Copy link

Description

closes: #XXXX


Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.

  • Targeted PR against correct branch (see CONTRIBUTING.md)
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
  • Code follows the module structure standards.
  • Wrote unit and integration tests
  • Updated relevant documentation (docs/) or specification (x/<module>/spec/)
  • Added relevant godoc comments.
  • Added a relevant changelog entry to the Unreleased section in CHANGELOG.md
  • Re-reviewed Files changed in the Github PR explorer
  • Review Codecov Report in the comment section below once CI passes

@sunnya97
Copy link
Author

We should consider converting this to use YAML instead of JSON. As long as there's a deterministic mapping from json to yaml

Maybe using something like this: https://github.com/ghodss/yaml

@ValarDragon
Copy link
Member

TODO Here: Prettify the JSON in GetSignBytes / w/e its called.

@sunnya97
Copy link
Author

Decided to do prettified JSON instead of YAML

return []signingtypes.SignMode{signingtypes.SignMode_SIGN_MODE_EIP191_LEGACY_JSON}
}

func (s signModeEIP191LegacyJSONHandler) GetSignBytes(mode signingtypes.SignMode, data signing.SignerData, tx sdk.Tx) ([]byte, error) {
Copy link
Member

Choose a reason for hiding this comment

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

Change this to use prettified JSON

Comment on lines +52 to +55
aminoJSONBz := legacytx.StdSignBytes(
data.ChainID, data.AccountNumber, data.Sequence, protoTx.GetTimeoutHeight(),
legacytx.StdFee{Amount: protoTx.GetFee(), Gas: protoTx.GetGas()},
tx.GetMsgs(), protoTx.GetMemo(),
Copy link
Member

Choose a reason for hiding this comment

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

I think prettified JSON happens here

@github-actions
Copy link

github-actions bot commented Dec 9, 2021

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the Stale label Dec 9, 2021
@sunnya97 sunnya97 removed the Stale label Dec 9, 2021
@tac0turtle
Copy link

Hey, would love to see this upstreamed, let me know what is needed from the sdk for this

@github-actions
Copy link

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the Stale label Jan 29, 2022
@github-actions github-actions bot closed this Feb 4, 2022
@alexanderbez alexanderbez deleted the SIGN_MODE_EIP191 branch March 30, 2022 13:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants