Inflow-Music-Co / inflow-music-react

Inflow Music react front-end
inflow-music-react.vercel.app
MIT License
2 stars 0 forks source link

Server doesn't record user token sale #26

Open derivativedegen opened 2 years ago

derivativedegen commented 2 years ago

Issue

The server currently works correctly when a user buys an artist's token. Once a user buys, the socialTokenAddress is sent to the server and recorded in the DB user record. When pulling data into front end dashboard page, this is now showing. However, when selling an artist's tokens, if the balance is now 0, the artist is still showing in the when front end pulls user's owned token data.

Expectation

When a user sells an artist token, if the user's balance is now 0, the back end should erase the artist socialTokenAddress from the user record.

Considerations

Do we need to also monitor user's token balance's and push it to the back end each time the user loads their dashboard? This way we can keep track of balances to see if, after a sell execution, the back end check's if user's balance is now 0 and therefore should remove the artist social token address?

derivativedegen commented 2 years ago
server bug on sell

I bought LTA, then bought 5 HFT, then sold 5 HFT to have zero, and then bought 3 HFT back. Server console is showing i have HFT twice which makes front end show HFT data twice. Server should only show HFT once.

0xmovses commented 2 years ago

noted, will get this to work as expected.