Skip to content

Commit f524fa0

Browse files
committed
fix(sdk-core): add authorize to NO_RECIPIENT_TX_TYPES
SOL authorize stake account operations (intentType 'authorize') have no explicit transfer recipient. Without this entry, resolveEffectiveTxParams would throw InvalidTransactionError when signing an authorize transaction with no buildParams. Ticket: WCI-1111 Session-Id: 1c178dac-6528-4ee7-937d-974216871d68 Task-Id: e91df1ba-6cf4-4b0c-8df2-2588f555481e
1 parent 070fb5d commit f524fa0

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

modules/sdk-core/src/bitgo/utils/tss/recipientUtils.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,9 @@ export const NO_RECIPIENT_TX_TYPES = new Set([
6969

7070
// SOL: deactivate stake account — no on-chain transfer recipient.
7171
'deactivate',
72+
73+
// SOL: authorize stake account — no transfer recipient.
74+
'authorize',
7275
]);
7376

7477
/**

modules/sdk-core/test/unit/bitgo/utils/tss/recipientUtils.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -360,6 +360,11 @@ describe('recipientUtils', function () {
360360
assert.doesNotThrow(() => resolveEffectiveTxParams(txRequest, {}));
361361
});
362362

363+
it('does not throw for "authorize" (solAuthorizeIntent)', function () {
364+
const txRequest = makeTxRequest({ intent: { intentType: 'authorize' } as any });
365+
assert.doesNotThrow(() => resolveEffectiveTxParams(txRequest, {}));
366+
});
367+
363368
it('throws for stakingAuthorize — must be validated at coin layer', function () {
364369
const txRequest = makeTxRequest({ intent: { intentType: 'stakingAuthorize' } as any });
365370
assert.throws(() => resolveEffectiveTxParams(txRequest, {}), InvalidTransactionError);

0 commit comments

Comments
 (0)