Skip to content

Commit

Permalink
Fix displaying negative allowance changes
Browse files Browse the repository at this point in the history
  • Loading branch information
buberdds committed Nov 6, 2024
1 parent f40ecfd commit e840e4e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/vendors/nexus.ts
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,10 @@ function parseTransactionsList(list: (NexusTransaction | ExtendedRuntimeTransact
const parsed: Transaction = {
amount:
(t.body as { amount?: StringifiedBigInt })?.amount ||
(t.body as { amount_change?: StringifiedBigInt })?.amount_change ||
((t.body as { amount_change?: StringifiedBigInt })?.amount_change &&
((t.body as { negative?: boolean })?.negative
? `-${(t.body as { amount_change?: StringifiedBigInt }).amount_change}`
: (t.body as { amount_change?: StringifiedBigInt }).amount_change)) ||
undefined,
fee: t.fee,
from: t.sender,
Expand Down

0 comments on commit e840e4e

Please sign in to comment.