@dubsdotapp/expo 0.2.21 → 0.2.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dubsdotapp/expo",
3
- "version": "0.2.21",
3
+ "version": "0.2.22",
4
4
  "description": "React Native SDK for the Dubs betting platform",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",
package/src/index.ts CHANGED
@@ -107,5 +107,5 @@ export type {
107
107
 
108
108
  // Utils
109
109
  export { signAndSendBase64Transaction } from './utils/transaction';
110
- export { getDeviceInfo } from './utils/device';
110
+ export { getDeviceInfo, isSolanaSeeker } from './utils/device';
111
111
  export type { DeviceInfo } from './utils/device';
@@ -4,6 +4,7 @@ import { MwaWalletAdapter } from './wallet/mwa-adapter';
4
4
  import { PhantomDeeplinkAdapter } from './wallet/phantom-deeplink';
5
5
  import type { PhantomSession } from './wallet/phantom-deeplink';
6
6
  import type { WalletAdapter } from './wallet/types';
7
+ import { isSolanaSeeker } from './utils/device';
7
8
  import { ConnectWalletScreen } from './ui/ConnectWalletScreen';
8
9
  import type { ConnectWalletScreenProps } from './ui/ConnectWalletScreen';
9
10
  import type { TokenStorage } from './storage';
@@ -94,11 +95,12 @@ export function ManagedWalletProvider({
94
95
  const [error, setError] = useState<string | null>(null);
95
96
 
96
97
  // Determine which adapter to use:
97
- // - iOS always uses Phantom deeplinks
98
- // - Android uses MWA (default)
99
- const usePhantom = Platform.OS === 'ios' && !!redirectUri;
98
+ // - Solana Seeker (Android) MWA (native Mobile Wallet Adapter support)
99
+ // - Everything else (iOS + regular Android) Phantom deeplinks
100
+ const seeker = Platform.OS === 'android' && isSolanaSeeker();
101
+ const usePhantom = !seeker && !!redirectUri;
100
102
 
101
- console.log(TAG, `Platform: ${Platform.OS}, redirectUri: ${redirectUri ? 'provided' : 'not set'}, usePhantom: ${usePhantom}`);
103
+ console.log(TAG, `Platform: ${Platform.OS}, seeker: ${seeker}, redirectUri: ${redirectUri ? 'provided' : 'not set'}, usePhantom: ${usePhantom}`);
102
104
 
103
105
  const adapterRef = useRef<WalletAdapter | null>(null);
104
106
  const transactRef = useRef<any>(null);
@@ -16,6 +16,19 @@ export interface DeviceInfo {
16
16
  isDevice: boolean | null;
17
17
  }
18
18
 
19
+ /**
20
+ * Detect Solana Seeker device (synchronous — safe to call during render).
21
+ * Checks brand from expo-device; returns false if expo-device isn't installed.
22
+ */
23
+ export function isSolanaSeeker(): boolean {
24
+ try {
25
+ const Device = require('expo-device');
26
+ return Device.brand?.toLowerCase() === 'solanamobile';
27
+ } catch {
28
+ return false;
29
+ }
30
+ }
31
+
19
32
  export async function getDeviceInfo(): Promise<DeviceInfo> {
20
33
  try {
21
34
  const Device = require('expo-device');