@dubsdotapp/expo 0.2.11 → 0.2.13

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.11",
3
+ "version": "0.2.13",
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/provider.tsx CHANGED
@@ -137,7 +137,7 @@ export function DubsProvider({
137
137
  appIcon={uiConfig.appIcon}
138
138
  tagline={uiConfig.tagline}
139
139
  redirectUri={redirectUri}
140
- appUrl={appUrl}
140
+ appUrl={appUrl || uiConfig.appUrl}
141
141
  >
142
142
  {(adapter) => (
143
143
  <ManagedInner
package/src/types.ts CHANGED
@@ -398,5 +398,6 @@ export interface UiConfig {
398
398
  accentColor?: string;
399
399
  appIcon?: string;
400
400
  appName?: string;
401
+ appUrl?: string;
401
402
  tagline?: string;
402
403
  }
@@ -134,14 +134,16 @@ export class PhantomDeeplinkAdapter implements WalletAdapter {
134
134
  const redirectLink = `${this.config.redirectUri}/${requestId}`;
135
135
  console.log(TAG, `connect() requestId=${requestId} redirectLink=${redirectLink}`);
136
136
 
137
+ // app_url is required by Phantom — default to redirectUri if not provided
138
+ const appUrl = this.config.appUrl || this.config.redirectUri;
139
+ console.log(TAG, 'Using app_url:', appUrl);
140
+
137
141
  const params = new URLSearchParams({
138
142
  dapp_encryption_public_key: dappPubBase58,
139
143
  cluster: this.config.cluster || 'mainnet-beta',
140
144
  redirect_link: redirectLink,
145
+ app_url: appUrl,
141
146
  });
142
- if (this.config.appUrl) {
143
- params.set('app_url', this.config.appUrl);
144
- }
145
147
 
146
148
  const url = `https://phantom.app/ul/v1/connect?${params.toString()}`;
147
149
  console.log(TAG, 'Opening Phantom connect deeplink...');