MoralisWeb3 / issue-tracker

25 stars 7 forks source link

BSCTokenBalance table not updating token balance on transfer #90

Closed keyoke-code closed 3 years ago

keyoke-code commented 3 years ago

Hi Team Moralis,

I've run into a couple of issues that I have detailed on the forum here: https://forum.moralis.io/t/nft-missing-from-bscnftowners-table/1515/14. I thought it would be helpful to also detail my analysis here. This item is for an issue I've run into using the BscTokenBalance table on mainnet.

I first noticed this on https://laeartv72t0b.usemoralis.com:2053/server. Tokens were unstaked from the BitDiamond staking dapp and the transaction was picked up in the BscTokenTransfers table (https://bscscan.com/tx/0xecef8a9a6e7b3e351b2c59037e86d671be77789f2508d50b28ab0c842bb8a322) but have not been represented in the line item in BscTokenBalance.

I’ve been able to reproduce the BscTokenBalance issue on a another server (https://bttcjtdkuqd4.moralisweb3.com:2053/server).

The transaction is this one here: https://bscscan.com/tx/0xecef8a9a6e7b3e351b2c59037e86d671be77789f2508d50b28ab0c842bb8a322. The txn is noted in BscTokenTransfers but does not update the balance in BscTokenBalance. I suspect this is something of a new issue, as this isn’t something I’ve ever experienced in many test cycles on an older Moralis server running over testnet.

It might be a separate issue but I have also seen the same thing with NFTs. See transaction https://bscscan.com/tx/0x6c805b55be29566654489b7c4158f868dbf05866801cbe670ff6157ff643ad7a in relation to server https://laeartv72t0b.usemoralis.com:2053/server. The minting of this token has been picked up by the BscNFTTransfers table but isn't present in the BscNFTOwners table.

Are you able to have a look please? My dapps rely on BscTokenBalance and BSCNFTOwners data and don’t work without it :(. I'm happy to assist anyway I can, if that's helpful :).

Thank you very much!

gerardo15 commented 3 years ago

Hello!

Thanks for the detailed explanation!

New version is out that fixes this issue 0.0.248!

keyoke-code commented 3 years ago

Thank you @gerardo15 you guys rock!!

keyoke-code commented 3 years ago

@gerardo15 - is that fix for the balance issue? I was wondering if the missing NFT on the NFTOwners table was related in some way? Should I raise a separate item for the NFT issue? Thank you again!

gerardo15 commented 3 years ago

@keyoke-code the nft was fixed on 0.0.247. are you still experiencing since you updated to that version?

keyoke-code commented 3 years ago

@gerardo15 ah yes, of course! Thank you, I think it may have been before 0.0.247. Thank you again for the quick fixes 👍

keyoke-code commented 3 years ago

@gerardo15, retested, now working like a dream 💪