Skip to content

Commit 7a25598

Browse files
fix: chain changes client
1 parent dae5572 commit 7a25598

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

pkg/relay/chain.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ func newChain(cfg *config.TOMLConfig, loopKs loop.Keystore, lggr logger.Logger,
116116
}
117117

118118
// TODO(@jadepark-dev): TXM technically doesn't need SignedAPIClient, revisit to refactor
119-
signedClientProvider := commonutils.NewLazyLoadCtx(func(ctx context.Context) (tracetracking.SignedAPIClient, error) {
119+
signedClientProvider := func(ctx context.Context) (tracetracking.SignedAPIClient, error) {
120120
tonClient, err1 := ch.GetClient(ctx)
121121
if err1 != nil {
122122
return tracetracking.SignedAPIClient{}, fmt.Errorf("failed to create TON client for chain ID %s: %w", cfg.ChainID, err1)
@@ -131,15 +131,15 @@ func newChain(cfg *config.TOMLConfig, loopKs loop.Keystore, lggr logger.Logger,
131131
Client: tonClient,
132132
Wallet: *signerWallet,
133133
}, nil
134-
})
134+
}
135135

136-
ch.txm, err = txm.New(lggr, ch.id, loopKs, signedClientProvider.Get, *ch.cfg.TxManager())
136+
ch.txm, err = txm.New(lggr, ch.id, loopKs, signedClientProvider, *ch.cfg.TxManager())
137137
if err != nil {
138138
return nil, fmt.Errorf("failed to create TON TXM for chain ID %s: %w", cfg.ChainID, err)
139139
}
140140

141141
clientProvider := func(ctx context.Context) (ton.APIClientWrapped, error) {
142-
signedClient, cerr := signedClientProvider.Get(ctx)
142+
signedClient, cerr := signedClientProvider(ctx)
143143
if cerr != nil {
144144
return nil, cerr
145145
}

0 commit comments

Comments
 (0)