Skip to content

Commit 4fbd46f

Browse files
committed
proper type alias for CI build issues
1 parent 8f77408 commit 4fbd46f

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

sdk/packages/simplex/src/services/ChainClientManager.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { PublicClient, WalletClient, createPublicClient, createWalletClient, http, type Chain } from "viem"
1+
import { PublicClient, WalletClient, createPublicClient, createWalletClient, http, type Chain, type Transport } from "viem"
22
import { generatePrivateKey } from "viem/accounts"
33
import { Order, ChainConfig, getViemChain } from "@hyperbridge/sdk"
44
import type { Account } from "viem/accounts"
@@ -11,7 +11,7 @@ import { createSimplexSigner, SignerType } from "./wallet"
1111
*/
1212
class ViemClientFactoryImpl {
1313
private publicClients: Map<number, PublicClient> = new Map()
14-
private walletClients: Map<number, WalletClient> = new Map()
14+
private walletClients: Map<number, WalletClient<Transport, Chain, Account>> = new Map()
1515

1616
public getPublicClient(chainConfig: ChainConfig): PublicClient {
1717
if (!this.publicClients.has(chainConfig.chainId)) {
@@ -32,7 +32,7 @@ class ViemClientFactoryImpl {
3232
return this.publicClients.get(chainConfig.chainId)!
3333
}
3434

35-
public getWalletClient(chainConfig: ChainConfig, account: Account): WalletClient {
35+
public getWalletClient(chainConfig: ChainConfig, account: Account): WalletClient<Transport, Chain, Account> {
3636
if (!this.walletClients.has(chainConfig.chainId)) {
3737
const chain = getViemChain(chainConfig.chainId) as Chain
3838

@@ -78,7 +78,7 @@ export class ChainClientManager {
7878
return this.clientFactory.getPublicClient(config)
7979
}
8080

81-
getWalletClient(chain: string): WalletClient {
81+
getWalletClient(chain: string): WalletClient<Transport, Chain, Account> {
8282
const config = this.configService.getChainConfig(chain)
8383
return this.clientFactory.getWalletClient(config, this.signer.account)
8484
}
@@ -94,7 +94,7 @@ export class ChainClientManager {
9494
getClientsForOrder(order: Order): {
9595
destClient: PublicClient
9696
sourceClient: PublicClient
97-
walletClient: WalletClient
97+
walletClient: WalletClient<Transport, Chain, Account>
9898
} {
9999
return {
100100
destClient: this.getPublicClient(order.destination),

sdk/packages/simplex/src/strategies/basic.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -416,8 +416,8 @@ export class BasicFiller implements FillerStrategy {
416416
chain: walletClient.chain,
417417
gas: callGasLimit + (callGasLimit * 2500n) / 10000n,
418418
})
419-
.catch(async (err) => {
420-
this.logger.error({ err }, "Could not send transaction")
419+
.catch(async (err) => {
420+
this.logger.error({ err }, "Could not send transaction")
421421
return await walletClient.sendTransaction({
422422
account,
423423
to: account.address,

0 commit comments

Comments
 (0)