File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
packages/fasset-indexer-api/src/analytics Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -570,7 +570,7 @@ export class ExplorerAnalytics extends SharedAnalytics {
570570 fasset : core . FAssetType ,
571571 reference : string ,
572572 filters : FilterQuery < Entities . UnderlyingVoutReference > = { }
573- ) : Promise < Entities . UnderlyingVoutReference | null > {
573+ ) : Promise < Entities . UnderlyingVoutReference | Entities . UnderlyingVoutReference [ ] | null > {
574574 const transactions = await em . find ( Entities . UnderlyingVoutReference ,
575575 { fasset, reference, ...filters as object } ,
576576 {
@@ -580,8 +580,8 @@ export class ExplorerAnalytics extends SharedAnalytics {
580580 )
581581 if ( transactions . length == 0 ) return null
582582 const successful = transactions . filter ( x => x . transaction . result == XRP_TRANSACTION_SUCCESS_CODE )
583- if ( successful . length > 0 ) return successful [ 0 ]
584- return transactions [ 0 ]
583+ if ( successful . length > 0 ) return successful . length > 1 ? successful : successful [ 0 ]
584+ return transactions . length > 1 ? transactions : transactions [ 0 ]
585585 }
586586
587587 protected eventNameToTransactionType ( name : string ) : ExplorerType . TransactionType {
Original file line number Diff line number Diff line change @@ -127,7 +127,7 @@ interface TransactionDetails<T,U> {
127127}
128128
129129interface EventDetails < T , U > {
130- underlyingTransaction ?: Entities . UnderlyingVoutReference
130+ underlyingTransaction ?: Entities . UnderlyingVoutReference | Entities . UnderlyingVoutReference [ ]
131131 events : {
132132 original : T
133133 resolution ?: U
You can’t perform that action at this time.
0 commit comments