@@ -281,7 +281,7 @@ const addressRoutes: FastifyPluginCallback<Record<never, never>, Server, ZodType
281
281
282
282
async function getIsomorphicTx ( btcTx : BTCTransaction ) {
283
283
const isomorphicTx : IsomorphicTransaction = {
284
- ckbRawTx : undefined ,
284
+ ckbVirtualTx : undefined ,
285
285
ckbTx : undefined ,
286
286
status : { confirmed : false } ,
287
287
} ;
@@ -293,13 +293,13 @@ const addressRoutes: FastifyPluginCallback<Record<never, never>, Server, ZodType
293
293
const job = await fastify . transactionProcessor . getTransactionRequest ( btcTx . txid ) ;
294
294
if ( job ) {
295
295
const { ckbRawTx } = job . data . ckbVirtualResult ;
296
- isomorphicTx . ckbRawTx = ckbRawTx ;
296
+ isomorphicTx . ckbVirtualTx = ckbRawTx ;
297
297
// if the job is completed, get the ckb tx hash and fetch the ckb tx
298
298
const state = await job . getState ( ) ;
299
299
if ( state === 'completed' ) {
300
300
const ckbTx = await fastify . ckb . rpc . getTransaction ( job . returnvalue ) ;
301
301
// remove ckbRawTx to reduce response size
302
- isomorphicTx . ckbRawTx = undefined ;
302
+ isomorphicTx . ckbVirtualTx = undefined ;
303
303
setCkbTxAndStatus ( ckbTx ) ;
304
304
}
305
305
return isomorphicTx ;
@@ -381,19 +381,19 @@ const addressRoutes: FastifyPluginCallback<Record<never, never>, Server, ZodType
381
381
let txs = await Promise . all (
382
382
btcTxs . map ( async ( btcTx ) => {
383
383
const isomorphicTx = await getIsomorphicTx ( btcTx ) ;
384
- const isRgbpp = isomorphicTx . ckbRawTx || isomorphicTx . ckbTx ;
384
+ const isRgbpp = isomorphicTx . ckbVirtualTx || isomorphicTx . ckbTx ;
385
385
if ( ! isRgbpp ) {
386
386
return {
387
387
btcTx,
388
388
isRgbpp : false ,
389
389
} as const ;
390
390
}
391
391
392
- const inputs = isomorphicTx . ckbRawTx ?. inputs || isomorphicTx . ckbTx ?. inputs || [ ] ;
392
+ const inputs = isomorphicTx . ckbVirtualTx ?. inputs || isomorphicTx . ckbTx ?. inputs || [ ] ;
393
393
const inputCells = await fastify . ckb . getInputCellsByOutPoint ( inputs . map ( ( input ) => input . previousOutput ! ) ) ;
394
394
const inputCellOutputs = inputCells . map ( ( cell ) => cell . cellOutput ) ;
395
395
396
- const outputs = isomorphicTx . ckbRawTx ?. outputs || isomorphicTx . ckbTx ?. outputs || [ ] ;
396
+ const outputs = isomorphicTx . ckbVirtualTx ?. outputs || isomorphicTx . ckbTx ?. outputs || [ ] ;
397
397
398
398
return {
399
399
btcTx,
0 commit comments