Skip to content

Commit baccbc3

Browse files
committed
refactor: use cross-chain stream api
1 parent e2e54ff commit baccbc3

File tree

3 files changed

+346
-82
lines changed

3 files changed

+346
-82
lines changed

apps/kyberswap-interface/src/pages/CrossChainSwap/adapters/OptimexAdapter.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,10 @@ export class OptimexAdapter extends BaseSwapAdapter {
251251
_nearWallet: any,
252252
sendBtcFn?: (params: { recipient: string; amount: string | number }) => Promise<string>,
253253
): Promise<NormalizedTxResponse> {
254+
if (!this.tokens?.length) {
255+
await this.getTokens()
256+
}
257+
254258
// For EVM -> BTC flow, txData should already exist from getQuote
255259
// For BTC -> EVM flow, we need to initiate the trade here
256260
let txData: { deposit_address: string; payload?: string; trade_id: string }

0 commit comments

Comments
 (0)