You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I looked into this a bit, but we need some more investigation...
The closing amount is indeed duplicated in this API response. The cause of this is that the Transaction type in our API definition has a closing amount and potentially a payment transaction (which has a closing amount in it).
I think the fact that the txn might not have a payment txn means it's not a duplicated field 100% of the time, and I don't really see a reason to remove the closing amount from the PaymentTransaction type either.
Like I said, I just took a brief look at this so maybe there is a way we can separate these and remove one that's not immediately obvious.
"I think the fact that the txn might not have a payment txn "
I think the issue there is that the json spec is trying to model inheritance via composition. A transaction does not 'have' a payment transaction - it either 'is' a payment transaction or is not.
A community member (Frank) noticed that the closing amount field in the transaction payload
indexer/api/converter_utils.go
Line 311 in 99ab66f
indexer/api/converter_utils.go
Line 489 in 99ab66f
Are both of these necessary?
The text was updated successfully, but these errors were encountered: