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

construction/payloads: Transaction input field should be data accordi… #53

Merged
merged 2 commits into from
Jul 26, 2021
Merged

construction/payloads: Transaction input field should be data accordi… #53

merged 2 commits into from
Jul 26, 2021

Conversation

akramhussein
Copy link
Contributor

Fixes #46

Note: This PR replaces #47. I deleted the fork and forgot about the link so had to re-instated.

Motivation

When using the endpoint construction/payloads the unsigned_transaction payload is invalid for passing to a signer. Per #46 references it should be data when submitting to a signer and input is part of the response.

Solution

Rename input to data on the transaction and transactionWire structs.

Open questions

None

input, err := hexutil.Decode(tw.Input)
data_, err := hexutil.Decode(tw.Data)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The variable name is already taken - not sure what an appropriate alternative might be?

t.Input = input
t.Data = data_
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Same as above

Copy link
Contributor

@shrimalmadhur shrimalmadhur left a comment

Choose a reason for hiding this comment

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

twData name looks good.

@shrimalmadhur shrimalmadhur merged commit 741feac into coinbase:master Jul 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

construction/payloads: Input should be Data to match geth eth namespace RPC specification
2 participants