-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
feat: enhance rosetta support #11590
Conversation
This reverts commit ea433e7.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, could you add a changlog entry pleas
@@ -69,8 +70,24 @@ func (on OnlineNetwork) ConstructionMetadata(ctx context.Context, request *types | |||
return nil, errors.ToRosetta(err) | |||
} | |||
|
|||
price, err := sdk.ParseDecCoin(metadata["gas_price"].(string)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should be safe and have explicit type assertions on these metadata fields and return an error when the type is invalid. Otherwise, this could could panic of metadata structure changes.
@@ -6,12 +6,14 @@ import ( | |||
"time" | |||
|
|||
"github.com/coinbase/rosetta-sdk-go/types" | |||
clientflags "github.com/cosmos/cosmos-sdk/client/flags" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gofmt
@@ -30,17 +32,24 @@ const ( | |||
DefaultNetwork = "network" | |||
// DefaultOffline defines the default offline value | |||
DefaultOffline = false | |||
// DefaultEnableDefaultFeeSuggest indicates to use fee suggestion | |||
DefaultEnableDefaultFeeSuggest = false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
odd to read, we can remove Default prefix and address the changes that @alexanderbez suggested for naming
Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com> Co-authored-by: Anil Kumar Kammari <anil@vitwit.com>
My apologies.. miscreated pr with outdated and invalid test branch. I'll create again with right branch after applying your suggestions. |
feat/fix to enhance rosetta support
Description
followup of #10766
Closes: #10618
we did integration test with coinbase so this PR includes all of our fixes and features requested from coinbase.
features:
/construction/metadata
/construction/metadata
fixes:
/block
returns with nil pointer address when a request has both of index and hashAuthor Checklist
All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.
I have...
!
to the type prefix if API or client breaking changeCHANGELOG.md
Reviewers Checklist
All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.
I have...
!
in the type prefix if API or client breaking change