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

Problem: unnecessary use of REST API instead of grpc-web #511

Open
tomtau opened this issue Jul 19, 2022 · 2 comments
Open

Problem: unnecessary use of REST API instead of grpc-web #511

tomtau opened this issue Jul 19, 2022 · 2 comments
Assignees

Comments

@tomtau
Copy link
Contributor

tomtau commented Jul 19, 2022

https://github.com/crypto-com/defi-wallet-core-rs/blob/main/common/src/node/cosmos_sdk.rs#L261
some of the Cosmos SDK client functions use REST API -- the reason for it was that cosmos-sdk-proto had the default generation of proto definitions which doesn't work with grpc-web.
This seems to be feature-guarded now by grpc-transport: https://github.com/cosmos/cosmos-rust/blob/main/cosmos-sdk-proto/src/prost/cosmos-sdk/cosmos.bank.v1beta1.rs#L125 so it should be possible to use grpc-web.
Perhaps the CosmosSDKClient and nft's Client can be unified?

@stevenatcrypto
Copy link
Collaborator

I am sorry that I am a little busy in this week. Will start to work on this issue on next week.

@stevenatcrypto
Copy link
Collaborator

Working on this issue.

tomtau pushed a commit that referenced this issue Nov 22, 2022
…t_balance` part) (#663)  #511

Solution:
* Replace REST API with `grpc-web` for `get_account_balance` functions.

* Update CPP example.

* Fix CPP integration-test.

* Replace `mainnet.crypto.org:1317` with GRPC URL `mainnet.crypto.org:9090`.

* Fix JS example for balance query.

* Update JS example to make work with local chain-main.
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

No branches or pull requests

4 participants