Closed MarinX closed 5 years ago
Thanks @MarinX. I'm thinking do we even need two endpoints? Why not just have an account query endpoint? That'll have the balance anyway.
++ agree with @alexanderbez here
Closing. Has been already addressed by @fedekunze :)
Summary
In
x/auth/client/rest/query.go
we have 2 REST methods which are the same except the response.Problem Definition
The first REST method
/auth/accounts/{address}
has a handlerQueryAccountRequestHandlerFn
, which returns the account.The second REST method
/bank/balances/{address}
has a handlerQueryBalancesRequestHandlerFn
, which returns account coins.Both methods do the same validation, querying and error checking. Only difference is the response (account or account coins)
Proposal
Query*RequestHandlerFn
to be a single handler function (code cleanup)/auth/accounts/{address}
/bank/balances/{address}
to/auth/accounts/{address}
/auth/accounts/{address}/balances
For Admin Use