Hello,
So I am developing an app that will take a user’s COSMOS address and see all their balances (including tokens) and transactions.
One issue I came across is an operation called “swap_within_batch”.
Here is a transaction including that operation:
https://node.atomscan.com/txs/DE4565BC673DE5133F8293C0E88526289C486D5237D146E1DB4DF74DEAE9A1AC
You can see that we are swapping ATOM for a token. There is a transfer to represent the sending of the “80120uatom”. But their is no corresponding transfer for the receiving of the token.
Without this information, the net sum of the transactions I can show the user will not add up to the total balance, creating a confusing discrepancy.
Is there information missing from that query, or is there another way to find this information?
Note that I query all the transactions for the address using this:
And there isn’t anything else there to take this into account.