-
Notifications
You must be signed in to change notification settings - Fork 10
Add error handling and keys storage #5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
Sorry for the extremely delayed response 😬 hopefully your still interested in getting this pr merged in. I had a couple of comments, the error handling piece looks good to go, just some questions/comments on brining UserDefaults into the the view ConnectViewModel. Let me know if you have any questions! Thanks, Eric |
| @AppStorage("k_wallet_phantom_session") var session: String? | ||
| @State var transactionSignature: String? | ||
|
|
||
| @State var balance_Sol: Double? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's keep formatting similar here and use camel casing rather than snake casing.
| /// Saving keys in appstorage(user defaults). | ||
| /// THIS IS NOT SECURE! FOR DEMO ONLY! | ||
| /// Keychain can be used as a ssecure storage | ||
| @AppStorage("k_dap_secret_key") var secretKey: Data? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would rather pass these values into the init method rather than have them be part of the core code. Then this implementation could simple be moved over to the example app. We could just have a convenience init method that is purely for testing purposes. Thought?
|
Oh and if you could update the README.md with iOS14 as the required minimum version that would be great as well! |
|
hey , I can not integrate it into my spm project, I do the specified things, for example branch with main . then it gives solanawebsocket error . could it be because it is incompatible with the new xcode15 . I can't integrate spm into my project it took me a lot of time to try this :( |
I used this package in my project and made some additions mainly for error handling.
errorCode=-32603&errorMessage=Missing+shared+secreterror handling@AppStoragefor convenienceHope this will be useful.
p.s. I will continue to add integration and handling of all error codes listed here: https://docs.phantom.app/integrating/errors