DEV Community

Discussion on: The Complete Guide to Full Stack Solana Development with React, Anchor, Rust, and Phantom

Collapse
 
0cv profile image
Christophe Vidal • Edited

sounds like a terrible idea for anything beyond a demo. What if the user clears his cookies or use another browser, then he loses his account data and starts from new? I could imagine that a base account could be generated from the public key of the provider/user to have something deterministic which can be safely retrieved and reused

EDIT: the method PublicKey.createWithSeed based on the user address, the program ID and a deterministic storage key that can be hardcoded in the front end app, is actually the solution to this

Thread Thread
 
thalesbmc profile image
Thales Brederodes

I agree, just for demo purpose. Thanks for sharing the right way.