Skip to content
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

Copy over ClientTrustUseCase and integrate #2

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Michaelsulistio
Copy link
Collaborator

WIP

  • Currently failing the ClientTrustUseCase when attempting to verify package in Authorization step.

val verified = try {
verifier.verify(callingPackage, URI.create(clientIdentityUri.toString()))
} catch (e: AndroidAppPackageVerifier.CouldNotVerifyPackageException) {
Log.w(TAG, "Package verification failed for callingPackage=$callingPackage, clientIdentityUri=$clientIdentityUri")
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The verification is failing here with the Log printing:

W/ClientTrustUseCase: Package verification failed for callingPackage=com.solana.mobilewalletadapter.fakedapp, clientIdentityUri=https://solana.com
W/ClientTrustUseCase: com.solana.digitalassetlinks.AndroidAppPackageVerifier$CouldNotVerifyPackageException: Could not verify package com.solana.mobilewalletadapter.fakedapp
W/ClientTrustUseCase: App-scoped authorization failed for 'com.solana.mobilewalletadapter.fakedapp'


backgroundScope.launch {
val verificationState = withTimeoutOrNull(SOURCE_VERIFICATION_TIMEOUT_MS) {
verify.await()
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is where the verification call is triggered.

@@ -66,6 +74,13 @@ class SolanaMobileWalletAdapterModule(val reactContext: ReactApplicationContext)
callback.invoke("ERROR", "Current implementation of fakewallet does not support remote clients")
return
}

clientTrustUseCase = ClientTrustUseCase(
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is where I instantiate the ClientTrustUseCase, aka when the scenario is created.

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.

1 participant