Skip to content

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.To = tw.To
t.Value = value
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