refactor: 💬 change function names

changed function names to follow the naming given by the backend.
This commit is contained in:
DavideSegullo 2023-05-24 18:51:11 +02:00
parent 53e39ab24b
commit 4d022115eb
4 changed files with 6 additions and 6 deletions

View File

@ -343,7 +343,7 @@ export class CosmWasmClient {
*
* @returns Returns the hash of the transaction
*/
public async broadcastTxWithoutPolling(tx: Uint8Array): Promise<string> {
public async broadcastTxSync(tx: Uint8Array): Promise<string> {
const broadcasted = await this.forceGetTmClient().broadcastTxSync({ tx });
if (broadcasted.code) {

View File

@ -571,7 +571,7 @@ export class SigningCosmWasmClient extends CosmWasmClient {
*
* @returns Returns the hash of the transaction
*/
public async signAndBroadcastWithoutPolling(
public async signAndBroadcastSync(
signerAddress: string,
messages: readonly EncodeObject[],
fee: StdFee | "auto" | number,
@ -588,7 +588,7 @@ export class SigningCosmWasmClient extends CosmWasmClient {
}
const txRaw = await this.sign(signerAddress, messages, usedFee, memo);
const txBytes = TxRaw.encode(txRaw).finish();
return this.broadcastTxWithoutPolling(txBytes);
return this.broadcastTxSync(txBytes);
}
public async sign(

View File

@ -316,7 +316,7 @@ export class SigningStargateClient extends StargateClient {
* I would like to receive the hash to later track the transaction with another tool.
* @returns Returns the hash of the transaction
*/
public async signAndBroadcastWithoutPolling(
public async signAndBroadcastSync(
signerAddress: string,
messages: readonly EncodeObject[],
fee: StdFee | "auto" | number,
@ -333,7 +333,7 @@ export class SigningStargateClient extends StargateClient {
}
const txRaw = await this.sign(signerAddress, messages, usedFee, memo);
const txBytes = TxRaw.encode(txRaw).finish();
return this.broadcastTxWithoutPolling(txBytes);
return this.broadcastTxSync(txBytes);
}
/**

View File

@ -502,7 +502,7 @@ export class StargateClient {
*
* @returns Returns the hash of the transaction
*/
public async broadcastTxWithoutPolling(tx: Uint8Array): Promise<string> {
public async broadcastTxSync(tx: Uint8Array): Promise<string> {
const broadcasted = await this.forceGetTmClient().broadcastTxSync({ tx });
if (broadcasted.code) {