Skip to content

Commit 7a2ef07

Browse files
committed
refactor(xdm-integration-tests): replace direct transaction call with initiateChannel function for improved clarity and maintainability
1 parent e64618a commit 7a2ef07

File tree

1 file changed

+2
-3
lines changed
  • integration-tests/helpers

1 file changed

+2
-3
lines changed

integration-tests/helpers/xdm.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { setupWallet, signAndSendTx, type ApiPromise } from '@autonomys/auto-utils'
2-
import { chainAllowlist, channels, nextChannelId } from '@autonomys/auto-xdm'
2+
import { chainAllowlist, channels, initiateChannel, nextChannelId } from '@autonomys/auto-xdm'
33
import { waitForBlocks, waitUntil } from './chain'
44

55
/**
@@ -74,8 +74,7 @@ export const setupXDM = async (
7474

7575
if (!channelExists) {
7676
console.log(`Step 3/3: Initiating channel to domain ${domainId}`)
77-
// Use ChainId format (lowercase 'domain') for transaction
78-
const callInitiateChannel = consensusApi.tx.messenger.initiateChannel({ domain: domainId })
77+
const callInitiateChannel = initiateChannel(consensusApi, { domainId })
7978
await signAndSendTx(owner.keyringPair, callInitiateChannel, {}, [], false)
8079

8180
// Wait for channel to be open (similar to official Subspace test pattern)

0 commit comments

Comments
 (0)