mirror of
https://github.com/cosmos/cosmjs.git
synced 2025-03-11 14:09:15 +00:00
Rename to CosmWasmClient.sendTokens
This commit is contained in:
parent
0010c1bc77
commit
4a3be36bc6
@ -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();
|
||||
|
||||
|
@ -330,7 +330,7 @@ export class CosmWasmClient {
|
||||
};
|
||||
}
|
||||
|
||||
public async sendToken(
|
||||
public async sendTokens(
|
||||
recipientAddress: string,
|
||||
transferAmount: readonly Coin[],
|
||||
memo = "",
|
||||
|
2
packages/sdk/types/cosmwasmclient.d.ts
vendored
2
packages/sdk/types/cosmwasmclient.d.ts
vendored
@ -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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user