File tree Expand file tree Collapse file tree 4 files changed +7
-6
lines changed
modules/sdk-coin-sol/src/lib Expand file tree Collapse file tree 4 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -187,7 +187,8 @@ export type ValidInstructionTypes =
187
187
| 'TokenTransfer'
188
188
| 'SetPriorityFee'
189
189
| 'MintTo'
190
- | 'Burn' ;
190
+ | 'Burn'
191
+ | 'CustomInstruction' ;
191
192
192
193
export type StakingAuthorizeParams = {
193
194
stakingAddress : string ;
Original file line number Diff line number Diff line change @@ -239,7 +239,7 @@ export class Transaction extends BaseTransaction {
239
239
this . setTransactionType ( TransactionType . CustomTx ) ;
240
240
break ;
241
241
}
242
- if ( transactionType !== TransactionType . StakingAuthorizeRaw ) {
242
+ if ( transactionType !== TransactionType . StakingAuthorizeRaw && transactionType !== TransactionType . CustomTx ) {
243
243
this . loadInputsAndOutputs ( ) ;
244
244
}
245
245
} catch ( e ) {
Original file line number Diff line number Diff line change @@ -59,6 +59,8 @@ export class TransactionBuilderFactory extends BaseTransactionBuilderFactory {
59
59
return this . getStakingDelegateBuilder ( tx ) ;
60
60
case TransactionType . CloseAssociatedTokenAccount :
61
61
return this . getCloseAtaInitializationBuilder ( tx ) ;
62
+ case TransactionType . CustomTx :
63
+ return this . getCustomInstructionBuilder ( tx ) ;
62
64
default :
63
65
throw new InvalidTransactionError ( 'Invalid transaction' ) ;
64
66
}
Original file line number Diff line number Diff line change @@ -346,7 +346,7 @@ export function getTransactionType(transaction: SolTransaction): TransactionType
346
346
} else if ( matchTransactionTypeByInstructionsOrder ( instructions , ataCloseInstructionIndexes ) ) {
347
347
return TransactionType . CloseAssociatedTokenAccount ;
348
348
} else {
349
- throw new NotSupported ( 'Invalid transaction, transaction not supported or invalid' ) ;
349
+ return TransactionType . CustomTx ;
350
350
}
351
351
}
352
352
@@ -433,9 +433,7 @@ export function getInstructionType(instruction: TransactionInstruction): ValidIn
433
433
case COMPUTE_BUDGET :
434
434
return 'SetPriorityFee' ;
435
435
default :
436
- throw new NotSupported (
437
- 'Invalid transaction, instruction program id not supported: ' + instruction . programId . toString ( )
438
- ) ;
436
+ return 'CustomInstruction' ;
439
437
}
440
438
}
441
439
You can’t perform that action at this time.
0 commit comments