Closed Sam2much96 closed 2 years ago
I see you're looking at the test project. This is only used for the purposes of automated testing of the library, and provides a useful way of setting a mnenomic to test with, for example when running CI with github actions. That way you don't need to change the testing script if you want to alter the test account that's being used.
It's not meant to show how to get the users mnemonic in a real life application - you could have the user enter a seedphrase and save it, or better yet generate a new seedphrase for them.
It does raise a good point of how to safely get access to a user's account within an application, and perhaps integration using services like walletconnect could be nice to look at.
Makes sense. I'm not familiar with github actions, so that went over my head. I included encrypt() and decrypt() functions in my code so user's mnemonics are protected. I'm building for a hackathon to build a game around a workable script, so i don't think I'll implement wallet connect, that's way too advanced for the scope of the project i'm trying to build. It's been nice talking with you dev, i"ll continue testing. I might push a PR once i'm done. I ended up breaking down alot of the test code into reusable functions, and i'm formatting them so no-code users and novice users can build gameplay on top of it. If the final code is beyond the scope of this repository, i'll make a fork and tag you in it. Ciao
I commented out this code line because i could already generate my test account's mnemonic from Algod sandbox. I'm not sure what this line does, Godot DOCs say it returns the value of an environment variable but I don't think on a test device like mobile or Linux, a user's account mnemonic would just be so easily accessible like that. Also, it cancels out whatever mnemonic string that's sent to the algod object so it's actually a hindrance rather than good line of code. I commented it out, but in case it's useful in some way that i don't know, please enlighten me!