@dubsdotapp/expo 0.2.23 → 0.2.24
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 +66 -67
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +50 -51
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/managed-wallet.tsx +4 -6
package/dist/index.js
CHANGED
|
@@ -561,7 +561,7 @@ var import_web34 = require("@solana/web3.js");
|
|
|
561
561
|
|
|
562
562
|
// src/managed-wallet.tsx
|
|
563
563
|
var import_react = require("react");
|
|
564
|
-
var
|
|
564
|
+
var import_react_native4 = require("react-native");
|
|
565
565
|
|
|
566
566
|
// src/wallet/mwa-adapter.ts
|
|
567
567
|
var import_web3 = require("@solana/web3.js");
|
|
@@ -1119,58 +1119,11 @@ var PhantomDeeplinkAdapter = class {
|
|
|
1119
1119
|
}
|
|
1120
1120
|
};
|
|
1121
1121
|
|
|
1122
|
-
// src/utils/device.ts
|
|
1123
|
-
var import_react_native2 = require("react-native");
|
|
1124
|
-
function isSolanaSeeker() {
|
|
1125
|
-
try {
|
|
1126
|
-
const Device = require("expo-device");
|
|
1127
|
-
return Device.brand?.toLowerCase() === "solanamobile";
|
|
1128
|
-
} catch {
|
|
1129
|
-
return false;
|
|
1130
|
-
}
|
|
1131
|
-
}
|
|
1132
|
-
async function getDeviceInfo() {
|
|
1133
|
-
try {
|
|
1134
|
-
const Device = require("expo-device");
|
|
1135
|
-
return {
|
|
1136
|
-
platform: import_react_native2.Platform.OS,
|
|
1137
|
-
modelName: Device.modelName,
|
|
1138
|
-
brand: Device.brand,
|
|
1139
|
-
manufacturer: Device.manufacturer,
|
|
1140
|
-
osName: Device.osName,
|
|
1141
|
-
osVersion: Device.osVersion,
|
|
1142
|
-
deviceType: Device.deviceType,
|
|
1143
|
-
deviceName: Device.deviceName,
|
|
1144
|
-
totalMemory: Device.totalMemory,
|
|
1145
|
-
modelId: Device.modelId,
|
|
1146
|
-
designName: Device.designName,
|
|
1147
|
-
productName: Device.productName,
|
|
1148
|
-
isDevice: Device.isDevice
|
|
1149
|
-
};
|
|
1150
|
-
} catch {
|
|
1151
|
-
return {
|
|
1152
|
-
platform: import_react_native2.Platform.OS,
|
|
1153
|
-
modelName: null,
|
|
1154
|
-
brand: null,
|
|
1155
|
-
manufacturer: null,
|
|
1156
|
-
osName: null,
|
|
1157
|
-
osVersion: null,
|
|
1158
|
-
deviceType: null,
|
|
1159
|
-
deviceName: null,
|
|
1160
|
-
totalMemory: null,
|
|
1161
|
-
modelId: null,
|
|
1162
|
-
designName: null,
|
|
1163
|
-
productName: null,
|
|
1164
|
-
isDevice: null
|
|
1165
|
-
};
|
|
1166
|
-
}
|
|
1167
|
-
}
|
|
1168
|
-
|
|
1169
1122
|
// src/ui/ConnectWalletScreen.tsx
|
|
1170
|
-
var
|
|
1123
|
+
var import_react_native3 = require("react-native");
|
|
1171
1124
|
|
|
1172
1125
|
// src/ui/theme.ts
|
|
1173
|
-
var
|
|
1126
|
+
var import_react_native2 = require("react-native");
|
|
1174
1127
|
var dark = {
|
|
1175
1128
|
background: "#08080D",
|
|
1176
1129
|
surface: "#111118",
|
|
@@ -1204,7 +1157,7 @@ var light = {
|
|
|
1204
1157
|
errorBorder: "#FECACA"
|
|
1205
1158
|
};
|
|
1206
1159
|
function useDubsTheme() {
|
|
1207
|
-
const scheme = (0,
|
|
1160
|
+
const scheme = (0, import_react_native2.useColorScheme)();
|
|
1208
1161
|
return scheme === "light" ? light : dark;
|
|
1209
1162
|
}
|
|
1210
1163
|
function mergeTheme(base, overrides) {
|
|
@@ -1224,44 +1177,44 @@ function ConnectWalletScreen({
|
|
|
1224
1177
|
}) {
|
|
1225
1178
|
const t = useDubsTheme();
|
|
1226
1179
|
const accent = accentColor || t.accent;
|
|
1227
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
1228
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
1180
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native3.View, { style: [styles.container, { backgroundColor: t.background }], children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_react_native3.View, { style: styles.content, children: [
|
|
1181
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_react_native3.View, { style: styles.brandingSection, children: [
|
|
1229
1182
|
appIcon ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
1230
|
-
|
|
1183
|
+
import_react_native3.Image,
|
|
1231
1184
|
{
|
|
1232
1185
|
source: { uri: appIcon },
|
|
1233
1186
|
style: styles.logoImage
|
|
1234
1187
|
}
|
|
1235
|
-
) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
1236
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
1237
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
1188
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native3.View, { style: [styles.logoCircle, { backgroundColor: accent }], children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native3.Text, { style: styles.logoText, children: appName.charAt(0).toUpperCase() }) }),
|
|
1189
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native3.Text, { style: [styles.appName, { color: t.text }], children: appName }),
|
|
1190
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native3.Text, { style: [styles.subtitle, { color: t.textMuted }], children: tagline || "Connect your Solana wallet to get started" })
|
|
1238
1191
|
] }),
|
|
1239
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
1192
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_react_native3.View, { style: styles.actionSection, children: [
|
|
1240
1193
|
error ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
1241
|
-
|
|
1194
|
+
import_react_native3.View,
|
|
1242
1195
|
{
|
|
1243
1196
|
style: [
|
|
1244
1197
|
styles.errorBox,
|
|
1245
1198
|
{ backgroundColor: t.errorBg, borderColor: t.errorBorder }
|
|
1246
1199
|
],
|
|
1247
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
1200
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native3.Text, { style: [styles.errorText, { color: t.errorText }], children: error })
|
|
1248
1201
|
}
|
|
1249
1202
|
) : null,
|
|
1250
1203
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
1251
|
-
|
|
1204
|
+
import_react_native3.TouchableOpacity,
|
|
1252
1205
|
{
|
|
1253
1206
|
style: [styles.connectButton, { backgroundColor: accent }],
|
|
1254
1207
|
onPress: onConnect,
|
|
1255
1208
|
disabled: connecting,
|
|
1256
1209
|
activeOpacity: 0.8,
|
|
1257
|
-
children: connecting ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
1210
|
+
children: connecting ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native3.ActivityIndicator, { color: "#FFFFFF", size: "small" }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native3.Text, { style: styles.connectButtonText, children: "Connect Wallet" })
|
|
1258
1211
|
}
|
|
1259
1212
|
),
|
|
1260
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
1213
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native3.Text, { style: [styles.hint, { color: t.textDim }], children: "Phantom, Solflare, or any Solana wallet" })
|
|
1261
1214
|
] })
|
|
1262
1215
|
] }) });
|
|
1263
1216
|
}
|
|
1264
|
-
var styles =
|
|
1217
|
+
var styles = import_react_native3.StyleSheet.create({
|
|
1265
1218
|
container: {
|
|
1266
1219
|
flex: 1,
|
|
1267
1220
|
justifyContent: "center"
|
|
@@ -1384,9 +1337,8 @@ function ManagedWalletProvider({
|
|
|
1384
1337
|
const [connecting, setConnecting] = (0, import_react.useState)(false);
|
|
1385
1338
|
const [isReady, setIsReady] = (0, import_react.useState)(false);
|
|
1386
1339
|
const [error, setError] = (0, import_react.useState)(null);
|
|
1387
|
-
const
|
|
1388
|
-
|
|
1389
|
-
console.log(TAG3, `Platform: ${import_react_native5.Platform.OS}, seeker: ${seeker}, redirectUri: ${redirectUri ? "provided" : "not set"}, usePhantom: ${usePhantom}`);
|
|
1340
|
+
const usePhantom = import_react_native4.Platform.OS === "ios" && !!redirectUri;
|
|
1341
|
+
console.log(TAG3, `Platform: ${import_react_native4.Platform.OS}, redirectUri: ${redirectUri ? "provided" : "not set"}, usePhantom: ${usePhantom}`);
|
|
1390
1342
|
const adapterRef = (0, import_react.useRef)(null);
|
|
1391
1343
|
const transactRef = (0, import_react.useRef)(null);
|
|
1392
1344
|
if (!adapterRef.current) {
|
|
@@ -1946,6 +1898,53 @@ var import_bs583 = __toESM(require("bs58"));
|
|
|
1946
1898
|
var import_react10 = require("react");
|
|
1947
1899
|
var AuthContext = (0, import_react10.createContext)(null);
|
|
1948
1900
|
|
|
1901
|
+
// src/utils/device.ts
|
|
1902
|
+
var import_react_native5 = require("react-native");
|
|
1903
|
+
function isSolanaSeeker() {
|
|
1904
|
+
try {
|
|
1905
|
+
const Device = require("expo-device");
|
|
1906
|
+
return Device.brand?.toLowerCase() === "solanamobile";
|
|
1907
|
+
} catch {
|
|
1908
|
+
return false;
|
|
1909
|
+
}
|
|
1910
|
+
}
|
|
1911
|
+
async function getDeviceInfo() {
|
|
1912
|
+
try {
|
|
1913
|
+
const Device = require("expo-device");
|
|
1914
|
+
return {
|
|
1915
|
+
platform: import_react_native5.Platform.OS,
|
|
1916
|
+
modelName: Device.modelName,
|
|
1917
|
+
brand: Device.brand,
|
|
1918
|
+
manufacturer: Device.manufacturer,
|
|
1919
|
+
osName: Device.osName,
|
|
1920
|
+
osVersion: Device.osVersion,
|
|
1921
|
+
deviceType: Device.deviceType,
|
|
1922
|
+
deviceName: Device.deviceName,
|
|
1923
|
+
totalMemory: Device.totalMemory,
|
|
1924
|
+
modelId: Device.modelId,
|
|
1925
|
+
designName: Device.designName,
|
|
1926
|
+
productName: Device.productName,
|
|
1927
|
+
isDevice: Device.isDevice
|
|
1928
|
+
};
|
|
1929
|
+
} catch {
|
|
1930
|
+
return {
|
|
1931
|
+
platform: import_react_native5.Platform.OS,
|
|
1932
|
+
modelName: null,
|
|
1933
|
+
brand: null,
|
|
1934
|
+
manufacturer: null,
|
|
1935
|
+
osName: null,
|
|
1936
|
+
osVersion: null,
|
|
1937
|
+
deviceType: null,
|
|
1938
|
+
deviceName: null,
|
|
1939
|
+
totalMemory: null,
|
|
1940
|
+
modelId: null,
|
|
1941
|
+
designName: null,
|
|
1942
|
+
productName: null,
|
|
1943
|
+
isDevice: null
|
|
1944
|
+
};
|
|
1945
|
+
}
|
|
1946
|
+
}
|
|
1947
|
+
|
|
1949
1948
|
// src/hooks/useAuth.ts
|
|
1950
1949
|
function useAuth() {
|
|
1951
1950
|
const sharedAuth = (0, import_react11.useContext)(AuthContext);
|