Skip to content

Commit 69a9cb8

Browse files
committed
fix: add RedemptionRejected into redeem resolution
1 parent e4685f3 commit 69a9cb8

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

packages/fasset-indexer-api/src/analytics/explorer.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,12 @@ export class ExplorerAnalytics {
213213
resp.events.resolution = redemptionDefault
214214
return resp
215215
}
216+
const redemptionRejected = await em.findOne(Entities.RedemptionRejected,
217+
{ redemptionRequested }, { populate: [ 'evmLog.block', 'evmLog.transaction.source' ]})
218+
if (redemptionRejected != null) {
219+
resp.events.resolution = redemptionRejected
220+
return resp
221+
}
216222
const redemptionBlocked = await em.findOne(Entities.RedemptionPaymentBlocked,
217223
{ redemptionRequested }, { populate: [ 'evmLog.block', 'evmLog.transaction.source' ] })
218224
if (redemptionBlocked != null) {

packages/fasset-indexer-api/src/analytics/interface.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ export type RedeemEventDetails = EventDetails<
7979
Entities.RedemptionRequested
8080
| Entities.RedemptionPerformed
8181
| Entities.RedemptionDefault
82+
| Entities.RedemptionRejected
8283
| Entities.RedemptionPaymentBlocked
8384
| Entities.RedemptionPaymentFailed
8485
>

0 commit comments

Comments
 (0)