This commit is contained in:
Filip Dunder
2024-04-27 14:08:08 +02:00
parent 2ce963e2f8
commit c76a5d3065
2 changed files with 3 additions and 3 deletions

View File

@ -44,7 +44,7 @@ export class JitoTransactionExecutor implements TransactionExecutor {
transaction: VersionedTransaction,
payer: Keypair,
latestBlockhash: BlockhashWithExpiryBlockHeight,
): Promise<{ confirmed: boolean; signature?: string }> {
): Promise<{ confirmed: boolean; signature?: string; error?: string }> {
logger.debug('Starting Jito transaction execution...');
this.JitoFeeWallet = this.getRandomValidatorKey(); // Update wallet key each execution
logger.trace(`Selected Jito fee wallet: ${this.JitoFeeWallet.toBase58()}`);

View File

@ -21,7 +21,7 @@ export class WarpTransactionExecutor implements TransactionExecutor {
transaction: VersionedTransaction,
payer: Keypair,
latestBlockhash: BlockhashWithExpiryBlockHeight,
): Promise<{ confirmed: boolean; signature?: string }> {
): Promise<{ confirmed: boolean; signature?: string; error?: string }> {
logger.debug('Executing transaction...');
try {
@ -41,7 +41,7 @@ export class WarpTransactionExecutor implements TransactionExecutor {
const warpFeeTx = new VersionedTransaction(warpFeeMessage);
warpFeeTx.sign([payer]);
const response = await axios.post<{ confirmed: boolean; signature: string, error?: string }>(
const response = await axios.post<{ confirmed: boolean; signature: string; error?: string }>(
'https://tx.warp.id/transaction/execute',
{
transactions: [bs58.encode(warpFeeTx.serialize()), bs58.encode(transaction.serialize())],