@lifi/widget 3.12.3-beta.1 → 3.12.3
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/CHANGELOG.md +2 -0
- package/dist/esm/components/ActiveTransactions/ActiveTransactions.style.d.ts +2 -2
- package/dist/esm/components/AmountInput/AmountInput.js +1 -7
- package/dist/esm/components/AmountInput/AmountInput.js.map +1 -1
- package/dist/esm/components/AmountInput/AmountInput.style.d.ts +1 -1
- package/dist/esm/components/AmountInput/AmountInputAdornment.style.d.ts +1 -1
- package/dist/esm/components/AppContainer.d.ts +1 -1
- package/dist/esm/components/Avatar/Avatar.style.d.ts +1 -1
- package/dist/esm/components/Avatar/SmallAvatar.d.ts +1 -1
- package/dist/esm/components/ButtonTertiary.d.ts +1 -1
- package/dist/esm/components/Card/CardHeader.d.ts +1 -1
- package/dist/esm/components/Card/InputCard.d.ts +1 -1
- package/dist/esm/components/ContractComponent/ItemPrice.js +1 -2
- package/dist/esm/components/ContractComponent/ItemPrice.js.map +1 -1
- package/dist/esm/components/ContractComponent/NFT/NFT.js +1 -2
- package/dist/esm/components/ContractComponent/NFT/NFT.js.map +1 -1
- package/dist/esm/components/ContractComponent/NFT/NFT.style.d.ts +1 -1
- package/dist/esm/components/Header/Header.style.d.ts +2 -2
- package/dist/esm/components/Header/SettingsButton.style.d.ts +1 -1
- package/dist/esm/components/ListItem/ListItem.d.ts +1 -1
- package/dist/esm/components/PageContainer.d.ts +1 -1
- package/dist/esm/components/RouteCard/RouteCard.js +2 -2
- package/dist/esm/components/RouteCard/RouteCard.js.map +1 -1
- package/dist/esm/components/Routes/Routes.js +2 -7
- package/dist/esm/components/Routes/Routes.js.map +1 -1
- package/dist/esm/components/Routes/RoutesExpanded.js +4 -7
- package/dist/esm/components/Routes/RoutesExpanded.js.map +1 -1
- package/dist/esm/components/SelectTokenButton/SelectTokenButton.style.d.ts +1 -1
- package/dist/esm/components/SendToWallet/SendToWallet.style.d.ts +1 -1
- package/dist/esm/components/SendToWallet/SendToWalletButton.js +2 -5
- package/dist/esm/components/SendToWallet/SendToWalletButton.js.map +1 -1
- package/dist/esm/components/Skeleton/WidgetSkeleton.style.d.ts +3 -3
- package/dist/esm/components/Step/Step.js +2 -2
- package/dist/esm/components/Step/Step.js.map +1 -1
- package/dist/esm/components/StepActions/StepActions.style.d.ts +1 -1
- package/dist/esm/components/StepDivider/StepDivider.style.d.ts +1 -1
- package/dist/esm/components/Tabs/Tabs.style.d.ts +1 -1
- package/dist/esm/components/TokenList/TokenList.style.d.ts +1 -1
- package/dist/esm/config/version.d.ts +1 -1
- package/dist/esm/config/version.js +1 -1
- package/dist/esm/config/version.js.map +1 -1
- package/dist/esm/hooks/useGasRefuel.js +9 -6
- package/dist/esm/hooks/useGasRefuel.js.map +1 -1
- package/dist/esm/hooks/useIsContractAddress.js.map +1 -1
- package/dist/esm/hooks/useRoutes.js +4 -6
- package/dist/esm/hooks/useRoutes.js.map +1 -1
- package/dist/esm/i18n/en.json +1 -5
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/pages/MainPage/MainPage.js +1 -2
- package/dist/esm/pages/MainPage/MainPage.js.map +1 -1
- package/dist/esm/pages/MainPage/MainPage.style.d.ts +1 -1
- package/dist/esm/pages/SendToWallet/SendToWalletPage.style.d.ts +4 -4
- package/dist/esm/pages/SettingsPage/SettingsCard/SettingCard.style.d.ts +1 -1
- package/dist/esm/types/widget.d.ts +1 -2
- package/package.json +9 -9
- package/src/components/AmountInput/AmountInput.tsx +1 -9
- package/src/components/ContractComponent/ItemPrice.tsx +3 -8
- package/src/components/ContractComponent/NFT/NFT.tsx +3 -8
- package/src/components/RouteCard/RouteCard.tsx +2 -2
- package/src/components/Routes/Routes.tsx +4 -10
- package/src/components/Routes/RoutesExpanded.tsx +4 -9
- package/src/components/SendToWallet/SendToWalletButton.tsx +4 -14
- package/src/components/Step/Step.tsx +2 -2
- package/src/config/version.ts +1 -1
- package/src/hooks/useGasRefuel.ts +18 -6
- package/src/hooks/useIsContractAddress.ts +0 -1
- package/src/hooks/useRoutes.ts +4 -6
- package/src/i18n/en.json +1 -5
- package/src/i18n/i18next.d.ts +8 -4
- package/src/index.ts +1 -1
- package/src/pages/MainPage/MainPage.tsx +8 -9
- package/src/types/widget.ts +1 -2
- package/tsconfig.json +2 -4
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { ContractCall } from '@lifi/sdk'
|
|
2
2
|
import { useEffect } from 'react'
|
|
3
|
-
import { formatUnits } from 'viem'
|
|
4
3
|
import { useFieldActions } from '../../stores/form/useFieldActions.js'
|
|
5
4
|
import type { TokenAmount } from '../../types/token.js'
|
|
6
5
|
import { Token } from '../Token/Token.js'
|
|
@@ -20,13 +19,9 @@ export const ItemPrice: React.FC<ItemPriceProps> = ({
|
|
|
20
19
|
if (token) {
|
|
21
20
|
setFieldValue('toChain', token.chainId, { isTouched: true })
|
|
22
21
|
setFieldValue('toToken', token.address, { isTouched: true })
|
|
23
|
-
setFieldValue(
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
{
|
|
27
|
-
isTouched: true,
|
|
28
|
-
}
|
|
29
|
-
)
|
|
22
|
+
setFieldValue('toAmount', token.amount?.toString(), {
|
|
23
|
+
isTouched: true,
|
|
24
|
+
})
|
|
30
25
|
}
|
|
31
26
|
if (contractCalls) {
|
|
32
27
|
setFieldValue('contractCalls', contractCalls, {
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { useEffect } from 'react'
|
|
2
|
-
import { formatUnits } from 'viem'
|
|
3
2
|
import { useFieldActions } from '../../../stores/form/useFieldActions.js'
|
|
4
3
|
import { NFTBase } from './NFTBase.js'
|
|
5
4
|
import type { NFTProps } from './types.js'
|
|
@@ -19,13 +18,9 @@ export const NFT: React.FC<NFTProps> = ({
|
|
|
19
18
|
if (token) {
|
|
20
19
|
setFieldValue('toChain', token.chainId, { isTouched: true })
|
|
21
20
|
setFieldValue('toToken', token.address, { isTouched: true })
|
|
22
|
-
setFieldValue(
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
{
|
|
26
|
-
isTouched: true,
|
|
27
|
-
}
|
|
28
|
-
)
|
|
21
|
+
setFieldValue('toAmount', token.amount?.toString(), {
|
|
22
|
+
isTouched: true,
|
|
23
|
+
})
|
|
29
24
|
}
|
|
30
25
|
if (contractCall) {
|
|
31
26
|
setFieldValue('contractCalls', [contractCall], {
|
|
@@ -26,7 +26,7 @@ export const RouteCard: React.FC<
|
|
|
26
26
|
...other
|
|
27
27
|
}) => {
|
|
28
28
|
const { t } = useTranslation()
|
|
29
|
-
const { subvariant
|
|
29
|
+
const { subvariant } = useWidgetConfig()
|
|
30
30
|
const [cardExpanded, setCardExpanded] = useState(defaulExpanded)
|
|
31
31
|
|
|
32
32
|
const handleExpand: MouseEventHandler<HTMLButtonElement> = (e) => {
|
|
@@ -35,7 +35,7 @@ export const RouteCard: React.FC<
|
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
const token: TokenAmount =
|
|
38
|
-
subvariant === 'custom'
|
|
38
|
+
subvariant === 'custom'
|
|
39
39
|
? { ...route.fromToken, amount: BigInt(route.fromAmount) }
|
|
40
40
|
: { ...route.toToken, amount: BigInt(route.toAmount) }
|
|
41
41
|
const impactToken: TokenAmount | undefined =
|
|
@@ -16,8 +16,7 @@ import { RouteNotFoundCard } from '../RouteCard/RouteNotFoundCard.js'
|
|
|
16
16
|
export const Routes: React.FC<CardProps> = (props) => {
|
|
17
17
|
const { t } = useTranslation()
|
|
18
18
|
const navigate = useNavigate()
|
|
19
|
-
const { subvariant,
|
|
20
|
-
useWidgetConfig()
|
|
19
|
+
const { subvariant, useRecommendedRoute } = useWidgetConfig()
|
|
21
20
|
const {
|
|
22
21
|
routes,
|
|
23
22
|
isLoading,
|
|
@@ -43,16 +42,11 @@ export const Routes: React.FC<CardProps> = (props) => {
|
|
|
43
42
|
const showAll =
|
|
44
43
|
!onlyRecommendedRoute && !routeNotFound && (routes?.length ?? 0) > 1
|
|
45
44
|
|
|
46
|
-
const title =
|
|
47
|
-
subvariant === 'custom'
|
|
48
|
-
? subvariantOptions?.custom === 'deposit'
|
|
49
|
-
? t('header.receive')
|
|
50
|
-
: t('header.youPay')
|
|
51
|
-
: t('header.receive')
|
|
52
|
-
|
|
53
45
|
return (
|
|
54
46
|
<Card {...props}>
|
|
55
|
-
<CardTitle>
|
|
47
|
+
<CardTitle>
|
|
48
|
+
{subvariant === 'custom' ? t('header.youPay') : t('header.receive')}
|
|
49
|
+
</CardTitle>
|
|
56
50
|
<ProgressToNextUpdate
|
|
57
51
|
updatedAt={dataUpdatedAt || new Date().getTime()}
|
|
58
52
|
timeToUpdate={refetchTime}
|
|
@@ -64,7 +64,7 @@ export const RoutesExpanded = () => {
|
|
|
64
64
|
export const RoutesExpandedElement = () => {
|
|
65
65
|
const { t } = useTranslation()
|
|
66
66
|
const navigate = useNavigate()
|
|
67
|
-
const { subvariant
|
|
67
|
+
const { subvariant } = useWidgetConfig()
|
|
68
68
|
const routesRef = useRef<Route[]>()
|
|
69
69
|
const emitter = useWidgetEvents()
|
|
70
70
|
const routesActiveRef = useRef(false)
|
|
@@ -118,13 +118,6 @@ export const RoutesExpandedElement = () => {
|
|
|
118
118
|
emitter.emit(WidgetEvent.WidgetExpanded, expanded)
|
|
119
119
|
}, [emitter, expanded])
|
|
120
120
|
|
|
121
|
-
const title =
|
|
122
|
-
subvariant === 'custom'
|
|
123
|
-
? subvariantOptions?.custom === 'deposit'
|
|
124
|
-
? t('header.deposit')
|
|
125
|
-
: t('header.youPay')
|
|
126
|
-
: t('header.receive')
|
|
127
|
-
|
|
128
121
|
return (
|
|
129
122
|
<RoutesExpandedCollapse
|
|
130
123
|
timeout={timeout.enter}
|
|
@@ -137,7 +130,9 @@ export const RoutesExpandedElement = () => {
|
|
|
137
130
|
<ScrollableContainer>
|
|
138
131
|
<Header>
|
|
139
132
|
<Typography fontSize={18} fontWeight="700" flex={1} noWrap>
|
|
140
|
-
{
|
|
133
|
+
{subvariant === 'custom'
|
|
134
|
+
? t('header.youPay')
|
|
135
|
+
: t('header.receive')}
|
|
141
136
|
</Typography>
|
|
142
137
|
<ProgressToNextUpdate
|
|
143
138
|
updatedAt={dataUpdatedAt || new Date().getTime()}
|
|
@@ -28,14 +28,7 @@ import { SendToWalletCardHeader } from './SendToWallet.style.js'
|
|
|
28
28
|
export const SendToWalletButton: React.FC<CardProps> = (props) => {
|
|
29
29
|
const { t } = useTranslation()
|
|
30
30
|
const navigate = useNavigate()
|
|
31
|
-
const {
|
|
32
|
-
disabledUI,
|
|
33
|
-
hiddenUI,
|
|
34
|
-
toAddress,
|
|
35
|
-
toAddresses,
|
|
36
|
-
subvariant,
|
|
37
|
-
subvariantOptions,
|
|
38
|
-
} = useWidgetConfig()
|
|
31
|
+
const { disabledUI, hiddenUI, toAddress, toAddresses } = useWidgetConfig()
|
|
39
32
|
const { showSendToWallet } = useSendToWalletStore()
|
|
40
33
|
const [toAddressFieldValue, toChainId, toTokenAddress] = useFieldValues(
|
|
41
34
|
'toAddress',
|
|
@@ -121,11 +114,6 @@ export const SendToWalletButton: React.FC<CardProps> = (props) => {
|
|
|
121
114
|
const isOpenCollapse =
|
|
122
115
|
requiredToAddress || (showSendToWallet && !hiddenToAddress)
|
|
123
116
|
|
|
124
|
-
const title =
|
|
125
|
-
subvariant === 'custom' && subvariantOptions?.custom === 'deposit'
|
|
126
|
-
? t('header.depositTo')
|
|
127
|
-
: t('header.sendToWallet')
|
|
128
|
-
|
|
129
117
|
return (
|
|
130
118
|
<Collapse
|
|
131
119
|
timeout={collapseTransitionTime.current}
|
|
@@ -139,7 +127,9 @@ export const SendToWalletButton: React.FC<CardProps> = (props) => {
|
|
|
139
127
|
onClick={disabledForChanges ? undefined : handleOnClick}
|
|
140
128
|
sx={{ width: '100%', ...props.sx }}
|
|
141
129
|
>
|
|
142
|
-
<CardTitle required={requiredToAddress}>
|
|
130
|
+
<CardTitle required={requiredToAddress}>
|
|
131
|
+
{t('header.sendToWallet')}
|
|
132
|
+
</CardTitle>
|
|
143
133
|
<Box display="flex" justifyContent="center" alignItems="center">
|
|
144
134
|
<SendToWalletCardHeader
|
|
145
135
|
avatar={
|
|
@@ -58,8 +58,8 @@ export const Step: React.FC<{
|
|
|
58
58
|
default:
|
|
59
59
|
return subvariant === 'custom'
|
|
60
60
|
? subvariantOptions?.custom === 'deposit'
|
|
61
|
-
? t('main.
|
|
62
|
-
: t('main.
|
|
61
|
+
? t('main.stepSwapAndDeposit')
|
|
62
|
+
: t('main.stepSwapAndBuy')
|
|
63
63
|
: t('main.stepSwap')
|
|
64
64
|
}
|
|
65
65
|
}
|
package/src/config/version.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export const name = '@lifi/widget'
|
|
2
|
-
export const version = '3.12.3
|
|
2
|
+
export const version = '3.12.3'
|
|
@@ -19,18 +19,29 @@ export const useGasRefuel = () => {
|
|
|
19
19
|
const toChain = getChainById(toChainId)
|
|
20
20
|
const fromChain = getChainById(fromChainId)
|
|
21
21
|
|
|
22
|
-
const {
|
|
22
|
+
const { accounts } = useAccount()
|
|
23
23
|
|
|
24
|
-
const
|
|
24
|
+
const fromAccount = accounts.find(
|
|
25
|
+
(account) => account.chainType === fromChain?.chainType
|
|
26
|
+
)
|
|
27
|
+
|
|
28
|
+
const toAccount = accounts.find(
|
|
29
|
+
(account) => account.chainType === toChain?.chainType
|
|
30
|
+
)
|
|
25
31
|
|
|
32
|
+
const isFromContractAddress = useIsContractAddress(
|
|
33
|
+
fromAccount?.address,
|
|
34
|
+
fromChainId,
|
|
35
|
+
fromAccount?.chainType
|
|
36
|
+
)
|
|
26
37
|
const isToContractAddress = useIsContractAddress(
|
|
27
|
-
|
|
38
|
+
toAddress,
|
|
28
39
|
toChainId,
|
|
29
40
|
toChain?.chainType
|
|
30
41
|
)
|
|
31
42
|
|
|
32
43
|
const { token: destinationNativeToken } = useTokenBalance(
|
|
33
|
-
|
|
44
|
+
toAddress || toAccount?.address,
|
|
34
45
|
toChainId ? toChain?.nativeToken : undefined
|
|
35
46
|
)
|
|
36
47
|
|
|
@@ -44,8 +55,9 @@ export const useGasRefuel = () => {
|
|
|
44
55
|
const isChainTypeSatisfied =
|
|
45
56
|
fromChain?.chainType !== toChain?.chainType ? Boolean(toAddress) : true
|
|
46
57
|
|
|
47
|
-
|
|
48
|
-
|
|
58
|
+
const isToAddressSatisfied = isFromContractAddress
|
|
59
|
+
? toAddress && toAddress !== fromAccount?.address && !isToContractAddress
|
|
60
|
+
: true
|
|
49
61
|
|
|
50
62
|
const enabled = useMemo(() => {
|
|
51
63
|
if (
|
package/src/hooks/useRoutes.ts
CHANGED
|
@@ -177,7 +177,6 @@ export const useRoutes = ({ observableRoute }: RoutesProps = {}) => {
|
|
|
177
177
|
signal,
|
|
178
178
|
}) => {
|
|
179
179
|
const fromAmount = parseUnits(fromTokenAmount, fromToken!.decimals)
|
|
180
|
-
const toAmount = parseUnits(toTokenAmount, toToken!.decimals)
|
|
181
180
|
const formattedSlippage = Number.parseFloat(slippage) / 100
|
|
182
181
|
|
|
183
182
|
const allowBridges = swapOnly
|
|
@@ -211,18 +210,17 @@ export const useRoutes = ({ observableRoute }: RoutesProps = {}) => {
|
|
|
211
210
|
fromAddress,
|
|
212
211
|
toAddress,
|
|
213
212
|
fromAmount,
|
|
214
|
-
toAmount,
|
|
215
213
|
slippage: formattedSlippage,
|
|
216
214
|
})
|
|
217
215
|
|
|
218
|
-
if (subvariant === 'custom' && contractCalls &&
|
|
216
|
+
if (subvariant === 'custom' && contractCalls && toTokenAmount) {
|
|
219
217
|
const contractCallQuote = await getContractCallsQuote(
|
|
220
218
|
{
|
|
221
219
|
// Contract calls are enabled only when fromAddress is set
|
|
222
220
|
fromAddress: fromAddress as string,
|
|
223
221
|
fromChain: fromChainId,
|
|
224
222
|
fromToken: fromTokenAddress,
|
|
225
|
-
toAmount:
|
|
223
|
+
toAmount: toTokenAmount,
|
|
226
224
|
toChain: toChainId,
|
|
227
225
|
toToken: toTokenAddress,
|
|
228
226
|
contractCalls,
|
|
@@ -267,8 +265,8 @@ export const useRoutes = ({ observableRoute }: RoutesProps = {}) => {
|
|
|
267
265
|
fromAddress: contractCallQuote.action.fromAddress,
|
|
268
266
|
toChainId: contractCallQuote.action.toChainId,
|
|
269
267
|
toAmountUSD: contractCallQuote.estimate.toAmountUSD || '',
|
|
270
|
-
toAmount:
|
|
271
|
-
toAmountMin:
|
|
268
|
+
toAmount: toTokenAmount,
|
|
269
|
+
toAmountMin: toTokenAmount,
|
|
272
270
|
toToken: toToken!,
|
|
273
271
|
toAddress:
|
|
274
272
|
contractCallQuote.action.toAddress ||
|
package/src/i18n/en.json
CHANGED
|
@@ -52,14 +52,12 @@
|
|
|
52
52
|
},
|
|
53
53
|
"header": {
|
|
54
54
|
"activeTransactions": "Active transactions",
|
|
55
|
-
"amount": "Amount",
|
|
56
55
|
"bookmarkedWallets": "Bookmarked wallets",
|
|
57
56
|
"bridge": "Bridge",
|
|
58
57
|
"checkout": "Checkout",
|
|
59
58
|
"checkoutDetails": "Checkout details",
|
|
60
59
|
"deposit": "Deposit",
|
|
61
60
|
"depositDetails": "Deposit details",
|
|
62
|
-
"depositTo": "Deposit to",
|
|
63
61
|
"exchange": "Exchange",
|
|
64
62
|
"from": "Exchange from",
|
|
65
63
|
"gas": "Gas",
|
|
@@ -267,15 +265,13 @@
|
|
|
267
265
|
"stepBridge": "Bridge",
|
|
268
266
|
"stepBridgeAndBuy": "Bridge and buy",
|
|
269
267
|
"stepBridgeAndDeposit": "Bridge and deposit",
|
|
270
|
-
"stepBuy": "Buy",
|
|
271
|
-
"stepDeposit": "Deposit",
|
|
272
268
|
"stepDetails": "{{tool}} via LI.FI",
|
|
273
269
|
"stepSwap": "Swap",
|
|
274
270
|
"stepSwapAndBridge": "Swap and bridge",
|
|
275
271
|
"stepSwapAndBuy": "Swap and buy",
|
|
276
272
|
"stepSwapAndDeposit": "Swap and deposit",
|
|
277
|
-
"swapStepDetails": "Swap on {{chain}} via {{tool}}",
|
|
278
273
|
"transferId": "Transfer ID",
|
|
274
|
+
"swapStepDetails": "Swap on {{chain}} via {{tool}}",
|
|
279
275
|
"tags": {
|
|
280
276
|
"cheapest": "Best Return",
|
|
281
277
|
"fastest": "Fastest"
|
package/src/i18n/i18next.d.ts
CHANGED
|
@@ -2,9 +2,13 @@ import en from './en.json' with { type: 'json' }
|
|
|
2
2
|
|
|
3
3
|
const defaultResource = { translation: en }
|
|
4
4
|
|
|
5
|
-
declare
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
declare global {
|
|
6
|
+
namespace GeneralTranslation {
|
|
7
|
+
declare module 'i18next' {
|
|
8
|
+
interface CustomTypeOptions {
|
|
9
|
+
defaultNS: 'translation'
|
|
10
|
+
resources: typeof defaultResource
|
|
11
|
+
}
|
|
12
|
+
}
|
|
9
13
|
}
|
|
10
14
|
}
|
package/src/index.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export type * from '@lifi/sdk'
|
|
2
|
-
export { ChainType, ChainId
|
|
2
|
+
export { ChainType, ChainId } from '@lifi/sdk'
|
|
3
3
|
export { App as LiFiWidget } from './App.js'
|
|
4
4
|
export type { WidgetDrawer } from './AppDrawer.js'
|
|
5
5
|
export * from './components/ContractComponent/ItemPrice.js'
|
|
@@ -31,23 +31,22 @@ export const MainPage: React.FC = () => {
|
|
|
31
31
|
: subvariant === 'refuel'
|
|
32
32
|
? t('header.gas')
|
|
33
33
|
: t('header.exchange')
|
|
34
|
-
|
|
35
34
|
useHeader(title)
|
|
36
35
|
|
|
37
|
-
const marginSx = { marginBottom: 2 }
|
|
38
|
-
|
|
39
36
|
return (
|
|
40
37
|
<PageContainer>
|
|
41
|
-
<ActiveTransactions sx={
|
|
38
|
+
<ActiveTransactions sx={{ marginBottom: 2 }} />
|
|
42
39
|
{custom ? (
|
|
43
|
-
<ContractComponent sx={
|
|
40
|
+
<ContractComponent sx={{ marginBottom: 2 }}>
|
|
41
|
+
{contractComponent}
|
|
42
|
+
</ContractComponent>
|
|
44
43
|
) : null}
|
|
45
44
|
<SelectChainAndToken mb={2} />
|
|
46
|
-
{!custom
|
|
47
|
-
<AmountInput formType="from" sx={
|
|
45
|
+
{!custom ? (
|
|
46
|
+
<AmountInput formType="from" sx={{ marginBottom: 2 }} />
|
|
48
47
|
) : null}
|
|
49
|
-
{!wideVariant ? <Routes sx={
|
|
50
|
-
<SendToWalletButton sx={
|
|
48
|
+
{!wideVariant ? <Routes sx={{ marginBottom: 2 }} /> : null}
|
|
49
|
+
<SendToWalletButton sx={{ marginBottom: 2 }} />
|
|
51
50
|
<GasRefuelMessage mb={2} />
|
|
52
51
|
<MainMessages mb={2} />
|
|
53
52
|
<Box display="flex" mb={showPoweredBy ? 1 : 3} gap={1.5}>
|
package/src/types/widget.ts
CHANGED
package/tsconfig.json
CHANGED
|
@@ -7,9 +7,7 @@
|
|
|
7
7
|
"outDir": "dist/esm",
|
|
8
8
|
"rootDir": "./src",
|
|
9
9
|
"module": "NodeNext",
|
|
10
|
-
"moduleResolution": "NodeNext"
|
|
11
|
-
"skipLibCheck": true
|
|
10
|
+
"moduleResolution": "NodeNext"
|
|
12
11
|
},
|
|
13
|
-
"include": ["./src/**/*", "./src/**/*.json"]
|
|
14
|
-
"references": [{ "path": "../wallet-management" }]
|
|
12
|
+
"include": ["./src/**/*", "./src/**/*.json"]
|
|
15
13
|
}
|