Skip to content

Conversation

@levoff
Copy link

@levoff levoff commented Sep 6, 2022

I used this package in my project and made some additions mainly for error handling.

  • Added errorCode=-32603&errorMessage=Missing+shared+secret error handling
  • Added keys storing into @AppStorage for convenience

Hope 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

@mcgaryes
Copy link
Contributor

mcgaryes commented Oct 6, 2022

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?
Copy link
Contributor

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?
Copy link
Contributor

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?

@mcgaryes
Copy link
Contributor

mcgaryes commented Oct 6, 2022

Oh and if you could update the README.md with iOS14 as the required minimum version that would be great as well!

@zekibaklan
Copy link

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 :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants