This repository was archived by the owner on Jul 18, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +11
-5
lines changed
backend/src/modules/rgbpp/transaction Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ export class RgbppTransactionService {
21
21
private ckbRpcService : CkbRpcWebsocketService ,
22
22
private bitcoinApiService : BitcoinApiService ,
23
23
private configService : ConfigService < Env > ,
24
- ) { }
24
+ ) { }
25
25
26
26
public async getLatestTransactions (
27
27
page : number ,
@@ -61,17 +61,23 @@ export class RgbppTransactionService {
61
61
} ,
62
62
script_type : 'lock' ,
63
63
} ,
64
- 'desc ' ,
64
+ 'asc ' ,
65
65
'0x64' ,
66
66
) ;
67
67
} ) ,
68
68
) ;
69
69
for ( const ckbTx of ckbTxs ) {
70
- if ( ckbTx . objects . length > 0 ) {
71
- const [ tx ] = ckbTx . objects ;
70
+ if ( ckbTx . objects . length === 0 ) {
71
+ continue ;
72
+ }
73
+
74
+ for ( const tx of ckbTx . objects ) {
72
75
const response = await this . ckbExplorerService . getTransaction ( tx . tx_hash ) ;
73
76
if ( response . data . attributes . is_rgb_transaction ) {
74
- return RgbppTransaction . fromCkbTransaction ( response . data . attributes ) ;
77
+ const rgbppTx = RgbppTransaction . fromCkbTransaction ( response . data . attributes ) ;
78
+ if ( rgbppTx . btcTxid === txid ) {
79
+ return rgbppTx ;
80
+ }
75
81
}
76
82
}
77
83
}
You can’t perform that action at this time.
0 commit comments