@spicenet-io/spiceflow-ui 1.9.25 → 1.9.27

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
@@ -11,7 +11,6 @@ const reactDom = require('react-dom');
11
11
  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
- const SpiceFlowProvider$1 = require('@/providers/SpiceFlowProvider');
15
14
  const wagmi = require('wagmi');
16
15
  const authDynamic = require('./auth-dynamic.cjs.js');
17
16
  const authPrivy = require('./auth-privy.cjs.js');
@@ -5155,7 +5154,7 @@ const DepositWidget = ({
5155
5154
  provider,
5156
5155
  actions
5157
5156
  } = wallet;
5158
- const spiceFlowContext = React.useContext(SpiceFlowProvider$1.SpiceFlowProviderContext);
5157
+ const spiceFlowContext = React.useContext(SpiceFlowProviderContext);
5159
5158
  const mode = spiceFlowContext?.mode || "7702";
5160
5159
  const [selectedDepositAsset, setSelectedDepositAsset] = React.useState(null);
5161
5160
  const {
@@ -5291,7 +5290,14 @@ const DepositWidget = ({
5291
5290
  chainBatches: hashedChainBatches.map((b) => ({
5292
5291
  hash: b.hash,
5293
5292
  chainId: b.chainId,
5294
- tokenTransfers: [],
5293
+ tokenTransfers: [
5294
+ {
5295
+ from: "solver",
5296
+ to: address,
5297
+ token: tokenAddress,
5298
+ amount: viem.parseUnits(selectedDepositAsset.amount, tokenDecimals)
5299
+ }
5300
+ ],
5295
5301
  calls: b.calls
5296
5302
  }))
5297
5303
  };
@@ -5301,19 +5307,21 @@ const DepositWidget = ({
5301
5307
  r: auth.r,
5302
5308
  s: auth.s,
5303
5309
  yParity: auth.yParity,
5310
+ address: auth.address,
5304
5311
  chainId: auth.chainId,
5305
- nonce: Number(auth.nonce),
5306
- address: auth.address
5312
+ nonce: Number(auth.nonce)
5307
5313
  })),
5308
5314
  intents: [intent]
5309
5315
  };
5310
5316
  const result = await relayerService.createAction(request);
5311
5317
  if (result) {
5312
- const getChainName = (chainId) => {
5313
- return `Chain ${chainId}`;
5314
- };
5315
- const initialSteps = createInitialSteps(allChainBatches, getChainName);
5318
+ const initialSteps = createInitialSteps(allChainBatches, getChainName$1);
5316
5319
  startStatusPolling(result.intentIds[0], initialSteps);
5320
+ for (let stepIdx = 0; stepIdx < allChainBatches.length; stepIdx++) {
5321
+ await relayerService.executeStep(result.actionId, 0, stepIdx, {
5322
+ action: "execute"
5323
+ });
5324
+ }
5317
5325
  onDepositSuccess?.(result.intentIds[0]);
5318
5326
  refreshSpiceAssets();
5319
5327
  }
package/dist/index.js CHANGED
@@ -9,7 +9,6 @@ import { createPortal } from 'react-dom';
9
9
  import { useWallets, usePrivy, useSign7702Authorization, useSignMessage } from '@privy-io/react-auth';
10
10
  import { useDynamicContext } from '@dynamic-labs/sdk-react-core';
11
11
  import { getAccountNonce, hashChainBatches, getAuthorizationHash } from 'spiceflow-core-test';
12
- import { SpiceFlowProviderContext as SpiceFlowProviderContext$1 } from '@/providers/SpiceFlowProvider';
13
12
  import { useAccount, useWalletClient, useSwitchChain, useReadContracts, useConnect, useDisconnect, http as http$1, createConfig, WagmiProvider } from 'wagmi';
14
13
  import { DynamicLogin } from './auth-dynamic.js';
15
14
  import { PrivyLogin } from './auth-privy.js';
@@ -5153,7 +5152,7 @@ const DepositWidget = ({
5153
5152
  provider,
5154
5153
  actions
5155
5154
  } = wallet;
5156
- const spiceFlowContext = useContext(SpiceFlowProviderContext$1);
5155
+ const spiceFlowContext = useContext(SpiceFlowProviderContext);
5157
5156
  const mode = spiceFlowContext?.mode || "7702";
5158
5157
  const [selectedDepositAsset, setSelectedDepositAsset] = useState(null);
5159
5158
  const {
@@ -5289,7 +5288,14 @@ const DepositWidget = ({
5289
5288
  chainBatches: hashedChainBatches.map((b) => ({
5290
5289
  hash: b.hash,
5291
5290
  chainId: b.chainId,
5292
- tokenTransfers: [],
5291
+ tokenTransfers: [
5292
+ {
5293
+ from: "solver",
5294
+ to: address,
5295
+ token: tokenAddress,
5296
+ amount: parseUnits(selectedDepositAsset.amount, tokenDecimals)
5297
+ }
5298
+ ],
5293
5299
  calls: b.calls
5294
5300
  }))
5295
5301
  };
@@ -5299,19 +5305,21 @@ const DepositWidget = ({
5299
5305
  r: auth.r,
5300
5306
  s: auth.s,
5301
5307
  yParity: auth.yParity,
5308
+ address: auth.address,
5302
5309
  chainId: auth.chainId,
5303
- nonce: Number(auth.nonce),
5304
- address: auth.address
5310
+ nonce: Number(auth.nonce)
5305
5311
  })),
5306
5312
  intents: [intent]
5307
5313
  };
5308
5314
  const result = await relayerService.createAction(request);
5309
5315
  if (result) {
5310
- const getChainName = (chainId) => {
5311
- return `Chain ${chainId}`;
5312
- };
5313
- const initialSteps = createInitialSteps(allChainBatches, getChainName);
5316
+ const initialSteps = createInitialSteps(allChainBatches, getChainName$1);
5314
5317
  startStatusPolling(result.intentIds[0], initialSteps);
5318
+ for (let stepIdx = 0; stepIdx < allChainBatches.length; stepIdx++) {
5319
+ await relayerService.executeStep(result.actionId, 0, stepIdx, {
5320
+ action: "execute"
5321
+ });
5322
+ }
5315
5323
  onDepositSuccess?.(result.intentIds[0]);
5316
5324
  refreshSpiceAssets();
5317
5325
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spicenet-io/spiceflow-ui",
3
- "version": "1.9.25",
3
+ "version": "1.9.27",
4
4
  "description": "Spiceflow UI SDK",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs.js",