@spicenet-io/spiceflow-ui 1.9.10 → 1.9.12

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.cjs.js CHANGED
@@ -12,11 +12,10 @@ const reactAuth = require('@privy-io/react-auth');
12
12
  const sdkReactCore = require('@dynamic-labs/sdk-react-core');
13
13
  const spiceflowCoreTest = require('spiceflow-core-test');
14
14
  const wagmi = require('wagmi');
15
- const chains$1 = require('@/utils/chains');
16
15
  const authDynamic = require('./auth-dynamic.cjs.js');
17
16
  const authPrivy = require('./auth-privy.cjs.js');
18
17
  const reactQuery = require('@tanstack/react-query');
19
- const chains$2 = require('wagmi/chains');
18
+ const chains$1 = require('wagmi/chains');
20
19
  const connectors = require('wagmi/connectors');
21
20
 
22
21
  const CHAIN_CONFIGS = {
@@ -4286,7 +4285,6 @@ const DepositStatusPanel = ({
4286
4285
  };
4287
4286
  if (intentStatus) {
4288
4287
  const { steps, overallStatus } = intentStatus;
4289
- const isProcessing = overallStatus === "processing";
4290
4288
  const isSuccess = overallStatus === "success";
4291
4289
  const isError = overallStatus === "failed";
4292
4290
  const stepWithTxHash = steps.find((step) => step.transactionHash);
@@ -4323,9 +4321,9 @@ const DepositStatusPanel = ({
4323
4321
  display: "flex",
4324
4322
  alignItems: "center",
4325
4323
  gap: "8px",
4326
- cursor: !isProcessing ? "pointer" : "default"
4324
+ cursor: "pointer"
4327
4325
  },
4328
- onClick: !isProcessing ? toggleDetails : void 0,
4326
+ onClick: toggleDetails,
4329
4327
  children: [
4330
4328
  /* @__PURE__ */ jsxRuntime.jsx(
4331
4329
  "span",
@@ -4339,7 +4337,7 @@ const DepositStatusPanel = ({
4339
4337
  children: "Deposit Results"
4340
4338
  }
4341
4339
  ),
4342
- !isProcessing && /* @__PURE__ */ jsxRuntime.jsx(
4340
+ /* @__PURE__ */ jsxRuntime.jsx(
4343
4341
  "svg",
4344
4342
  {
4345
4343
  width: "16",
@@ -4365,7 +4363,7 @@ const DepositStatusPanel = ({
4365
4363
  ]
4366
4364
  }
4367
4365
  ),
4368
- !isProcessing && /* @__PURE__ */ jsxRuntime.jsx(
4366
+ /* @__PURE__ */ jsxRuntime.jsx(
4369
4367
  "button",
4370
4368
  {
4371
4369
  onClick: onClose,
@@ -4394,47 +4392,7 @@ const DepositStatusPanel = ({
4394
4392
  ]
4395
4393
  }
4396
4394
  ),
4397
- isProcessing && /* @__PURE__ */ jsxRuntime.jsxs(
4398
- "div",
4399
- {
4400
- style: {
4401
- display: "flex",
4402
- flexDirection: "column",
4403
- alignItems: "center",
4404
- padding: "24px",
4405
- marginBottom: "16px"
4406
- },
4407
- children: [
4408
- /* @__PURE__ */ jsxRuntime.jsx(
4409
- "div",
4410
- {
4411
- style: {
4412
- width: "48px",
4413
- height: "48px",
4414
- border: "3px solid #e5e7eb",
4415
- borderTopColor: theme.colors.primary,
4416
- borderRadius: "50%",
4417
- animation: "spin 1s linear infinite",
4418
- marginBottom: "16px"
4419
- }
4420
- }
4421
- ),
4422
- /* @__PURE__ */ jsxRuntime.jsx(
4423
- "p",
4424
- {
4425
- style: {
4426
- fontSize: "14px",
4427
- fontWeight: 500,
4428
- color: "#374151",
4429
- margin: 0
4430
- },
4431
- children: "Processing your deposit..."
4432
- }
4433
- )
4434
- ]
4435
- }
4436
- ),
4437
- !isProcessing && /* @__PURE__ */ jsxRuntime.jsx(
4395
+ /* @__PURE__ */ jsxRuntime.jsx(
4438
4396
  "div",
4439
4397
  {
4440
4398
  style: {
@@ -4451,7 +4409,7 @@ const DepositStatusPanel = ({
4451
4409
  )
4452
4410
  }
4453
4411
  ),
4454
- !isProcessing && /* @__PURE__ */ jsxRuntime.jsx(
4412
+ /* @__PURE__ */ jsxRuntime.jsx(
4455
4413
  "div",
4456
4414
  {
4457
4415
  style: {
@@ -4511,7 +4469,7 @@ const DepositStatusPanel = ({
4511
4469
  )
4512
4470
  }
4513
4471
  ),
4514
- !isProcessing && /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", flexDirection: "column", gap: "8px" }, children: [
4472
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", flexDirection: "column", gap: "8px" }, children: [
4515
4473
  isError && onRetry && /* @__PURE__ */ jsxRuntime.jsx(
4516
4474
  "button",
4517
4475
  {
@@ -4562,13 +4520,7 @@ const DepositStatusPanel = ({
4562
4520
  children: "CONTINUE \u2192"
4563
4521
  }
4564
4522
  )
4565
- ] }),
4566
- /* @__PURE__ */ jsxRuntime.jsx("style", { children: `
4567
- @keyframes spin {
4568
- from { transform: rotate(0deg); }
4569
- to { transform: rotate(360deg); }
4570
- }
4571
- ` })
4523
+ ] })
4572
4524
  ]
4573
4525
  }
4574
4526
  );
@@ -5004,7 +4956,8 @@ const DepositWidget = ({
5004
4956
  fontFamily: theme.typography.fontFamily,
5005
4957
  boxShadow: styles?.container?.boxShadow || (theme.mode === "light" ? "0 4px 6px -1px rgb(0 0 0 / 0.1)" : "0 4px 6px -1px rgb(0 0 0 / 0.3)")
5006
4958
  };
5007
- if (intentStatus) {
4959
+ const showStatusPanel = intentStatus && intentStatus.overallStatus !== "processing";
4960
+ if (showStatusPanel) {
5008
4961
  return /* @__PURE__ */ jsxRuntime.jsx("div", { className, children: /* @__PURE__ */ jsxRuntime.jsx(
5009
4962
  DepositStatusPanel,
5010
4963
  {
@@ -5839,7 +5792,7 @@ const CrossChainDepositModal = ({
5839
5792
  data
5840
5793
  });
5841
5794
  }
5842
- const client = chains$1.getClientForChain(chainId);
5795
+ const client = getClientForChain(chainId);
5843
5796
  const receipt = await client.waitForTransactionReceipt({
5844
5797
  hash,
5845
5798
  timeout: 12e4,
@@ -11829,7 +11782,7 @@ const SpiceWithdraw = (props) => {
11829
11782
  }
11830
11783
  });
11831
11784
  if (chains.length === 0) {
11832
- chains.push(chains$2.sepolia, chains$2.arbitrumSepolia);
11785
+ chains.push(chains$1.sepolia, chains$1.arbitrumSepolia);
11833
11786
  }
11834
11787
  const transports = {};
11835
11788
  chains.forEach((chain) => {
package/dist/index.js CHANGED
@@ -10,7 +10,6 @@ import { useWallets, usePrivy, useSign7702Authorization, useSignMessage } from '
10
10
  import { useDynamicContext } from '@dynamic-labs/sdk-react-core';
11
11
  import { getAccountNonce, hashChainBatches, getAuthorizationHash } from 'spiceflow-core-test';
12
12
  import { useAccount, useWalletClient, useSwitchChain, useReadContracts, useConnect, useDisconnect, http as http$1, createConfig, WagmiProvider } from 'wagmi';
13
- import { getClientForChain as getClientForChain$1 } from '@/utils/chains';
14
13
  import { DynamicLogin } from './auth-dynamic.js';
15
14
  import { PrivyLogin } from './auth-privy.js';
16
15
  import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
@@ -4284,7 +4283,6 @@ const DepositStatusPanel = ({
4284
4283
  };
4285
4284
  if (intentStatus) {
4286
4285
  const { steps, overallStatus } = intentStatus;
4287
- const isProcessing = overallStatus === "processing";
4288
4286
  const isSuccess = overallStatus === "success";
4289
4287
  const isError = overallStatus === "failed";
4290
4288
  const stepWithTxHash = steps.find((step) => step.transactionHash);
@@ -4321,9 +4319,9 @@ const DepositStatusPanel = ({
4321
4319
  display: "flex",
4322
4320
  alignItems: "center",
4323
4321
  gap: "8px",
4324
- cursor: !isProcessing ? "pointer" : "default"
4322
+ cursor: "pointer"
4325
4323
  },
4326
- onClick: !isProcessing ? toggleDetails : void 0,
4324
+ onClick: toggleDetails,
4327
4325
  children: [
4328
4326
  /* @__PURE__ */ jsx(
4329
4327
  "span",
@@ -4337,7 +4335,7 @@ const DepositStatusPanel = ({
4337
4335
  children: "Deposit Results"
4338
4336
  }
4339
4337
  ),
4340
- !isProcessing && /* @__PURE__ */ jsx(
4338
+ /* @__PURE__ */ jsx(
4341
4339
  "svg",
4342
4340
  {
4343
4341
  width: "16",
@@ -4363,7 +4361,7 @@ const DepositStatusPanel = ({
4363
4361
  ]
4364
4362
  }
4365
4363
  ),
4366
- !isProcessing && /* @__PURE__ */ jsx(
4364
+ /* @__PURE__ */ jsx(
4367
4365
  "button",
4368
4366
  {
4369
4367
  onClick: onClose,
@@ -4392,47 +4390,7 @@ const DepositStatusPanel = ({
4392
4390
  ]
4393
4391
  }
4394
4392
  ),
4395
- isProcessing && /* @__PURE__ */ jsxs(
4396
- "div",
4397
- {
4398
- style: {
4399
- display: "flex",
4400
- flexDirection: "column",
4401
- alignItems: "center",
4402
- padding: "24px",
4403
- marginBottom: "16px"
4404
- },
4405
- children: [
4406
- /* @__PURE__ */ jsx(
4407
- "div",
4408
- {
4409
- style: {
4410
- width: "48px",
4411
- height: "48px",
4412
- border: "3px solid #e5e7eb",
4413
- borderTopColor: theme.colors.primary,
4414
- borderRadius: "50%",
4415
- animation: "spin 1s linear infinite",
4416
- marginBottom: "16px"
4417
- }
4418
- }
4419
- ),
4420
- /* @__PURE__ */ jsx(
4421
- "p",
4422
- {
4423
- style: {
4424
- fontSize: "14px",
4425
- fontWeight: 500,
4426
- color: "#374151",
4427
- margin: 0
4428
- },
4429
- children: "Processing your deposit..."
4430
- }
4431
- )
4432
- ]
4433
- }
4434
- ),
4435
- !isProcessing && /* @__PURE__ */ jsx(
4393
+ /* @__PURE__ */ jsx(
4436
4394
  "div",
4437
4395
  {
4438
4396
  style: {
@@ -4449,7 +4407,7 @@ const DepositStatusPanel = ({
4449
4407
  )
4450
4408
  }
4451
4409
  ),
4452
- !isProcessing && /* @__PURE__ */ jsx(
4410
+ /* @__PURE__ */ jsx(
4453
4411
  "div",
4454
4412
  {
4455
4413
  style: {
@@ -4509,7 +4467,7 @@ const DepositStatusPanel = ({
4509
4467
  )
4510
4468
  }
4511
4469
  ),
4512
- !isProcessing && /* @__PURE__ */ jsxs("div", { style: { display: "flex", flexDirection: "column", gap: "8px" }, children: [
4470
+ /* @__PURE__ */ jsxs("div", { style: { display: "flex", flexDirection: "column", gap: "8px" }, children: [
4513
4471
  isError && onRetry && /* @__PURE__ */ jsx(
4514
4472
  "button",
4515
4473
  {
@@ -4560,13 +4518,7 @@ const DepositStatusPanel = ({
4560
4518
  children: "CONTINUE \u2192"
4561
4519
  }
4562
4520
  )
4563
- ] }),
4564
- /* @__PURE__ */ jsx("style", { children: `
4565
- @keyframes spin {
4566
- from { transform: rotate(0deg); }
4567
- to { transform: rotate(360deg); }
4568
- }
4569
- ` })
4521
+ ] })
4570
4522
  ]
4571
4523
  }
4572
4524
  );
@@ -5002,7 +4954,8 @@ const DepositWidget = ({
5002
4954
  fontFamily: theme.typography.fontFamily,
5003
4955
  boxShadow: styles?.container?.boxShadow || (theme.mode === "light" ? "0 4px 6px -1px rgb(0 0 0 / 0.1)" : "0 4px 6px -1px rgb(0 0 0 / 0.3)")
5004
4956
  };
5005
- if (intentStatus) {
4957
+ const showStatusPanel = intentStatus && intentStatus.overallStatus !== "processing";
4958
+ if (showStatusPanel) {
5006
4959
  return /* @__PURE__ */ jsx("div", { className, children: /* @__PURE__ */ jsx(
5007
4960
  DepositStatusPanel,
5008
4961
  {
@@ -5837,7 +5790,7 @@ const CrossChainDepositModal = ({
5837
5790
  data
5838
5791
  });
5839
5792
  }
5840
- const client = getClientForChain$1(chainId);
5793
+ const client = getClientForChain(chainId);
5841
5794
  const receipt = await client.waitForTransactionReceipt({
5842
5795
  hash,
5843
5796
  timeout: 12e4,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spicenet-io/spiceflow-ui",
3
- "version": "1.9.10",
3
+ "version": "1.9.12",
4
4
  "description": "Spiceflow UI SDK",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs.js",