Skip to content

Commit

Permalink
Fix uiTokenAmount fields
Browse files Browse the repository at this point in the history
  • Loading branch information
gagliardetto committed Sep 14, 2023
1 parent d24d346 commit c8e10f3
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions adapters.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,18 @@ func adaptTransactionMetaToExpectedOutput(m map[string]any) map[string]any {
if !ok {
uiTokenAmount["decimals"] = 0
}
_, ok = uiTokenAmount["uiAmount"]
if !ok {
uiTokenAmount["uiAmount"] = nil
}
_, ok = uiTokenAmount["amount"]
if !ok {
uiTokenAmount["amount"] = "0"
}
_, ok = uiTokenAmount["uiAmountString"]
if !ok {
uiTokenAmount["uiAmountString"] = "0"
}
}
}
}
Expand Down

0 comments on commit c8e10f3

Please sign in to comment.