@dubsdotapp/expo 0.2.47 → 0.2.48

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/dist/index.js CHANGED
@@ -1382,32 +1382,6 @@ var styles = import_react_native3.StyleSheet.create({
1382
1382
  // src/managed-wallet.tsx
1383
1383
  var import_jsx_runtime2 = require("react/jsx-runtime");
1384
1384
  var TAG3 = "[Dubs:ManagedWallet]";
1385
- function getDefaultRedirectUri() {
1386
- if (import_react_native4.Platform.OS !== "ios") return void 0;
1387
- try {
1388
- const expoLinking = require("expo-linking");
1389
- if (expoLinking.createURL) {
1390
- const uri = expoLinking.createURL("phantom-callback");
1391
- console.log(TAG3, "Auto-detected redirect URI via expo-linking:", uri);
1392
- return uri;
1393
- }
1394
- } catch (e) {
1395
- console.log(TAG3, "expo-linking createURL failed:", e instanceof Error ? e.message : e);
1396
- }
1397
- try {
1398
- const Constants = require("expo-constants").default;
1399
- const scheme = Constants.expoConfig?.scheme;
1400
- if (scheme) {
1401
- const uri = `${scheme}://phantom-callback`;
1402
- console.log(TAG3, "Auto-detected redirect URI via expo-constants:", uri);
1403
- return uri;
1404
- }
1405
- } catch (e) {
1406
- console.log(TAG3, "expo-constants fallback failed:", e instanceof Error ? e.message : e);
1407
- }
1408
- console.log(TAG3, "Could not auto-detect redirect URI on iOS \u2014 pass redirectUri to DubsProvider");
1409
- return void 0;
1410
- }
1411
1385
  var phantomSingleton = null;
1412
1386
  function getOrCreatePhantomAdapter(config) {
1413
1387
  if (!phantomSingleton) {
@@ -1454,20 +1428,14 @@ function ManagedWalletProvider({
1454
1428
  const [connecting, setConnecting] = (0, import_react2.useState)(false);
1455
1429
  const [isReady, setIsReady] = (0, import_react2.useState)(false);
1456
1430
  const [error, setError] = (0, import_react2.useState)(null);
1457
- const usePhantom = import_react_native4.Platform.OS === "ios";
1458
- const resolvedRedirectUri = usePhantom ? redirectUri || getDefaultRedirectUri() : void 0;
1459
- console.log(TAG3, `Platform: ${import_react_native4.Platform.OS}, redirectUri: ${resolvedRedirectUri ?? "none"} (explicit: ${!!redirectUri}), usePhantom: ${usePhantom}`);
1431
+ const usePhantom = import_react_native4.Platform.OS === "ios" && !!redirectUri;
1432
+ console.log(TAG3, `Platform: ${import_react_native4.Platform.OS}, redirectUri: ${redirectUri ? "provided" : "not set"}, usePhantom: ${usePhantom}`);
1460
1433
  const adapterRef = (0, import_react2.useRef)(null);
1461
1434
  const transactRef = (0, import_react2.useRef)(null);
1462
1435
  if (!adapterRef.current) {
1463
1436
  if (usePhantom) {
1464
- if (!resolvedRedirectUri) {
1465
- throw new Error(
1466
- '@dubsdotapp/expo: Could not auto-detect redirect URI on iOS. Either set a "scheme" in your app.json or pass redirectUri to <DubsProvider>.'
1467
- );
1468
- }
1469
1437
  adapterRef.current = getOrCreatePhantomAdapter({
1470
- redirectUri: resolvedRedirectUri,
1438
+ redirectUri,
1471
1439
  appUrl,
1472
1440
  cluster,
1473
1441
  storage