@suilend/sui-fe-next 0.1.48 → 0.1.49

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.
@@ -1,5 +1,6 @@
1
1
  import { Dispatch, PropsWithChildren, SetStateAction } from "react";
2
2
  import { DevInspectResults, SuiTransactionBlockResponse } from "@mysten/sui/client";
3
+ import { SignatureWithBytes } from "@mysten/sui/cryptography";
3
4
  import { Transaction } from "@mysten/sui/transactions";
4
5
  import { WalletAccount, WalletIcon, WalletWithRequiredFeatures } from "@mysten/wallet-standard";
5
6
  export declare enum WalletType {
@@ -45,7 +46,7 @@ export interface WalletContext {
45
46
  dryRunTransaction: (transaction: Transaction, setGasBudget?: boolean) => Promise<DevInspectResults>;
46
47
  signExecuteAndWaitForTransaction: (transaction: Transaction, options?: {
47
48
  auction?: boolean;
48
- }) => Promise<SuiTransactionBlockResponse>;
49
+ }, onSign?: (signedTransaction: SignatureWithBytes) => void, onExecute?: (res: SuiTransactionBlockResponse) => void) => Promise<SuiTransactionBlockResponse>;
49
50
  }
50
51
  export declare const useWalletContext: () => WalletContext;
51
52
  interface WalletContextProviderProps extends PropsWithChildren {
@@ -493,7 +493,7 @@ function Inner(_a) {
493
493
  });
494
494
  });
495
495
  }, [impersonatedAddress, account === null || account === void 0 ? void 0 : account.address, gasBudget, suiClient]);
496
- var signExecuteAndWaitForTransaction = useCallback(function (transaction, options) { return __awaiter(_this, void 0, void 0, function () {
496
+ var signExecuteAndWaitForTransaction = useCallback(function (transaction, options, onSign, onExecute) { return __awaiter(_this, void 0, void 0, function () {
497
497
  var _address, signedTransaction, err_3, res1, res2, err_4;
498
498
  var _a, _b;
499
499
  return __generator(this, function (_c) {
@@ -519,6 +519,7 @@ function Inner(_a) {
519
519
  })];
520
520
  case 2:
521
521
  signedTransaction = _c.sent();
522
+ onSign === null || onSign === void 0 ? void 0 : onSign(signedTransaction);
522
523
  if (!(options === null || options === void 0 ? void 0 : options.auction)) return [3 /*break*/, 6];
523
524
  _c.label = 3;
524
525
  case 3:
@@ -536,6 +537,7 @@ function Inner(_a) {
536
537
  })];
537
538
  case 7:
538
539
  res1 = _c.sent();
540
+ onExecute === null || onExecute === void 0 ? void 0 : onExecute(res1);
539
541
  return [4 /*yield*/, suiClient.waitForTransaction({
540
542
  digest: res1.digest,
541
543
  options: {
package/package.json CHANGED
@@ -1 +1 @@
1
- {"name":"@suilend/sui-fe-next","version":"0.1.48","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/useCoinMetadataMap":"./hooks/useCoinMetadataMap.js","./hooks/useIsAndroid":"./hooks/useIsAndroid.jsx","./hooks/useIsTouchscreen":"./hooks/useIsTouchscreen.jsx","./hooks/useIsiOS":"./hooks/useIsiOS.jsx","./hooks/useRefreshOnBalancesChange":"./hooks/useRefreshOnBalancesChange.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":{"@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","mixpanel-browser":"^2.56.0","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/mixpanel-browser":"^2.50.2","@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.16.0","@mysten/sui":"1.28.2","@mysten/wallet-standard":"0.14.7","@suilend/sui-fe":"^0.2.77"}}
1
+ {"name":"@suilend/sui-fe-next","version":"0.1.49","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/useCoinMetadataMap":"./hooks/useCoinMetadataMap.js","./hooks/useIsAndroid":"./hooks/useIsAndroid.jsx","./hooks/useIsTouchscreen":"./hooks/useIsTouchscreen.jsx","./hooks/useIsiOS":"./hooks/useIsiOS.jsx","./hooks/useRefreshOnBalancesChange":"./hooks/useRefreshOnBalancesChange.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":{"@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","mixpanel-browser":"^2.56.0","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/mixpanel-browser":"^2.50.2","@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.16.0","@mysten/sui":"1.28.2","@mysten/wallet-standard":"0.14.7","@suilend/sui-fe":"^0.2.95"}}