Skip to content

Commit b4ac52b

Browse files
committed
fix(sdk-coin-sol): set correct jito activate instruction indexes
Ticket: SC-2760
1 parent a2eac5d commit b4ac52b

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

modules/sdk-coin-sol/src/lib/constants.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ export const marinadeStakingActivateInstructionsIndexes = {
115115

116116
/** Const to check the order of the Jito Staking Activate instructions when decode */
117117
export const jitoStakingActivateInstructionsIndexes = {
118-
AtaInit: 0,
118+
InitializeAssociatedTokenAccount: 0,
119119
DepositSol: 1,
120120
} as const;
121121

modules/sdk-coin-sol/test/unit/transactionBuilder/stakingActivateBuilder.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -156,10 +156,9 @@ describe('Sol Staking Activate Builder', () => {
156156
const rawTx = tx.toBroadcastFormat();
157157
should.equal(Utils.isValidRawTransaction(rawTx), true);
158158
should.equal(rawTx, testData.JITO_STAKING_ACTIVATE_SIGNED_TX);
159-
factory.from(testData.JITO_STAKING_ACTIVATE_SIGNED_TX);
160-
const coin = coins.get('tsol');
161-
const tx2 = new Transaction(coin);
162-
tx2.fromRawTransaction(rawTx);
159+
const builderFromRawTx = factory.from(rawTx);
160+
const rebuiltTx = await builderFromRawTx.build();
161+
rebuiltTx.toJson().instructionsData.should.deepEqual(txJson.instructionsData);
163162
});
164163

165164
it('build a create and delegate staking signed tx with memo', async () => {

0 commit comments

Comments
 (0)