mirror of
https://github.com/cosmos/cosmjs.git
synced 2025-03-11 14:09:15 +00:00
cosmwasm-stargate: Update for bank extension change
This commit is contained in:
parent
c414aad304
commit
253494d29d
@ -150,7 +150,7 @@ export class CosmWasmClient {
|
||||
};
|
||||
}
|
||||
|
||||
public async getBalance(address: string, searchDenom: string): Promise<Coin | null> {
|
||||
public async getBalance(address: string, searchDenom: string): Promise<Coin> {
|
||||
return this.forceGetQueryClient().bank.balance(address, searchDenom);
|
||||
}
|
||||
|
||||
|
@ -498,7 +498,10 @@ describe("SigningCosmWasmClient", () => {
|
||||
|
||||
// no tokens here
|
||||
const before = await client.getBalance(beneficiaryAddress, "ucosm");
|
||||
expect(before).toBeNull();
|
||||
expect(before).toEqual({
|
||||
denom: "ucosm",
|
||||
amount: "0",
|
||||
});
|
||||
|
||||
// send
|
||||
const result = await client.sendTokens(alice.address0, beneficiaryAddress, transferAmount, memo);
|
||||
@ -523,7 +526,10 @@ describe("SigningCosmWasmClient", () => {
|
||||
|
||||
// no tokens here
|
||||
const before = await client.getBalance(beneficiaryAddress, "ucosm");
|
||||
expect(before).toBeNull();
|
||||
expect(before).toEqual({
|
||||
denom: "ucosm",
|
||||
amount: "0",
|
||||
});
|
||||
|
||||
// send
|
||||
const result = await client.sendTokens(alice.address0, beneficiaryAddress, transferAmount, memo);
|
||||
|
Loading…
x
Reference in New Issue
Block a user