Conversation
…21-grpc-gateway-follow-up
…21-grpc-gateway-follow-up
Codecov Report
@@ Coverage Diff @@
## master #7173 +/- ##
==========================================
+ Coverage 54.04% 54.77% +0.72%
==========================================
Files 415 565 +150
Lines 30163 39134 +8971
==========================================
+ Hits 16301 21434 +5133
- Misses 12557 15932 +3375
- Partials 1305 1768 +463 |
| }{ | ||
| { | ||
| "gRPC total account balance", | ||
| fmt.Sprintf("%s/cosmos/bank/v1beta1/balances/%s", baseURL, base64.URLEncoding.EncodeToString(val.Address)), |
There was a problem hiding this comment.
Since the address path in the URL is defined as bytes in the proto files, and grpc-gateway decodes bytes with base64.URLEncoding, we (actually, any HTTP client really) need to encode the address as base64 URLEncoding first.
This has the unfortunate consequence of showing non-human-readable addresses in URLs:
+ /cosmos/bank/v1beta1/balances/u1-UOH-CHOvM2rNadSjtNARKkSk= // with base64
- /cosmos/bank/v1beta1/balances/cosmos1hd0egwrlsgwwhnx6kdd8228dxszy4yffnv2gtu // expectedWhat do people think here? Are you okay to use base64-encoded addresses in URLs?
If not, it's maybe worth to raise an issue on grpc-gateway to see if we can customize bytes decoding.
…21-grpc-gateway-x-auth-routes
|
Could you rename the PR title to reflect the modules you changed in this PR? |
Added all the addressed modules in description part of the PR. |
ref: #5921
follow-up: #7019
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.
docs/) or specification (x/<module>/spec/)godoccomments.Unreleasedsection inCHANGELOG.mdFiles changedin the Github PR explorerCodecov Reportin the comment section below once CI passes