Skip to content

Commit

Permalink
fix(core): update type for options argument (#89)
Browse files Browse the repository at this point in the history
Use the type `SigningArchwayClientOptions` for the `options` in all
factory methods of the `SigningArchwayClient`
  • Loading branch information
aelesbao authored May 31, 2023
1 parent 07e4d80 commit 1c88718
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
9 changes: 9 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,15 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

## Unreleased

### Fixes

#### **arch3-core**

- use the type `SigningArchwayClientOptions` for the `options` in all factory
methods of the `SigningArchwayClient` (#89)

## v0.3.0 (2023-05-30)

### New feature
Expand Down
5 changes: 2 additions & 3 deletions packages/arch3-core/src/signingarchwayclient.spec.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import { Coin, addCoins, coin, coins } from '@cosmjs/amino';
import { SigningCosmWasmClientOptions } from '@cosmjs/cosmwasm-stargate';
import { AccountData, DirectSecp256k1HdWallet, decodeTxRaw, makeCosmoshubPath } from '@cosmjs/proto-signing';
import { GasPrice, StdFee, calculateFee } from '@cosmjs/stargate';

import { ContractMetadata, SigningArchwayClient } from '.';
import { ContractMetadata, SigningArchwayClient, SigningArchwayClientOptions } from '.';

const archwayd = {
chainId: 'local-1',
Expand Down Expand Up @@ -34,7 +33,7 @@ async function getWalletWithAccounts(): Promise<[DirectSecp256k1HdWallet, readon

const flatFee = coin(1000, archwayd.denom);

const clientOptions: SigningCosmWasmClientOptions = {
const clientOptions: SigningArchwayClientOptions = {
broadcastPollIntervalMs: 200,
broadcastTimeoutMs: 8_000,
};
Expand Down
6 changes: 3 additions & 3 deletions packages/arch3-core/src/signingarchwayclient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ export class SigningArchwayClient extends SigningCosmWasmClient implements IArch
public static override async connectWithSigner(
endpoint: string | HttpEndpoint,
signer: OfflineSigner,
options: SigningCosmWasmClientOptions = {},
options: SigningArchwayClientOptions = {},
): Promise<SigningArchwayClient> {
const tmClient = await Tendermint34Client.connect(endpoint);
return SigningArchwayClient.createWithSigner(tmClient, signer, options);
Expand All @@ -173,7 +173,7 @@ export class SigningArchwayClient extends SigningCosmWasmClient implements IArch
public static override async createWithSigner(
tmClient: TendermintClient,
signer: OfflineSigner,
options: SigningCosmWasmClientOptions = {},
options: SigningArchwayClientOptions = {},
): Promise<SigningArchwayClient> {
return new SigningArchwayClient(tmClient, signer, options);
}
Expand All @@ -195,7 +195,7 @@ export class SigningArchwayClient extends SigningCosmWasmClient implements IArch
/* eslint-disable-next-line @typescript-eslint/require-await */
public static override async offline(
signer: OfflineSigner,
options: SigningCosmWasmClientOptions = {},
options: SigningArchwayClientOptions = {},
): Promise<SigningArchwayClient> {
return new SigningArchwayClient(undefined, signer, options);
}
Expand Down

0 comments on commit 1c88718

Please sign in to comment.