@suilend/sui-fe-next 0.1.78 → 0.1.80
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/contexts/WalletContext.jsx +5 -3
- package/lib/toasts.jsx +4 -0
- package/package.json +1 -1
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -311,9 +311,11 @@ function Inner(_a) {
|
|
|
311
311
|
}, [getInstalledWallet]);
|
|
312
312
|
var wallets__extension_installed_default = useMemo(function () {
|
|
313
313
|
return wallets__extension_default
|
|
314
|
-
.filter(function (w) {
|
|
315
|
-
|
|
316
|
-
|
|
314
|
+
.filter(function (w) {
|
|
315
|
+
return w.name === WalletName.MSAFE_WALLET
|
|
316
|
+
? isInMsafeApp()
|
|
317
|
+
: !!getInstalledWallet(w.name);
|
|
318
|
+
})
|
|
317
319
|
.map(function (w) { return (__assign(__assign({}, w), { isInstalled: true, raw: getInstalledWallet(w.name) })); });
|
|
318
320
|
}, [wallets__extension_default, getInstalledWallet]);
|
|
319
321
|
var wallets__extension_installed_notDefault = useMemo(function () {
|
package/lib/toasts.jsx
CHANGED
|
@@ -20,21 +20,25 @@ var onDismiss = function (callback) {
|
|
|
20
20
|
}, 250);
|
|
21
21
|
};
|
|
22
22
|
export var showSuccessToast = function (title, data, isTxn) {
|
|
23
|
+
console.log(title, data);
|
|
23
24
|
onDismiss(function () {
|
|
24
25
|
return sonnerToast.success(title, __assign(__assign({}, (data || {})), { duration: isTxn ? TX_TOAST_DURATION_MS : TOAST_DURATION_MS }));
|
|
25
26
|
});
|
|
26
27
|
};
|
|
27
28
|
export var showInfoToast = function (title, data) {
|
|
29
|
+
console.log(title, data);
|
|
28
30
|
onDismiss(function () {
|
|
29
31
|
return sonnerToast.info(title, __assign(__assign({}, (data || {})), { duration: TOAST_DURATION_MS }));
|
|
30
32
|
});
|
|
31
33
|
};
|
|
32
34
|
export var showWarningToast = function (title, data) {
|
|
35
|
+
console.warn(title, data);
|
|
33
36
|
onDismiss(function () {
|
|
34
37
|
return sonnerToast.warning(title, __assign(__assign({}, (data || {})), { duration: TOAST_DURATION_MS }));
|
|
35
38
|
});
|
|
36
39
|
};
|
|
37
40
|
export var showErrorToast = function (title, err, data, isTxn) {
|
|
41
|
+
console.error(err);
|
|
38
42
|
var description = (err === null || err === void 0 ? void 0 : err.message) || "An unknown error occurred";
|
|
39
43
|
// RPC errors
|
|
40
44
|
if (description.toLowerCase().includes("Invalid u256 value".toLowerCase()))
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@suilend/sui-fe-next","version":"0.1.
|
|
1
|
+
{"name":"@suilend/sui-fe-next","version":"0.1.80","private":false,"description":"A collection of TypeScript frontend components and hooks","author":"Suilend","license":"MIT","main":"./index.js","exports":{".":"./index.js","./contexts/SettingsContext":"./contexts/SettingsContext.jsx","./contexts/WalletContext":"./contexts/WalletContext.jsx","./contexts":"./contexts/index.js","./fetchers":"./fetchers/index.js","./fetchers/useFetchBalances":"./fetchers/useFetchBalances.js","./hooks":"./hooks/index.js","./hooks/keypair":"./hooks/keypair.js","./hooks/useCoinMetadataMap":"./hooks/useCoinMetadataMap.js","./hooks/useIsAndroid":"./hooks/useIsAndroid.jsx","./hooks/useIsTouchscreen":"./hooks/useIsTouchscreen.jsx","./hooks/useIsiOS":"./hooks/useIsiOS.jsx","./hooks/useLedgerHashDialog":"./hooks/useLedgerHashDialog.js","./hooks/useRefreshOnBalancesChange":"./hooks/useRefreshOnBalancesChange.js","./lib/connector":"./lib/connector.js","./lib":"./lib/index.js","./lib/router":"./lib/router.js","./lib/toasts":"./lib/toasts.jsx"},"types":"./index.js","scripts":{"build":"rm -rf ./dist && bun tsc","eslint":"eslint --fix \"./src/**/*.ts\"","prettier":"prettier --write \"./src/**/*\"","lint":"bun eslint && bun prettier && bun tsc --noEmit","release":"bun run build && bun ts-node ./release.ts && cd ./dist && npm publish --access public"},"repository":{"type":"git","url":"git+https://github.com/suilend/sui-fe.git"},"bugs":{"url":"https://github.com/suilend/sui-fe/issues"},"dependencies":{"@reown/appkit":"^1.8.10","@reown/appkit-common":"^1.8.10","@reown/appkit-universal-connector":"^1.8.10","@sentry/nextjs":"^8.38.0","@tanstack/react-query":"^5.60.2","bignumber.js":"^9.1.2","launchdarkly-react-client-sdk":"^3.6.0","lodash":"^4.17.21","next":"^15.0.3","react":"18.3.1","react-dom":"18.3.1","react-responsive":"^10.0.0","shio-sdk":"^1.0.8","sonner":"1.4.41","swr":"^2.2.5","tailwind-merge":"^2.5.4","usehooks-ts":"^3.1.1"},"devDependencies":{"@tsconfig/next":"^2.0.3","@types/lodash":"^4.17.13","@types/node":"^22.9.0","@types/react":"^18.3.12","@types/react-dom":"^18.3.1","@typescript-eslint/eslint-plugin":"^8.14.0","@typescript-eslint/parser":"^8.14.0","eslint":"^9.14.0","eslint-config-next":"^15.0.3","eslint-config-prettier":"^9.1.0","eslint-plugin-import":"^2.31.0","eslint-plugin-prettier":"^5.2.1","prettier":"^3.3.3","ts-node":"^10.9.2","typescript":"^5.6.3"},"peerDependencies":{"@mysten/dapp-kit":"0.19.4","@mysten/sui":"1.42.0","@mysten/wallet-standard":"0.19.2","@suilend/sui-fe":"^0.3.40"}}
|