workbenchapp / solana-workbench

Your one-stop shop for developing on Solana
MIT License
63 stars 7 forks source link

New Token Mint never shows up #272

Closed nathanleclaire closed 2 years ago

nathanleclaire commented 2 years ago

I'd expect it to show in the list, maybe select for the right hand pane too. User won't know to click refresh. (Having to have refresh feels like admitting defeat, but that's a whole other item)

https://user-images.githubusercontent.com/1476820/179807555-b3bc05ae-7a40-4588-964b-da879d18fcb5.mov

SvenDowideit commented 2 years ago

yeah, this is a shitty validator timing issue. it takes quite a few seconds for the account to be accessible, which is too long for the toast to trigger it.

use the program changes page to create a mint (in the account view), and then hit the refresh button, and you'll see what's up.

and i'm hesitant to use the lesser commitment setting, because then it shows up, but using the buttons too quickly probably fails.

ideally, we'd have 2 queries per account - (or even 3 - processed...) one for its on the validator and probably ok, which can render it, and then a wait til confirmed to enable to buttons.

https://docs.solana.com/developing/clients/jsonrpc-api#configuring-state-commitment

I'm not sure that this is fixable with a quick hack for 0.4.0 tho

SvenDowideit commented 2 years ago

well, clearly i lied - this tooke me down a refresh commitment rabbithole that makes everything update more snappily - except (so far) the original bug report :)

SvenDowideit commented 2 years ago

and rewriting the mint bit to useQuery fixes this one.