Rename to getAllBalancesUnverified

This commit is contained in:
Simon Warta
2020-08-06 18:09:23 +02:00
parent 78280fcae9
commit 6811a4574f
3 changed files with 5 additions and 5 deletions
+3 -3
View File
@@ -64,12 +64,12 @@ describe("StargateClient", () => {
});
});
describe("getUnverifiedAllBalances", () => {
describe("getAllBalancesUnverified", () => {
it("returns all balances for unused account", async () => {
pendingWithoutSimapp();
const client = await StargateClient.connect(simapp.tendermintUrl);
const balances = await client.getUnverifiedAllBalances(unused.address);
const balances = await client.getAllBalancesUnverified(unused.address);
expect(balances).toEqual([
{
amount: unused.balanceFee,
@@ -85,7 +85,7 @@ describe("StargateClient", () => {
it("returns an empty list for non-existent account", async () => {
pendingWithoutSimapp();
const client = await StargateClient.connect(simapp.tendermintUrl);
const balances = await client.getUnverifiedAllBalances(nonExistentAddress);
const balances = await client.getAllBalancesUnverified(nonExistentAddress);
expect(balances).toEqual([]);
});
});
+1 -1
View File
@@ -93,7 +93,7 @@ export class StargateClient {
* Uses the grpc queries (which iterates over the store internally), and we cannot get
* proofs from such a method.
*/
public async getUnverifiedAllBalances(address: string): Promise<readonly Coin[]> {
public async getAllBalancesUnverified(address: string): Promise<readonly Coin[]> {
const path = "/cosmos.bank.Query/AllBalances";
const request = QueryAllBalancesRequest.encode({ address: Bech32.decode(address).data }).finish();
const responseData = await this.queryUnverified(path, request);
+1 -1
View File
@@ -15,7 +15,7 @@ export declare class StargateClient {
* Uses the grpc queries (which iterates over the store internally), and we cannot get
* proofs from such a method.
*/
getUnverifiedAllBalances(address: string): Promise<readonly Coin[]>;
getAllBalancesUnverified(address: string): Promise<readonly Coin[]>;
disconnect(): void;
private queryVerified;
private queryUnverified;