@spicenet-io/spiceflow-ui 1.7.1 → 1.7.2
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/auth-dynamic.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
3
|
import React, { useEffect, useState, useCallback } from 'react';
|
|
4
|
-
import { c as createTheme, B as Button } from './Button-
|
|
4
|
+
import { c as createTheme, B as Button } from './Button-RifBkofT.js';
|
|
5
5
|
import { useDynamicContext, useConnectWithOtp } from '@dynamic-labs/sdk-react-core';
|
|
6
6
|
|
|
7
7
|
const Input = ({
|
package/dist/auth-privy.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
3
3
|
import { useState, useEffect } from 'react';
|
|
4
|
-
import { B as Button, c as createTheme } from './Button-
|
|
4
|
+
import { B as Button, c as createTheme } from './Button-RifBkofT.js';
|
|
5
5
|
import { usePrivy, useLogin, useLogout } from '@privy-io/react-auth';
|
|
6
6
|
|
|
7
7
|
const PrivyLogin = ({
|
package/dist/index.cjs.js
CHANGED
|
@@ -3914,8 +3914,7 @@ const SwapWidget = ({
|
|
|
3914
3914
|
|
|
3915
3915
|
const DepositWidget = ({
|
|
3916
3916
|
depositBatches,
|
|
3917
|
-
tokenAddress,
|
|
3918
|
-
tokenDecimals,
|
|
3917
|
+
tokenAddress = "0x0",
|
|
3919
3918
|
supportedChains,
|
|
3920
3919
|
theme: themeMode = "light",
|
|
3921
3920
|
styles,
|
|
@@ -4105,10 +4104,7 @@ const DepositWidget = ({
|
|
|
4105
4104
|
[
|
|
4106
4105
|
{
|
|
4107
4106
|
tokenAddress,
|
|
4108
|
-
tokenAmount: viem.
|
|
4109
|
-
selectedDepositAsset.amount,
|
|
4110
|
-
tokenDecimals
|
|
4111
|
-
)
|
|
4107
|
+
tokenAmount: viem.parseEther(selectedDepositAsset.amount)
|
|
4112
4108
|
}
|
|
4113
4109
|
]
|
|
4114
4110
|
]
|
|
@@ -4619,7 +4615,6 @@ const DepositWidgetModal = ({
|
|
|
4619
4615
|
// Pass through all DepositWidget props
|
|
4620
4616
|
depositBatches,
|
|
4621
4617
|
tokenAddress,
|
|
4622
|
-
tokenDecimals,
|
|
4623
4618
|
supportedChains,
|
|
4624
4619
|
theme: themeMode = "light",
|
|
4625
4620
|
styles,
|
|
@@ -4685,7 +4680,6 @@ const DepositWidgetModal = ({
|
|
|
4685
4680
|
{
|
|
4686
4681
|
depositBatches,
|
|
4687
4682
|
tokenAddress,
|
|
4688
|
-
tokenDecimals,
|
|
4689
4683
|
supportedChains,
|
|
4690
4684
|
theme: themeMode,
|
|
4691
4685
|
styles: {
|
|
@@ -7330,7 +7324,7 @@ const DepositModal = React.memo(
|
|
|
7330
7324
|
);
|
|
7331
7325
|
}
|
|
7332
7326
|
if (sponsorGas && nativeChainId) {
|
|
7333
|
-
const gasAmount = viem.parseUnits("0.
|
|
7327
|
+
const gasAmount = viem.parseUnits("0.05", 18);
|
|
7334
7328
|
tokenTransfers.push({
|
|
7335
7329
|
tokenAddress: "0x0",
|
|
7336
7330
|
tokenAmount: gasAmount.toString(),
|
|
@@ -7470,7 +7464,7 @@ const DepositModal = React.memo(
|
|
|
7470
7464
|
});
|
|
7471
7465
|
}
|
|
7472
7466
|
if (sponsorGas && nativeChainId) {
|
|
7473
|
-
const gasAmount = viem.parseUnits("0.
|
|
7467
|
+
const gasAmount = viem.parseUnits("0.05", 18);
|
|
7474
7468
|
tokenTransfers.push({
|
|
7475
7469
|
tokenAddress: "0x0",
|
|
7476
7470
|
tokenAmount: gasAmount.toString(),
|
|
@@ -11964,7 +11958,7 @@ const LpModal = ({
|
|
|
11964
11958
|
};
|
|
11965
11959
|
|
|
11966
11960
|
const useFromInput = () => {
|
|
11967
|
-
const [fromAmount, setFromAmount] = React.useState("
|
|
11961
|
+
const [fromAmount, setFromAmount] = React.useState("");
|
|
11968
11962
|
return {
|
|
11969
11963
|
fromAmount,
|
|
11970
11964
|
setFromAmount
|
|
@@ -11972,7 +11966,7 @@ const useFromInput = () => {
|
|
|
11972
11966
|
};
|
|
11973
11967
|
|
|
11974
11968
|
const useToInputUpdate = () => {
|
|
11975
|
-
const [toAmount, setToAmount] = React.useState("
|
|
11969
|
+
const [toAmount, setToAmount] = React.useState("");
|
|
11976
11970
|
const updateToAmount = React.useCallback((amount) => {
|
|
11977
11971
|
setToAmount(amount);
|
|
11978
11972
|
}, []);
|
|
@@ -11984,7 +11978,7 @@ const useToInputUpdate = () => {
|
|
|
11984
11978
|
};
|
|
11985
11979
|
|
|
11986
11980
|
const useDepositInput = () => {
|
|
11987
|
-
const [depositAmount, setDepositAmount] = React.useState("
|
|
11981
|
+
const [depositAmount, setDepositAmount] = React.useState("");
|
|
11988
11982
|
return {
|
|
11989
11983
|
depositAmount,
|
|
11990
11984
|
setDepositAmount
|
package/dist/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
3
3
|
import React, { useState, useRef, useEffect, useCallback, createContext, useContext, useTransition, forwardRef, createElement, useMemo } from 'react';
|
|
4
4
|
import { defineChain, createPublicClient, http, isAddress, getAddress, parseEther, encodeFunctionData, parseUnits, erc20Abi } from 'viem';
|
|
5
|
-
import { c as createTheme, B as Button, d as defaultTheme } from './Button-
|
|
5
|
+
import { c as createTheme, B as Button, d as defaultTheme } from './Button-RifBkofT.js';
|
|
6
6
|
import { getBalance, readContract } from 'viem/actions';
|
|
7
7
|
import { basecampTestnet, citreaTestnet, baseSepolia, arbitrumSepolia, sepolia } from 'viem/chains';
|
|
8
8
|
import { createPortal } from 'react-dom';
|
|
@@ -3912,8 +3912,7 @@ const SwapWidget = ({
|
|
|
3912
3912
|
|
|
3913
3913
|
const DepositWidget = ({
|
|
3914
3914
|
depositBatches,
|
|
3915
|
-
tokenAddress,
|
|
3916
|
-
tokenDecimals,
|
|
3915
|
+
tokenAddress = "0x0",
|
|
3917
3916
|
supportedChains,
|
|
3918
3917
|
theme: themeMode = "light",
|
|
3919
3918
|
styles,
|
|
@@ -4103,10 +4102,7 @@ const DepositWidget = ({
|
|
|
4103
4102
|
[
|
|
4104
4103
|
{
|
|
4105
4104
|
tokenAddress,
|
|
4106
|
-
tokenAmount:
|
|
4107
|
-
selectedDepositAsset.amount,
|
|
4108
|
-
tokenDecimals
|
|
4109
|
-
)
|
|
4105
|
+
tokenAmount: parseEther(selectedDepositAsset.amount)
|
|
4110
4106
|
}
|
|
4111
4107
|
]
|
|
4112
4108
|
]
|
|
@@ -4617,7 +4613,6 @@ const DepositWidgetModal = ({
|
|
|
4617
4613
|
// Pass through all DepositWidget props
|
|
4618
4614
|
depositBatches,
|
|
4619
4615
|
tokenAddress,
|
|
4620
|
-
tokenDecimals,
|
|
4621
4616
|
supportedChains,
|
|
4622
4617
|
theme: themeMode = "light",
|
|
4623
4618
|
styles,
|
|
@@ -4683,7 +4678,6 @@ const DepositWidgetModal = ({
|
|
|
4683
4678
|
{
|
|
4684
4679
|
depositBatches,
|
|
4685
4680
|
tokenAddress,
|
|
4686
|
-
tokenDecimals,
|
|
4687
4681
|
supportedChains,
|
|
4688
4682
|
theme: themeMode,
|
|
4689
4683
|
styles: {
|
|
@@ -7328,7 +7322,7 @@ const DepositModal = React.memo(
|
|
|
7328
7322
|
);
|
|
7329
7323
|
}
|
|
7330
7324
|
if (sponsorGas && nativeChainId) {
|
|
7331
|
-
const gasAmount = parseUnits("0.
|
|
7325
|
+
const gasAmount = parseUnits("0.05", 18);
|
|
7332
7326
|
tokenTransfers.push({
|
|
7333
7327
|
tokenAddress: "0x0",
|
|
7334
7328
|
tokenAmount: gasAmount.toString(),
|
|
@@ -7468,7 +7462,7 @@ const DepositModal = React.memo(
|
|
|
7468
7462
|
});
|
|
7469
7463
|
}
|
|
7470
7464
|
if (sponsorGas && nativeChainId) {
|
|
7471
|
-
const gasAmount = parseUnits("0.
|
|
7465
|
+
const gasAmount = parseUnits("0.05", 18);
|
|
7472
7466
|
tokenTransfers.push({
|
|
7473
7467
|
tokenAddress: "0x0",
|
|
7474
7468
|
tokenAmount: gasAmount.toString(),
|
|
@@ -11962,7 +11956,7 @@ const LpModal = ({
|
|
|
11962
11956
|
};
|
|
11963
11957
|
|
|
11964
11958
|
const useFromInput = () => {
|
|
11965
|
-
const [fromAmount, setFromAmount] = useState("
|
|
11959
|
+
const [fromAmount, setFromAmount] = useState("");
|
|
11966
11960
|
return {
|
|
11967
11961
|
fromAmount,
|
|
11968
11962
|
setFromAmount
|
|
@@ -11970,7 +11964,7 @@ const useFromInput = () => {
|
|
|
11970
11964
|
};
|
|
11971
11965
|
|
|
11972
11966
|
const useToInputUpdate = () => {
|
|
11973
|
-
const [toAmount, setToAmount] = useState("
|
|
11967
|
+
const [toAmount, setToAmount] = useState("");
|
|
11974
11968
|
const updateToAmount = useCallback((amount) => {
|
|
11975
11969
|
setToAmount(amount);
|
|
11976
11970
|
}, []);
|
|
@@ -11982,7 +11976,7 @@ const useToInputUpdate = () => {
|
|
|
11982
11976
|
};
|
|
11983
11977
|
|
|
11984
11978
|
const useDepositInput = () => {
|
|
11985
|
-
const [depositAmount, setDepositAmount] = useState("
|
|
11979
|
+
const [depositAmount, setDepositAmount] = useState("");
|
|
11986
11980
|
return {
|
|
11987
11981
|
depositAmount,
|
|
11988
11982
|
setDepositAmount
|
package/dist/types/deposit.d.ts
CHANGED
|
@@ -19,8 +19,7 @@ export interface SpiceDepositResponse {
|
|
|
19
19
|
}
|
|
20
20
|
export interface DepositWidgetProps {
|
|
21
21
|
depositBatches: ChainBatch[];
|
|
22
|
-
tokenAddress
|
|
23
|
-
tokenDecimals: number;
|
|
22
|
+
tokenAddress?: Address;
|
|
24
23
|
supportedChains: number[];
|
|
25
24
|
theme?: ThemeMode;
|
|
26
25
|
styles?: CustomStyles;
|
package/package.json
CHANGED
|
File without changes
|