Skip to content

Conversation

@untalfranfernandez
Copy link
Contributor

Summary

Now, instead of initializing the non-custodial signer stack when the SDK is initialized, we are allowing the developer to start it only for a given view.

For instance, in the EVM demo app, the TransferDashboardView now has:

 .crossmintNonCustodialSigners(sdk, presentingCallback: $nonCustodialSignerCallback)
 .sheet(item: $nonCustodialSignerCallback) { callback in
      OTPValidatorView(nonCustodialSignerCallback: callback)
 }

That will only require the SDK (which can be used as it is now with the environment variable or any other method) and the state that determines the sheet's appearance.

There is a convenience method in case the sheet is the selected option to render the custom view that will handle the callback:

.crossmintNonCustodialSignersSheet(sdk, otpView: { callback in
     OTPValidatorView(nonCustodialSignerCallback: callback)
})

This is how the EVM demo app looks after these changes:

signing-otp.mp4

Disclaimer.

These changes to the EVM demo app make the message signing in the BalanceDashboardView unusable because the email signer is not allowed for that.

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.

2 participants