Rename to CosmWasmClient.sendTokens

This commit is contained in:
Simon Warta 2020-02-17 13:07:34 +01:00
parent 0010c1bc77
commit 4a3be36bc6
3 changed files with 5 additions and 5 deletions

View File

@ -232,7 +232,7 @@ describe("CosmWasmClient", () => {
amount: "1234567",
},
];
const result = await client.sendToken(recipient, transferAmount, memo);
const result = await client.sendTokens(recipient, transferAmount, memo);
await sleep(50); // wait until tx is indexed
const txDetails = await new RestClient(httpUrl).txsById(result.transactionHash);
@ -419,7 +419,7 @@ describe("CosmWasmClient", () => {
});
});
describe("sendToken", () => {
describe("sendTokens", () => {
it("works", async () => {
pendingWithoutCosmos();
const pen = await Secp256k1Pen.fromMnemonic(faucet.mnemonic);
@ -439,7 +439,7 @@ describe("CosmWasmClient", () => {
expect(before).toBeUndefined();
// send
const result = await client.sendToken(beneficiaryAddress, transferAmount, "for dinner");
const result = await client.sendTokens(beneficiaryAddress, transferAmount, "for dinner");
const [firstLog] = result.logs;
expect(firstLog).toBeTruthy();

View File

@ -330,7 +330,7 @@ export class CosmWasmClient {
};
}
public async sendToken(
public async sendTokens(
recipientAddress: string,
transferAmount: readonly Coin[],
memo = "",

View File

@ -83,7 +83,7 @@ export declare class CosmWasmClient {
memo?: string,
transferAmount?: readonly Coin[],
): Promise<ExecuteResult>;
sendToken(recipientAddress: string, transferAmount: readonly Coin[], memo?: string): Promise<PostTxResult>;
sendTokens(recipientAddress: string, transferAmount: readonly Coin[], memo?: string): Promise<PostTxResult>;
/**
* Returns the data at the key if present (raw contract dependent storage data)
* or null if no data at this key.