diff --git a/js/packages/mobile-wallet-adapter-protocol/android/build.gradle b/js/packages/mobile-wallet-adapter-protocol/android/build.gradle index 98f07fc39..fdb715643 100644 --- a/js/packages/mobile-wallet-adapter-protocol/android/build.gradle +++ b/js/packages/mobile-wallet-adapter-protocol/android/build.gradle @@ -132,7 +132,7 @@ def kotlin_version = getExtOrDefault('kotlinVersion') dependencies { //noinspection GradleDynamicVersion implementation "com.facebook.react:react-native:+" // From node_modules - implementation "com.solanamobile:mobile-wallet-adapter-clientlib:0.2.0" + implementation "com.solanamobile:mobile-wallet-adapter-clientlib:0.2.1" implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.2" } diff --git a/js/packages/mobile-wallet-adapter-protocol/android/src/main/java/com/solanamobile/mobilewalletadapter/reactnative/SolanaMobileWalletAdapterModule.kt b/js/packages/mobile-wallet-adapter-protocol/android/src/main/java/com/solanamobile/mobilewalletadapter/reactnative/SolanaMobileWalletAdapterModule.kt index fa0751584..49f4bb753 100644 --- a/js/packages/mobile-wallet-adapter-protocol/android/src/main/java/com/solanamobile/mobilewalletadapter/reactnative/SolanaMobileWalletAdapterModule.kt +++ b/js/packages/mobile-wallet-adapter-protocol/android/src/main/java/com/solanamobile/mobilewalletadapter/reactnative/SolanaMobileWalletAdapterModule.kt @@ -41,6 +41,15 @@ class SolanaMobileWalletAdapterModule(reactContext: ReactApplicationContext) : return "SolanaMobileWalletAdapter" } + @ReactMethod + fun isWalletAvailable(promise: Promise) { + promise.resolve( + LocalAssociationIntentCreator.isWalletEndpointAvailable( + reactApplicationContext.packageManager + ) + ) + } + @ReactMethod fun startSession(config: ReadableMap?, promise: Promise) = launch { mutex.lock()