-
Notifications
You must be signed in to change notification settings - Fork 100
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(swaps): add more analytics for debugging (#3810)
### Description We are still getting many errors that indicate that we are allowing the user to proceed with a swap amount greater than their balance. It's not clear why this still happens, because we have a (high) fee estimation in place already. Ideally I'd like to have data to be able to say "oh yes, this swap was expected to fail because the swap amount was X, required fee was Y, and X + Y > the total balance". i think then we could go back and tweak the logic required for X, when we have a better idea of what X and Y are. Sadly during my debugging today I think some errors are being thrown at the calculation for the gas fee 🫠 so we may not have the value for Y. This PR adds data for - total "from" token balance at the time of executing the swap - context id's used for the swap transactions so that we can also check the TransactionEvents which contains some information about gas / errors etc. If an error is thrown when calculating the gas fee, then we will be able to tell (from the lack of the fee event). - add fee currency to the estimation and error TransactionEvents, to see if there's any correlation of token with errors. ### Test plan n/a ### Related issues n/a ### Backwards compatibility Y
- Loading branch information
1 parent
e66b1ed
commit daa8973
Showing
5 changed files
with
120 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.