Skip to content

Commit 15ca3fc

Browse files
committed
fix tests
1 parent c63fcd2 commit 15ca3fc

File tree

3 files changed

+10
-12
lines changed

3 files changed

+10
-12
lines changed

platforms/solana/__tests__/integration/tokenBridge.test.ts

+9-9
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ describe('TokenBridge Tests', () => {
204204
expect(attestTx.chain).toEqual(chain);
205205

206206
const { transaction } = attestTx;
207-
expect(transaction.instructions).toHaveLength(2);
207+
expect(transaction.transaction.instructions).toHaveLength(2);
208208
});
209209

210210
test('Submit Attestation', async () => {
@@ -229,17 +229,17 @@ describe('TokenBridge Tests', () => {
229229
});
230230
const submitAttestation = tb.submitAttestation(vaa, sender);
231231

232-
const allTxns = [];
232+
const allTxns: SolanaUnsignedTransaction<TNet>[] = [];
233233
for await (const atx of submitAttestation) {
234234
allTxns.push(atx);
235235
}
236236
expect(allTxns).toHaveLength(3);
237237

238238
const [verifySig, postVaa, create] = allTxns;
239239
//
240-
expect(verifySig.transaction.instructions).toHaveLength(2);
241-
expect(postVaa.transaction.instructions).toHaveLength(1);
242-
expect(create.transaction.instructions).toHaveLength(1);
240+
expect(verifySig.transaction.transaction.instructions).toHaveLength(2);
241+
expect(postVaa.transaction.transaction.instructions).toHaveLength(1);
242+
expect(create.transaction.transaction.instructions).toHaveLength(1);
243243
});
244244
});
245245

@@ -260,7 +260,7 @@ describe('TokenBridge Tests', () => {
260260
const xfer = tb.transfer(sender, recipient, token, amount, payload);
261261
expect(xfer).toBeTruthy();
262262

263-
const allTxns = [];
263+
const allTxns: SolanaUnsignedTransaction<TNet>[] = [];
264264
for await (const tx of xfer) {
265265
allTxns.push(tx);
266266
}
@@ -271,7 +271,7 @@ describe('TokenBridge Tests', () => {
271271
expect(xferTx!.chain).toEqual(chain);
272272

273273
const { transaction } = xferTx;
274-
expect(transaction.instructions).toHaveLength(6);
274+
expect(transaction.transaction.instructions).toHaveLength(6);
275275
// ...
276276
});
277277

@@ -285,7 +285,7 @@ describe('TokenBridge Tests', () => {
285285
);
286286
expect(xfer).toBeTruthy();
287287

288-
const allTxns = [];
288+
const allTxns: SolanaUnsignedTransaction<TNet>[] = [];
289289
for await (const tx of xfer) {
290290
allTxns.push(tx);
291291
}
@@ -296,7 +296,7 @@ describe('TokenBridge Tests', () => {
296296
expect(xferTx.chain).toEqual(chain);
297297

298298
const { transaction } = xferTx;
299-
expect(transaction.instructions).toHaveLength(2);
299+
expect(transaction.transaction.instructions).toHaveLength(2);
300300
});
301301
});
302302
});

platforms/solana/protocols/core/src/core.ts

-2
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,6 @@ import {
3131
} from '@wormhole-foundation/connect-sdk';
3232
import { Wormhole as WormholeCoreContract } from './types';
3333
import {
34-
BridgeData,
35-
createBridgeFeeTransferInstruction,
3634
createPostMessageInstruction,
3735
createPostVaaInstruction,
3836
createReadOnlyWormholeProgramInterface,

platforms/solana/protocols/tokenBridge/src/tokenBridge.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ export class SolanaTokenBridge<N extends Network, C extends SolanaChains>
218218

219219
const msgFee = await this.coreBridge.getMessageFee();
220220
const transferIx = coreUtils.createBridgeFeeTransferInstruction(
221-
this.coreBridge.address,
221+
this.coreBridge.coreBridge.programId,
222222
senderAddress,
223223
msgFee,
224224
);

0 commit comments

Comments
 (0)