@ensofinance/checkout-widget 0.0.13 → 0.0.15
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/checkout-widget.es.js +8422 -8104
- package/dist/checkout-widget.es.js.map +1 -1
- package/dist/checkout-widget.umd.js +31 -31
- package/dist/checkout-widget.umd.js.map +1 -1
- package/dist/index.d.ts +7 -0
- package/orval.config.ts +40 -6
- package/package.json +1 -1
- package/src/components/BridgeFee.tsx +3 -3
- package/src/components/Checkout.tsx +2 -2
- package/src/components/ExchangeConfirmSecurity.tsx +16 -3
- package/src/components/QuoteParameters.tsx +33 -18
- package/src/components/TransactionDetailRow.tsx +6 -5
- package/src/components/cards/AssetCard.tsx +2 -2
- package/src/components/cards/OptionCard.tsx +2 -0
- package/src/components/steps/ExchangeFlow.tsx +255 -98
- package/src/components/steps/FlowSelector.tsx +26 -10
- package/src/components/steps/WalletFlow/WalletAmountStep.tsx +22 -23
- package/src/components/steps/WalletFlow/WalletTokenStep.tsx +5 -3
- package/src/components/ui/index.tsx +0 -3
- package/src/enso-api/api.ts +144 -3
- package/src/enso-api/custom-instance.ts +1 -0
- package/src/enso-api/index.ts +29 -118
- package/src/enso-api/model/approveActionDto.ts +17 -0
- package/src/enso-api/model/approveArgsDto.ts +22 -0
- package/src/enso-api/model/approveArgsDtoAmount.ts +16 -0
- package/src/enso-api/model/balanceActionDto.ts +17 -0
- package/src/enso-api/model/balanceArgsDto.ts +15 -0
- package/src/enso-api/model/borrowActionDto.ts +18 -0
- package/src/enso-api/model/borrowArgsDto.ts +22 -0
- package/src/enso-api/model/borrowArgsDtoAmountOut.ts +16 -0
- package/src/enso-api/model/bridgeActionDto.ts +19 -0
- package/src/enso-api/model/bridgeArgsDto.ts +29 -0
- package/src/enso-api/model/bridgeArgsDtoAmountIn.ts +16 -0
- package/src/enso-api/model/bridgeArgsDtoCallbackItem.ts +64 -0
- package/src/enso-api/model/bundleControllerBundleShortcutTransactionBodyItem.ts +69 -0
- package/src/enso-api/model/callActionDto.ts +18 -0
- package/src/enso-api/model/callArgsDto.ts +29 -0
- package/src/enso-api/model/callArgsDtoArgsItem.ts +17 -0
- package/src/enso-api/model/callArgsDtoArgsItemAnyOf.ts +12 -0
- package/src/enso-api/model/callArgsDtoValue.ts +16 -0
- package/src/enso-api/model/callOutput.ts +15 -0
- package/src/enso-api/model/depositActionDto.ts +18 -0
- package/src/enso-api/model/depositArgsDto.ts +28 -0
- package/src/enso-api/model/depositArgsDtoAmountIn.ts +20 -0
- package/src/enso-api/model/depositArgsDtoAmountInOneOfItem.ts +13 -0
- package/src/enso-api/model/depositArgsDtoTokenIn.ts +15 -0
- package/src/enso-api/model/depositArgsDtoTokenOut.ts +15 -0
- package/src/enso-api/model/depositCLMMActionDto.ts +18 -0
- package/src/enso-api/model/depositCLMMArgsDto.ts +30 -0
- package/src/enso-api/model/depositCLMMArgsDtoAmountInItem.ts +17 -0
- package/src/enso-api/model/depositCLMMArgsDtoAmountInItemAnyOf.ts +12 -0
- package/src/enso-api/model/ensoFeeActionDto.ts +17 -0
- package/src/enso-api/model/ensoFeeArgsDto.ts +20 -0
- package/src/enso-api/model/ensoFeeArgsDtoAmount.ts +16 -0
- package/src/enso-api/model/feeActionDto.ts +17 -0
- package/src/enso-api/model/feeArgsDto.ts +22 -0
- package/src/enso-api/model/feeArgsDtoAmount.ts +16 -0
- package/src/enso-api/model/harvestActionDto.ts +19 -0
- package/src/enso-api/model/harvestArgsDto.ts +17 -0
- package/src/enso-api/model/index.ts +115 -4
- package/src/enso-api/model/mergeActionDto.ts +17 -0
- package/src/enso-api/model/mergeArgsDto.ts +22 -0
- package/src/enso-api/model/mergeArgsDtoAmountInItem.ts +13 -0
- package/src/enso-api/model/minAmountOutActionDto.ts +17 -0
- package/src/enso-api/model/minAmountOutArgsDto.ts +19 -0
- package/src/enso-api/model/minAmountOutArgsDtoAmountOut.ts +16 -0
- package/src/enso-api/model/minAmountOutArgsDtoMinAmountOut.ts +16 -0
- package/src/enso-api/model/multiDepositActionDto.ts +18 -0
- package/src/enso-api/model/multiDepositArgsDto.ts +24 -0
- package/src/enso-api/model/multiDepositArgsDtoAmountInItem.ts +17 -0
- package/src/enso-api/model/multiDepositArgsDtoAmountInItemAnyOf.ts +12 -0
- package/src/enso-api/model/multiOutSingleDepositActionDto.ts +18 -0
- package/src/enso-api/model/multiOutSingleDepositArgsDto.ts +24 -0
- package/src/enso-api/model/multiOutSingleDepositArgsDtoAmountIn.ts +16 -0
- package/src/enso-api/model/multiRedeemActionDto.ts +18 -0
- package/src/enso-api/model/multiRedeemArgs2Dto.ts +24 -0
- package/src/enso-api/model/multiRedeemArgs2DtoAmountIn.ts +16 -0
- package/src/enso-api/model/nontokenizedControllerRouteNontokenizedShorcutTransactionParams.ts +8 -0
- package/src/enso-api/model/nontokenizedControllerRouteNontokenizedShorcutTransactionRoutingStrategy.ts +1 -0
- package/src/enso-api/model/nontokenizedRouteShortcutTransaction.ts +31 -0
- package/src/enso-api/model/paymasterFeeActionDto.ts +17 -0
- package/src/enso-api/model/paymasterFeeArgsDto.ts +18 -0
- package/src/enso-api/model/paymasterFeeArgsDtoAmount.ts +16 -0
- package/src/enso-api/model/permitTransferFromActionDto.ts +18 -0
- package/src/enso-api/model/permitTransferFromArgsDto.ts +29 -0
- package/src/enso-api/model/permitTransferFromArgsDtoAmount.ts +20 -0
- package/src/enso-api/model/permitTransferFromArgsDtoAmountOneOfItem.ts +13 -0
- package/src/enso-api/model/permitTransferFromArgsDtoToken.ts +15 -0
- package/src/enso-api/model/positionModel.ts +14 -0
- package/src/enso-api/model/redeemActionDto.ts +18 -0
- package/src/enso-api/model/redeemArgsDto.ts +25 -0
- package/src/enso-api/model/redeemArgsDtoAmountIn.ts +16 -0
- package/src/enso-api/model/redeemArgsDtoTokenOut.ts +15 -0
- package/src/enso-api/model/redeemCLMMActionDto.ts +18 -0
- package/src/enso-api/model/redeemCLMMArgsDto.ts +24 -0
- package/src/enso-api/model/redeemCLMMArgsDtoLiquidity.ts +16 -0
- package/src/enso-api/model/repayActionDto.ts +18 -0
- package/src/enso-api/model/repayArgsDto.ts +22 -0
- package/src/enso-api/model/repayArgsDtoAmountIn.ts +16 -0
- package/src/enso-api/model/routeActionDto.ts +20 -0
- package/src/enso-api/model/routeArgsDto.ts +38 -0
- package/src/enso-api/model/routeArgsDtoAmountIn.ts +16 -0
- package/src/enso-api/model/singleDepositActionDto.ts +18 -0
- package/src/enso-api/model/singleDepositArgsDto.ts +24 -0
- package/src/enso-api/model/singleDepositArgsDtoAmountIn.ts +16 -0
- package/src/enso-api/model/singleRedeemActionDto.ts +18 -0
- package/src/enso-api/model/singleRedeemArgs2Dto.ts +24 -0
- package/src/enso-api/model/singleRedeemArgs2DtoAmountIn.ts +16 -0
- package/src/enso-api/model/slippageActionDto.ts +17 -0
- package/src/enso-api/model/slippageArgsDto.ts +18 -0
- package/src/enso-api/model/slippageArgsDtoAmountOut.ts +16 -0
- package/src/enso-api/model/splitActionDto.ts +17 -0
- package/src/enso-api/model/splitArgsDto.ts +22 -0
- package/src/enso-api/model/splitArgsDtoAmountIn.ts +16 -0
- package/src/enso-api/model/swapActionDto.ts +18 -0
- package/src/enso-api/model/swapArgsDto.ts +30 -0
- package/src/enso-api/model/swapArgsDtoAmountIn.ts +16 -0
- package/src/enso-api/model/tokenizedMultiDepositActionDto.ts +18 -0
- package/src/enso-api/model/tokenizedMultiDepositArgsDto.ts +24 -0
- package/src/enso-api/model/tokenizedMultiDepositArgsDtoAmountInItem.ts +17 -0
- package/src/enso-api/model/tokenizedMultiDepositArgsDtoAmountInItemAnyOf.ts +14 -0
- package/src/enso-api/model/tokenizedMultiRedeemActionDto.ts +18 -0
- package/src/enso-api/model/tokenizedMultiRedeemArgsDto.ts +24 -0
- package/src/enso-api/model/tokenizedMultiRedeemArgsDtoAmountIn.ts +16 -0
- package/src/enso-api/model/tokenizedSingleDepositActionDto.ts +18 -0
- package/src/enso-api/model/tokenizedSingleDepositArgsDto.ts +24 -0
- package/src/enso-api/model/tokenizedSingleDepositArgsDtoAmountIn.ts +16 -0
- package/src/enso-api/model/tokenizedSingleRedeemActionDto.ts +18 -0
- package/src/enso-api/model/tokenizedSingleRedeemArgsDto.ts +24 -0
- package/src/enso-api/model/tokenizedSingleRedeemArgsDtoAmountIn.ts +16 -0
- package/src/enso-api/model/tokensControllerTokensLiquidityType.ts +19 -0
- package/src/enso-api/model/tokensControllerTokensParams.ts +6 -0
- package/src/enso-api/model/transferActionDto.ts +18 -0
- package/src/enso-api/model/transferArgsDto.ts +22 -0
- package/src/enso-api/model/transferArgsDtoAmount.ts +16 -0
- package/src/enso-api/model/transferFromActionDto.ts +18 -0
- package/src/enso-api/model/transferFromArgsDto.ts +24 -0
- package/src/enso-api/model/transferFromArgsDtoAmount.ts +16 -0
- package/src/index.ts +1 -0
- package/src/store.ts +12 -5
- package/src/types/index.ts +9 -3
- package/src/util/common.tsx +2 -0
- package/src/util/enso-hooks.tsx +72 -11
package/dist/index.d.ts
CHANGED
|
@@ -16,6 +16,13 @@ export declare const CheckoutModal: ({ config, setIsActive, isActive, onClose, }
|
|
|
16
16
|
|
|
17
17
|
export { CheckoutModalProps }
|
|
18
18
|
|
|
19
|
+
export declare enum SupportedExchanges {
|
|
20
|
+
Binance = "binance",
|
|
21
|
+
Kraken = "kraken",
|
|
22
|
+
Coinbase = "coinbase",
|
|
23
|
+
Bybit = "bybit"
|
|
24
|
+
}
|
|
25
|
+
|
|
19
26
|
export { WidgetTheme }
|
|
20
27
|
|
|
21
28
|
export { }
|
package/orval.config.ts
CHANGED
|
@@ -8,11 +8,9 @@ export default {
|
|
|
8
8
|
schemas: "src/enso-api/model",
|
|
9
9
|
client: "react-query",
|
|
10
10
|
override: {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
retry: 2,
|
|
15
|
-
},
|
|
11
|
+
queryOptions: {
|
|
12
|
+
refetchInterval: 30_000,
|
|
13
|
+
retry: 2,
|
|
16
14
|
},
|
|
17
15
|
mutator: {
|
|
18
16
|
path: "./src/enso-api/custom-instance.ts",
|
|
@@ -20,6 +18,42 @@ export default {
|
|
|
20
18
|
},
|
|
21
19
|
},
|
|
22
20
|
},
|
|
23
|
-
input:
|
|
21
|
+
input: {
|
|
22
|
+
target: "https://api.enso.finance/api-yaml",
|
|
23
|
+
override: {
|
|
24
|
+
transformer: (spec: any) => {
|
|
25
|
+
// Fix all malformed array schemas that have items: { type: 'array' } without proper definition
|
|
26
|
+
const fixArraySchema = (obj: any) => {
|
|
27
|
+
if (!obj || typeof obj !== 'object') return;
|
|
28
|
+
|
|
29
|
+
// Fix array items that are themselves arrays without proper items definition
|
|
30
|
+
if (obj.type === 'array' && obj.items?.type === 'array' && !obj.items.items) {
|
|
31
|
+
obj.items = {
|
|
32
|
+
anyOf: [
|
|
33
|
+
{ type: 'string' },
|
|
34
|
+
{ type: 'number' },
|
|
35
|
+
{ type: 'boolean' },
|
|
36
|
+
{ type: 'object' },
|
|
37
|
+
]
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
// Recursively fix nested objects
|
|
42
|
+
for (const key in obj) {
|
|
43
|
+
if (obj.hasOwnProperty(key)) {
|
|
44
|
+
fixArraySchema(obj[key]);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
// Apply fix to all schemas
|
|
50
|
+
if (spec.components?.schemas) {
|
|
51
|
+
fixArraySchema(spec.components.schemas);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
return spec;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
},
|
|
24
58
|
},
|
|
25
59
|
};
|
package/package.json
CHANGED
|
@@ -13,7 +13,7 @@ import { Fuel } from "lucide-react";
|
|
|
13
13
|
import { Tooltip } from "./ui/tooltip";
|
|
14
14
|
|
|
15
15
|
const BridgingFee = () => {
|
|
16
|
-
const {
|
|
16
|
+
const { routeData } = useRouteData();
|
|
17
17
|
const { tokenIn, chainIdIn, amountIn } = useAppDetails();
|
|
18
18
|
const { data: nativeTokenPriceData } = useEnsoPrice(chainIdIn, ETH_ADDRESS);
|
|
19
19
|
const {
|
|
@@ -21,14 +21,14 @@ const BridgingFee = () => {
|
|
|
21
21
|
} = useEnsoToken(ETH_ADDRESS, chainIdIn);
|
|
22
22
|
|
|
23
23
|
const gasValue = useMemo(() => {
|
|
24
|
-
let txCost = +(
|
|
24
|
+
let txCost = +(routeData?.tx?.value ?? 0);
|
|
25
25
|
|
|
26
26
|
if (compareCaseInsensitive(tokenIn, ETH_ADDRESS)) {
|
|
27
27
|
txCost -= +amountIn;
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
return normalizeValue(Math.max(0, txCost).toString(), 18);
|
|
31
|
-
}, [
|
|
31
|
+
}, [routeData?.tx?.value, tokenIn, amountIn]);
|
|
32
32
|
|
|
33
33
|
const gasCostUSD = +gasValue * +(nativeTokenPriceData ?? 0);
|
|
34
34
|
|
|
@@ -9,7 +9,7 @@ import { type CheckoutConfig, type SupportedExchanges } from "@/types";
|
|
|
9
9
|
type ICheckoutContext = {
|
|
10
10
|
handleClose: () => void;
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
enableExchange?: SupportedExchanges[];
|
|
13
13
|
};
|
|
14
14
|
|
|
15
15
|
const CheckoutContext = createContext<ICheckoutContext>({} as ICheckoutContext);
|
|
@@ -64,7 +64,7 @@ const Checkout = ({
|
|
|
64
64
|
<CheckoutContext.Provider
|
|
65
65
|
value={{
|
|
66
66
|
handleClose,
|
|
67
|
-
|
|
67
|
+
enableExchange,
|
|
68
68
|
}}
|
|
69
69
|
>
|
|
70
70
|
<ChakraProvider themeConfig={theme}>
|
|
@@ -45,11 +45,24 @@ const SecurityFeature = ({
|
|
|
45
45
|
</Box>
|
|
46
46
|
);
|
|
47
47
|
|
|
48
|
-
const ConfirmExchangeStep = ({
|
|
48
|
+
const ConfirmExchangeStep = ({
|
|
49
|
+
onConfirm,
|
|
50
|
+
exchangeName = "your exchange",
|
|
51
|
+
exchangeIcon,
|
|
52
|
+
}: {
|
|
53
|
+
onConfirm: () => void;
|
|
54
|
+
exchangeName?: string;
|
|
55
|
+
exchangeIcon?: string;
|
|
56
|
+
}) => {
|
|
49
57
|
return (
|
|
50
58
|
<BodyWrapper>
|
|
51
59
|
<Box display="flex" justifyContent="center" width="100%">
|
|
52
|
-
<Image
|
|
60
|
+
<Image
|
|
61
|
+
w={"48px"}
|
|
62
|
+
h={"48px"}
|
|
63
|
+
borderRadius={"full"}
|
|
64
|
+
src={exchangeIcon || BinanceIcon}
|
|
65
|
+
/>
|
|
53
66
|
</Box>
|
|
54
67
|
|
|
55
68
|
<Box
|
|
@@ -59,7 +72,7 @@ const ConfirmExchangeStep = ({ onConfirm }: { onConfirm: () => void }) => {
|
|
|
59
72
|
color="fg"
|
|
60
73
|
textAlign="center"
|
|
61
74
|
>
|
|
62
|
-
Enso Checkout uses a 3rd party to connect your
|
|
75
|
+
Enso Checkout uses a 3rd party to connect your {exchangeName} account.
|
|
63
76
|
</Box>
|
|
64
77
|
|
|
65
78
|
<Box display="flex" flexDirection="column" gap="12px" width="100%">
|
|
@@ -24,11 +24,8 @@ import {
|
|
|
24
24
|
STARGATE_CHAIN_NAMES,
|
|
25
25
|
SupportedChainId,
|
|
26
26
|
} from "@/util/constants";
|
|
27
|
-
import { useAppStore } from "@/store";
|
|
28
|
-
// @ts-ignore
|
|
29
|
-
import BinanceBadge from "../assets/BinanceBadge.svg";
|
|
30
27
|
import { useMemo } from "react";
|
|
31
|
-
import {
|
|
28
|
+
import { EXCHANGE_ICON_BY_TYPE } from "@/components/steps/ExchangeFlow";
|
|
32
29
|
|
|
33
30
|
export const ERROR_MSG =
|
|
34
31
|
"Swap not found for a required underlying of defi route, please make sure your amount is within an acceptable range";
|
|
@@ -101,11 +98,16 @@ const TokenIcon = ({
|
|
|
101
98
|
const QuoteParameters = () => {
|
|
102
99
|
const { address } = useAccount();
|
|
103
100
|
const { walletIcon, walletDisplayName } = useWalletIcon();
|
|
104
|
-
const {
|
|
105
|
-
|
|
101
|
+
const {
|
|
102
|
+
chainIdOut,
|
|
103
|
+
effectiveTokenOutData,
|
|
104
|
+
tokenInData,
|
|
105
|
+
amountIn,
|
|
106
|
+
chainIdIn,
|
|
107
|
+
selectedIntegration,
|
|
108
|
+
} = useAppDetails();
|
|
106
109
|
const { routeLoading, routeData, routeFetched, routerError } =
|
|
107
110
|
useRouteData();
|
|
108
|
-
const { activeExchange } = useAppStore();
|
|
109
111
|
const showRouteLoading = routeLoading || (!routeFetched && !routerError);
|
|
110
112
|
|
|
111
113
|
const routeErrorMessage: string | null =
|
|
@@ -126,16 +128,23 @@ const QuoteParameters = () => {
|
|
|
126
128
|
});
|
|
127
129
|
|
|
128
130
|
const sourceInfo = useMemo(() => {
|
|
129
|
-
if (
|
|
131
|
+
if (selectedIntegration?.type) {
|
|
132
|
+
const icon = EXCHANGE_ICON_BY_TYPE[selectedIntegration.type];
|
|
133
|
+
const name = selectedIntegration.name || selectedIntegration.type;
|
|
130
134
|
return (
|
|
131
135
|
<>
|
|
132
|
-
|
|
133
|
-
|
|
136
|
+
{icon && (
|
|
137
|
+
<Image
|
|
138
|
+
src={icon}
|
|
139
|
+
width={"16px"}
|
|
140
|
+
height={"16px"}
|
|
141
|
+
borderRadius={"full"}
|
|
142
|
+
/>
|
|
143
|
+
)}
|
|
144
|
+
<Text>{name}</Text>
|
|
134
145
|
</>
|
|
135
146
|
);
|
|
136
|
-
|
|
137
|
-
if (activeExchange === ExchangeType.delayed)
|
|
138
|
-
return <Text>{ExchangeNames[ExchangeType.delayed]}</Text>;
|
|
147
|
+
}
|
|
139
148
|
|
|
140
149
|
return (
|
|
141
150
|
<>
|
|
@@ -164,7 +173,13 @@ const QuoteParameters = () => {
|
|
|
164
173
|
)}
|
|
165
174
|
</>
|
|
166
175
|
);
|
|
167
|
-
}, [
|
|
176
|
+
}, [
|
|
177
|
+
selectedIntegration,
|
|
178
|
+
walletIcon,
|
|
179
|
+
walletDisplayName,
|
|
180
|
+
address,
|
|
181
|
+
inWalletUrl,
|
|
182
|
+
]);
|
|
168
183
|
|
|
169
184
|
return (
|
|
170
185
|
<>
|
|
@@ -247,7 +262,7 @@ const QuoteParameters = () => {
|
|
|
247
262
|
width={showRouteLoading ? "80px" : "auto"}
|
|
248
263
|
>
|
|
249
264
|
<Text>
|
|
250
|
-
{
|
|
265
|
+
{selectedIntegration?.type
|
|
251
266
|
? `~2min`
|
|
252
267
|
: chainIdIn !== chainIdOut
|
|
253
268
|
? `~1 min`
|
|
@@ -321,13 +336,13 @@ const QuoteParameters = () => {
|
|
|
321
336
|
{formatNumber(
|
|
322
337
|
normalizeValue(
|
|
323
338
|
routeData?.amountOut,
|
|
324
|
-
|
|
339
|
+
effectiveTokenOutData?.decimals,
|
|
325
340
|
),
|
|
326
341
|
)}{" "}
|
|
327
|
-
{
|
|
342
|
+
{effectiveTokenOutData?.symbol}
|
|
328
343
|
</Text>
|
|
329
344
|
<TokenIcon
|
|
330
|
-
token={
|
|
345
|
+
token={effectiveTokenOutData}
|
|
331
346
|
chainId={chainIdOut}
|
|
332
347
|
size={24}
|
|
333
348
|
/>
|
|
@@ -19,13 +19,14 @@ export const DetailRowContainer = chakra("div", {
|
|
|
19
19
|
});
|
|
20
20
|
|
|
21
21
|
export const TransactionDetailRow = () => {
|
|
22
|
-
const {
|
|
23
|
-
const { chainIdIn, chainIdOut,
|
|
22
|
+
const { routeData } = useRouteData();
|
|
23
|
+
const { chainIdIn, chainIdOut, selectedIntegration } = useAppDetails();
|
|
24
|
+
|
|
24
25
|
const slippage = useAppStore((state) => state.slippage);
|
|
25
26
|
const [isExpanded, setIsExpanded] = useState(false);
|
|
26
27
|
|
|
27
|
-
const formattedPriceImpact =
|
|
28
|
-
? (-
|
|
28
|
+
const formattedPriceImpact = routeData?.priceImpact
|
|
29
|
+
? (-routeData?.priceImpact / 100).toFixed(2)
|
|
29
30
|
: "0.00";
|
|
30
31
|
|
|
31
32
|
const detailItems = [
|
|
@@ -38,7 +39,7 @@ export const TransactionDetailRow = () => {
|
|
|
38
39
|
label: "Max. slippage",
|
|
39
40
|
},
|
|
40
41
|
{
|
|
41
|
-
detail:
|
|
42
|
+
detail: selectedIntegration?.type
|
|
42
43
|
? `~2min`
|
|
43
44
|
: chainIdIn !== chainIdOut
|
|
44
45
|
? `~1 min`
|
|
@@ -80,13 +80,13 @@ const AssetCard = ({
|
|
|
80
80
|
}: {
|
|
81
81
|
icon?: ReactElement | string;
|
|
82
82
|
title: string;
|
|
83
|
-
balance
|
|
83
|
+
balance?: string | number;
|
|
84
84
|
usdBalance: string;
|
|
85
85
|
tag: string;
|
|
86
86
|
loading: boolean;
|
|
87
87
|
selected: boolean;
|
|
88
88
|
onClick: () => void;
|
|
89
|
-
chainId
|
|
89
|
+
chainId?: number;
|
|
90
90
|
}) => {
|
|
91
91
|
return (
|
|
92
92
|
<Card
|