Rename to getAllBalancesUnverified
This commit is contained in:
@@ -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([]);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -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
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user