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 3330e51 commit fdeaab0
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 @@ -275,7 +275,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 fdeaab0

Please sign in to comment.