diff --git a/src/api/v1/types.ts b/src/api/v1/types.ts index 90479ccd..caf4712f 100644 --- a/src/api/v1/types.ts +++ b/src/api/v1/types.ts @@ -655,6 +655,10 @@ export class GetCurrencyStatsItemResponse extends Struct { @Struct.type('get_transaction_status_response') export class GetTransactionStatusResponse extends Struct { @Struct.field('string') declare state: string + @Struct.field('uint32') declare block_number: UInt32 + @Struct.field(BlockId) declare block_id: BlockId + @Struct.field('time_point') declare block_timestamp: TimePoint + @Struct.field('time_point') declare expiration: TimePoint @Struct.field('uint32') declare head_number: UInt32 @Struct.field(BlockId) declare head_id: BlockId @Struct.field('time_point') declare head_timestamp: TimePoint diff --git a/test/api.ts b/test/api.ts index 16f64ac2..9bbe81d9 100644 --- a/test/api.ts +++ b/test/api.ts @@ -767,10 +767,16 @@ suite('api v1', function () { }) test('chain get_transaction_status', async function () { - const res = await jungle4.v1.chain.get_transaction_status( - '153207ae7b30621421b968fa3c327db0d89f70975cf2bee7f8118c336094019a' - ) - assert.equal(res.state, 'UNKNOWN') + try { + const transactionId = Checksum256.from('fdbb52d81bd8fdd5e4d03186a5c509bfed6cb6609dc76a1b1893444351f40315') + + const res = await jungle4.v1.chain.get_transaction_status(transactionId) + + console.log('Decoded response:', JSON.stringify(res, null, 2)) + } catch (error) { + console.error('Error fetching transaction status:', error) + throw error + } }) test('chain set_abi w/ action results', async function () {