@jup-ag/plugin 1.0.7 → 1.0.8
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 +55 -86
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -85,7 +85,7 @@ var require_package = __commonJS({
|
|
|
85
85
|
"package.json"(exports2, module2) {
|
|
86
86
|
module2.exports = {
|
|
87
87
|
name: "@jup-ag/plugin",
|
|
88
|
-
version: "1.0.
|
|
88
|
+
version: "1.0.8",
|
|
89
89
|
private: false,
|
|
90
90
|
license: "MIT",
|
|
91
91
|
scripts: {
|
|
@@ -1518,7 +1518,7 @@ var Header = () => {
|
|
|
1518
1518
|
var Header_default = Header;
|
|
1519
1519
|
|
|
1520
1520
|
// src/components/screens/InitialScreen.tsx
|
|
1521
|
-
var
|
|
1521
|
+
var import_react25 = require("react");
|
|
1522
1522
|
|
|
1523
1523
|
// src/components/Form.tsx
|
|
1524
1524
|
var import_react19 = require("react");
|
|
@@ -2360,7 +2360,6 @@ var JupShield = ({ tokenAddress }) => {
|
|
|
2360
2360
|
var JupShield_default = JupShield;
|
|
2361
2361
|
|
|
2362
2362
|
// src/queries/useUltraSwapMutation.ts
|
|
2363
|
-
var import_wallet_adapter2 = require("@jup-ag/wallet-adapter");
|
|
2364
2363
|
var import_react_query5 = require("@tanstack/react-query");
|
|
2365
2364
|
var import_buffer = require("buffer");
|
|
2366
2365
|
var import_web34 = require("@solana/web3.js");
|
|
@@ -2441,8 +2440,9 @@ function useUltraSwapMutation() {
|
|
|
2441
2440
|
}),
|
|
2442
2441
|
onError: (error, variables) => __async(this, null, function* () {
|
|
2443
2442
|
const { setTxStatus, setLastSwapResult, quoteResponseMeta } = variables;
|
|
2444
|
-
|
|
2445
|
-
|
|
2443
|
+
const { name } = error;
|
|
2444
|
+
if (name === "WalletSignTransactionError") {
|
|
2445
|
+
const message = "Transaction cancelled";
|
|
2446
2446
|
setLastSwapResult({
|
|
2447
2447
|
swapResult: {
|
|
2448
2448
|
error: new TransactionError(message)
|
|
@@ -2460,7 +2460,7 @@ function useUltraSwapMutation() {
|
|
|
2460
2460
|
});
|
|
2461
2461
|
return;
|
|
2462
2462
|
}
|
|
2463
|
-
if ("json" in error) {
|
|
2463
|
+
if (typeof error === "object" && error !== null && "json" in error) {
|
|
2464
2464
|
const json = yield error.json();
|
|
2465
2465
|
setLastSwapResult({
|
|
2466
2466
|
swapResult: {
|
|
@@ -2472,7 +2472,14 @@ function useUltraSwapMutation() {
|
|
|
2472
2472
|
txid: json.txid || "",
|
|
2473
2473
|
status: "fail"
|
|
2474
2474
|
});
|
|
2475
|
+
return;
|
|
2475
2476
|
}
|
|
2477
|
+
setLastSwapResult({
|
|
2478
|
+
swapResult: {
|
|
2479
|
+
error: new TransactionError("Unknown error")
|
|
2480
|
+
},
|
|
2481
|
+
quoteReponse: quoteResponseMeta
|
|
2482
|
+
});
|
|
2476
2483
|
})
|
|
2477
2484
|
});
|
|
2478
2485
|
}
|
|
@@ -2817,7 +2824,7 @@ var Form = ({ setSelectPairSelector }) => {
|
|
|
2817
2824
|
var Form_default = Form;
|
|
2818
2825
|
|
|
2819
2826
|
// src/components/FormPairSelector.tsx
|
|
2820
|
-
var
|
|
2827
|
+
var import_react24 = require("react");
|
|
2821
2828
|
var import_react_virtualized_auto_sizer = __toESM(require("react-virtualized-auto-sizer"));
|
|
2822
2829
|
var import_react_window = require("react-window");
|
|
2823
2830
|
|
|
@@ -3040,6 +3047,7 @@ function useLstApyFetcher() {
|
|
|
3040
3047
|
// src/components/FormPairRow.tsx
|
|
3041
3048
|
var import_react_query7 = require("@tanstack/react-query");
|
|
3042
3049
|
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
3050
|
+
var import_react22 = require("react");
|
|
3043
3051
|
var PAIR_ROW_HEIGHT = 72;
|
|
3044
3052
|
var LSTTag = ({ mintAddress }) => {
|
|
3045
3053
|
const { data: lstApy } = useLstApyFetcher();
|
|
@@ -3051,66 +3059,27 @@ var LSTTag = ({ mintAddress }) => {
|
|
|
3051
3059
|
}
|
|
3052
3060
|
return;
|
|
3053
3061
|
}, [lstApy, mintAddress]);
|
|
3062
|
+
if (!apy) return null;
|
|
3054
3063
|
return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("p", { className: "rounded-md text-xxs leading-none transition-all py-0.5 px-1 text-primary/50 border border-primary/50 font-semibold", children: [
|
|
3055
3064
|
"LST ",
|
|
3056
3065
|
apy ? `${apy}%` : ""
|
|
3057
3066
|
] });
|
|
3058
3067
|
};
|
|
3059
3068
|
var MultiTags = ({ item }) => {
|
|
3069
|
+
var _a2, _b;
|
|
3060
3070
|
const { data: balances } = useBalances();
|
|
3061
|
-
const
|
|
3062
|
-
const
|
|
3063
|
-
const
|
|
3064
|
-
isVerified: false,
|
|
3065
|
-
isLST: false,
|
|
3066
|
-
// isUnknown: false,
|
|
3067
|
-
isToken2022: false,
|
|
3068
|
-
isFrozen: false
|
|
3069
|
-
});
|
|
3070
|
-
(0, import_react21.useEffect)(() => {
|
|
3071
|
-
if (isLoaded.current || isLoading.current) return;
|
|
3072
|
-
isLoading.current = true;
|
|
3073
|
-
setTimeout(() => {
|
|
3074
|
-
var _a2, _b;
|
|
3075
|
-
const result = {
|
|
3076
|
-
isVerified: checkIsStrictOrVerified(item),
|
|
3077
|
-
isLST: Boolean((_a2 = item.tags) == null ? void 0 : _a2.includes("lst")),
|
|
3078
|
-
// isUnknown: checkIsUnknownToken(item),
|
|
3079
|
-
isToken2022: Boolean(checkIsToken2022(item)),
|
|
3080
|
-
isFrozen: ((_b = balances == null ? void 0 : balances[item.id]) == null ? void 0 : _b.isFrozen) || false
|
|
3081
|
-
};
|
|
3082
|
-
setRenderedTag(result);
|
|
3083
|
-
isLoading.current = false;
|
|
3084
|
-
isLoaded.current = true;
|
|
3085
|
-
}, 0);
|
|
3086
|
-
}, []);
|
|
3087
|
-
const remainingTags = [];
|
|
3088
|
-
if (!renderedTag) return null;
|
|
3089
|
-
const { isToken2022, isFrozen, isLST } = renderedTag;
|
|
3071
|
+
const isFrozen = ((_a2 = balances == null ? void 0 : balances[item.id]) == null ? void 0 : _a2.isFrozen) || false;
|
|
3072
|
+
const isToken2022 = checkIsToken2022(item);
|
|
3073
|
+
const isLST = (_b = item.tags) == null ? void 0 : _b.includes("lst");
|
|
3090
3074
|
return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "flex justify-end gap-x-1", children: [
|
|
3091
3075
|
isFrozen && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("p", { className: "border rounded-md text-xxs leading-none transition-all py-0.5 px-1 border-warning/50 text-warning/50", children: "Frozen" }),
|
|
3092
3076
|
isToken2022 && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("p", { className: "rounded-md text-xxs leading-none transition-all py-0.5 px-1 bg-black/10 font-semibold text-primary-text/20", children: "Token2022" }),
|
|
3093
|
-
remainingTags == null ? void 0 : remainingTags.map((tag, idx) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
3094
|
-
"div",
|
|
3095
|
-
{
|
|
3096
|
-
className: "rounded-md text-xxs leading-none transition-all py-0.5 px-1 bg-black/10 font-semibold text-primary-text/20",
|
|
3097
|
-
children: tag
|
|
3098
|
-
},
|
|
3099
|
-
idx
|
|
3100
|
-
)),
|
|
3101
3077
|
isLST && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(LSTTag, { mintAddress: item.id })
|
|
3102
|
-
] });
|
|
3078
|
+
] }, item.id);
|
|
3103
3079
|
};
|
|
3104
3080
|
var FormPairRow = (props) => {
|
|
3105
3081
|
var _a2;
|
|
3106
|
-
const {
|
|
3107
|
-
item,
|
|
3108
|
-
style,
|
|
3109
|
-
onSubmit,
|
|
3110
|
-
suppressCloseModal,
|
|
3111
|
-
showExplorer = true,
|
|
3112
|
-
enableUnknownTokenWarning = true
|
|
3113
|
-
} = props;
|
|
3082
|
+
const { item, style, onSubmit, suppressCloseModal, showExplorer = true, enableUnknownTokenWarning = true } = props;
|
|
3114
3083
|
const queryClient = (0, import_react_query7.useQueryClient)();
|
|
3115
3084
|
const onClick = import_react21.default.useCallback(() => {
|
|
3116
3085
|
queryClient.setQueryData([...ASSET_QUERY_KEY, item.id], [item]);
|
|
@@ -3141,7 +3110,7 @@ var FormPairRow = (props) => {
|
|
|
3141
3110
|
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "text-xs text-primary-text/50 text-right h-full flex flex-col justify-evenly", children: [
|
|
3142
3111
|
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Coinbalance_default, { mintAddress: item.id, hideZeroBalance: true }),
|
|
3143
3112
|
usdValueDisplay ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("p", { children: usdValueDisplay }) : null,
|
|
3144
|
-
/* @__PURE__ */ (0,
|
|
3113
|
+
/* @__PURE__ */ (0, import_react22.createElement)(MultiTags, __spreadProps(__spreadValues({}, props), { key: item.id }))
|
|
3145
3114
|
] })
|
|
3146
3115
|
] })
|
|
3147
3116
|
}
|
|
@@ -3150,12 +3119,12 @@ var FormPairRow = (props) => {
|
|
|
3150
3119
|
var FormPairRow_default = FormPairRow;
|
|
3151
3120
|
|
|
3152
3121
|
// src/hooks/useSearch.ts
|
|
3153
|
-
var
|
|
3122
|
+
var import_react23 = require("react");
|
|
3154
3123
|
var import_react_query8 = require("@tanstack/react-query");
|
|
3155
3124
|
var CHUNK_SIZE = 100;
|
|
3156
3125
|
var useSearch = (mintAddresses, options = {}) => {
|
|
3157
3126
|
var _a2, _b;
|
|
3158
|
-
const mintAddressesString = (0,
|
|
3127
|
+
const mintAddressesString = (0, import_react23.useMemo)(() => mintAddresses.join(","), [mintAddresses]);
|
|
3159
3128
|
return (0, import_react_query8.useQuery)({
|
|
3160
3129
|
queryKey: ["search", mintAddressesString],
|
|
3161
3130
|
queryFn: () => __async(void 0, null, function* () {
|
|
@@ -3181,40 +3150,40 @@ var useSearch = (mintAddresses, options = {}) => {
|
|
|
3181
3150
|
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
3182
3151
|
var PAIR_ROW_HEIGHT2 = 72;
|
|
3183
3152
|
var SEARCH_BOX_HEIGHT = 56;
|
|
3184
|
-
var rowRenderer = (0,
|
|
3153
|
+
var rowRenderer = (0, import_react24.memo)((props) => {
|
|
3185
3154
|
const { data, index, style } = props;
|
|
3186
3155
|
const item = data.searchResult[index];
|
|
3187
3156
|
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(FormPairRow_default, { item, style, onSubmit: data.onSubmit }, item.address);
|
|
3188
3157
|
}, import_react_window.areEqual);
|
|
3189
3158
|
var FormPairSelector = ({ onSubmit, onClose }) => {
|
|
3190
|
-
const [search, setSearch] = (0,
|
|
3159
|
+
const [search, setSearch] = (0, import_react24.useState)("");
|
|
3191
3160
|
const { data: balances = {} } = useBalances();
|
|
3192
3161
|
const { data: blueChipTokens = [] } = useSearch([]);
|
|
3193
3162
|
const { data: searchTokens = [], isLoading } = useSearch([search], { staleTime: 5 * 60 * 1e3 });
|
|
3194
3163
|
const { data: userBalanceTokens = [] } = useSearch([Object.keys(balances).join(",")]);
|
|
3195
|
-
const searchResult = (0,
|
|
3164
|
+
const searchResult = (0, import_react24.useMemo)(() => {
|
|
3196
3165
|
if (!search) {
|
|
3197
3166
|
return sortByUserBalance([...userBalanceTokens, ...blueChipTokens], balances);
|
|
3198
3167
|
} else {
|
|
3199
3168
|
return sortByUserBalance(searchTokens, balances);
|
|
3200
3169
|
}
|
|
3201
3170
|
}, [blueChipTokens, balances, searchTokens, search, userBalanceTokens]);
|
|
3202
|
-
const triggerSearch = (0,
|
|
3171
|
+
const triggerSearch = (0, import_react24.useCallback)(
|
|
3203
3172
|
(0, import_lodash2.default)((value) => __async(void 0, null, function* () {
|
|
3204
3173
|
setSearch(value);
|
|
3205
3174
|
}), 200),
|
|
3206
3175
|
[blueChipTokens]
|
|
3207
3176
|
);
|
|
3208
|
-
const onChange = (0,
|
|
3177
|
+
const onChange = (0, import_react24.useCallback)(
|
|
3209
3178
|
(e) => {
|
|
3210
3179
|
setSearch("");
|
|
3211
3180
|
triggerSearch(e.target.value);
|
|
3212
3181
|
},
|
|
3213
3182
|
[triggerSearch]
|
|
3214
3183
|
);
|
|
3215
|
-
const listRef = (0,
|
|
3216
|
-
const inputRef = (0,
|
|
3217
|
-
(0,
|
|
3184
|
+
const listRef = (0, import_react24.createRef)();
|
|
3185
|
+
const inputRef = (0, import_react24.createRef)();
|
|
3186
|
+
(0, import_react24.useEffect)(() => {
|
|
3218
3187
|
var _a2;
|
|
3219
3188
|
return (_a2 = inputRef.current) == null ? void 0 : _a2.focus();
|
|
3220
3189
|
}, [inputRef]);
|
|
@@ -3273,9 +3242,9 @@ var FormPairSelector_default = FormPairSelector;
|
|
|
3273
3242
|
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
3274
3243
|
var InitialScreen = () => {
|
|
3275
3244
|
const { form, setForm, loading } = useSwapContext();
|
|
3276
|
-
const [isDisabled, setIsDisabled] = (0,
|
|
3277
|
-
const [selectPairSelector, setSelectPairSelector] = (0,
|
|
3278
|
-
const onSelectMint = (0,
|
|
3245
|
+
const [isDisabled, setIsDisabled] = (0, import_react25.useState)(false);
|
|
3246
|
+
const [selectPairSelector, setSelectPairSelector] = (0, import_react25.useState)(null);
|
|
3247
|
+
const onSelectMint = (0, import_react25.useCallback)(
|
|
3279
3248
|
(tokenInfo) => __async(void 0, null, function* () {
|
|
3280
3249
|
if (selectPairSelector === "fromMint") {
|
|
3281
3250
|
setForm((prev) => __spreadValues(__spreadProps(__spreadValues({}, prev), {
|
|
@@ -3308,7 +3277,7 @@ var InitialScreen = () => {
|
|
|
3308
3277
|
var InitialScreen_default = InitialScreen;
|
|
3309
3278
|
|
|
3310
3279
|
// src/components/screens/SwappingScreen.tsx
|
|
3311
|
-
var
|
|
3280
|
+
var import_react26 = require("react");
|
|
3312
3281
|
|
|
3313
3282
|
// src/icons/SuccessIcon.tsx
|
|
3314
3283
|
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
@@ -3358,7 +3327,7 @@ var SwappingScreen = () => {
|
|
|
3358
3327
|
refresh
|
|
3359
3328
|
} = useSwapContext();
|
|
3360
3329
|
const { screen: screen2, setScreen } = useScreenState();
|
|
3361
|
-
const [errorMessage, setErrorMessage] = (0,
|
|
3330
|
+
const [errorMessage, setErrorMessage] = (0, import_react26.useState)("");
|
|
3362
3331
|
const onSwapMore = () => {
|
|
3363
3332
|
reset();
|
|
3364
3333
|
setErrorMessage("");
|
|
@@ -3371,7 +3340,7 @@ var SwappingScreen = () => {
|
|
|
3371
3340
|
setScreen("Initial");
|
|
3372
3341
|
refresh();
|
|
3373
3342
|
};
|
|
3374
|
-
(0,
|
|
3343
|
+
(0, import_react26.useEffect)(() => {
|
|
3375
3344
|
var _a2, _b, _c, _d;
|
|
3376
3345
|
if (screen2 !== "Swapping") return;
|
|
3377
3346
|
if ((lastSwapResult == null ? void 0 : lastSwapResult.swapResult) && "error" in (lastSwapResult == null ? void 0 : lastSwapResult.swapResult)) {
|
|
@@ -3403,7 +3372,7 @@ var SwappingScreen = () => {
|
|
|
3403
3372
|
};
|
|
3404
3373
|
const { explorer, getExplorer } = usePreferredExplorer();
|
|
3405
3374
|
const SuccessContent = () => {
|
|
3406
|
-
const { inputAmount, outputAmount, explorerLink } = (0,
|
|
3375
|
+
const { inputAmount, outputAmount, explorerLink } = (0, import_react26.useMemo)(() => {
|
|
3407
3376
|
return {
|
|
3408
3377
|
inputAmount: (lastSwapResult == null ? void 0 : lastSwapResult.swapResult) && "inputAmount" in (lastSwapResult == null ? void 0 : lastSwapResult.swapResult) ? lastSwapResult == null ? void 0 : lastSwapResult.swapResult.inputAmount : 0,
|
|
3409
3378
|
outputAmount: (lastSwapResult == null ? void 0 : lastSwapResult.swapResult) && "outputAmount" in (lastSwapResult == null ? void 0 : lastSwapResult.swapResult) ? lastSwapResult == null ? void 0 : lastSwapResult.swapResult.outputAmount : 0,
|
|
@@ -3521,8 +3490,8 @@ var SwappingScreen = () => {
|
|
|
3521
3490
|
var SwappingScreen_default = SwappingScreen;
|
|
3522
3491
|
|
|
3523
3492
|
// src/components/screens/WalletScreen.tsx
|
|
3524
|
-
var
|
|
3525
|
-
var
|
|
3493
|
+
var import_wallet_adapter2 = require("@jup-ag/wallet-adapter");
|
|
3494
|
+
var import_react27 = require("react");
|
|
3526
3495
|
|
|
3527
3496
|
// src/icons/CloseIcon.tsx
|
|
3528
3497
|
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
@@ -3541,7 +3510,7 @@ var CloseIcon_default = CloseIcon;
|
|
|
3541
3510
|
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
3542
3511
|
var WalletScreen = () => {
|
|
3543
3512
|
const { setScreen } = useScreenState();
|
|
3544
|
-
const { handleConnectClick } = (0,
|
|
3513
|
+
const { handleConnectClick } = (0, import_wallet_adapter2.useUnifiedWalletContext)();
|
|
3545
3514
|
const { wallets } = useWalletPassThrough();
|
|
3546
3515
|
const handleConnect = (event, wallet) => __async(void 0, null, function* () {
|
|
3547
3516
|
try {
|
|
@@ -3552,10 +3521,10 @@ var WalletScreen = () => {
|
|
|
3552
3521
|
setScreen("Initial");
|
|
3553
3522
|
}
|
|
3554
3523
|
});
|
|
3555
|
-
const numberOfWallets = (0,
|
|
3524
|
+
const numberOfWallets = (0, import_react27.useMemo)(() => {
|
|
3556
3525
|
return wallets == null ? void 0 : wallets.length;
|
|
3557
3526
|
}, [wallets]);
|
|
3558
|
-
const hasWallet = (0,
|
|
3527
|
+
const hasWallet = (0, import_react27.useMemo)(() => {
|
|
3559
3528
|
return numberOfWallets > 0;
|
|
3560
3529
|
}, [numberOfWallets]);
|
|
3561
3530
|
return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "text-primary-text p-2", children: [
|
|
@@ -3794,9 +3763,9 @@ var JupiterApp = (props) => {
|
|
|
3794
3763
|
var Jupiter_default = JupiterApp;
|
|
3795
3764
|
|
|
3796
3765
|
// src/contexts/ContextProvider.tsx
|
|
3797
|
-
var
|
|
3798
|
-
var
|
|
3799
|
-
var
|
|
3766
|
+
var import_wallet_adapter3 = require("@jup-ag/wallet-adapter");
|
|
3767
|
+
var import_react28 = __toESM(require("react"));
|
|
3768
|
+
var import_react29 = require("react");
|
|
3800
3769
|
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
3801
3770
|
var noop = () => {
|
|
3802
3771
|
};
|
|
@@ -3808,19 +3777,19 @@ var WalletContextProvider = ({
|
|
|
3808
3777
|
if (typeof window === "undefined") return void 0;
|
|
3809
3778
|
return window.Jupiter.enableWalletPassthrough;
|
|
3810
3779
|
})();
|
|
3811
|
-
const wallets = (0,
|
|
3780
|
+
const wallets = (0, import_react29.useMemo)(() => {
|
|
3812
3781
|
if (enableWalletPassthrough) {
|
|
3813
3782
|
return [];
|
|
3814
3783
|
}
|
|
3815
3784
|
return [];
|
|
3816
3785
|
}, [enableWalletPassthrough]);
|
|
3817
|
-
const [showWalletStatus, setShowWalletStatus] = (0,
|
|
3786
|
+
const [showWalletStatus, setShowWalletStatus] = (0, import_react28.useState)({
|
|
3818
3787
|
show: false,
|
|
3819
3788
|
message: ""
|
|
3820
3789
|
});
|
|
3821
|
-
const ShouldWrapWalletProvider = (0,
|
|
3822
|
-
return enableWalletPassthrough ?
|
|
3823
|
-
|
|
3790
|
+
const ShouldWrapWalletProvider = (0, import_react29.useMemo)(() => {
|
|
3791
|
+
return enableWalletPassthrough ? import_react28.default.Fragment : ({ children: children2 }) => /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
3792
|
+
import_wallet_adapter3.UnifiedWalletProvider,
|
|
3824
3793
|
{
|
|
3825
3794
|
wallets,
|
|
3826
3795
|
config: {
|
|
@@ -3888,10 +3857,10 @@ var ContextProvider = (props) => {
|
|
|
3888
3857
|
|
|
3889
3858
|
// src/index.tsx
|
|
3890
3859
|
var import_react_query9 = require("@tanstack/react-query");
|
|
3891
|
-
var
|
|
3860
|
+
var import_react30 = require("react");
|
|
3892
3861
|
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
3893
3862
|
var App = () => {
|
|
3894
|
-
const queryClient = (0,
|
|
3863
|
+
const queryClient = (0, import_react30.useMemo)(() => new import_react_query9.QueryClient(), []);
|
|
3895
3864
|
const [props] = (0, import_jotai4.useAtom)(appProps);
|
|
3896
3865
|
if (!props) return null;
|
|
3897
3866
|
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_react_query9.QueryClientProvider, { client: queryClient, children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(ContextProvider, __spreadProps(__spreadValues({}, props), { children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(WalletPassthroughProvider_default, { children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(ScreenProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Jupiter_default, __spreadValues({}, props)) }) }) })) });
|