stove-labs / portfolio-manager

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Incorrect spot price for TokenBalanceWidget

Matehoo opened this issue · comments

Description:
There is some deviation in prices for non-native tokens

Screenshot 2022-10-17 at 15 11 40

Screenshot 2022-10-17 at 15 45 39

Here you can find exact token balance under `tez_pool` key and `token_pool` key:

https://better-call.dev/mainnet/KT1K4EwTpbvYN9agJdjpyJm4ZZdhpUNKB3F6/storage

The root of the issue should be that someone send tokens directly to pool address instead of through proper ui.

Expected behavior:
Show correct prices for all tokens

Actual behavior:
Incorrect prices

Possible solution:
Fetch token balances from pool storage instead of tzkt.io token balance and native token balance