@spicenet-io/spiceflow-ui 1.9.2 → 1.9.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/dist/components/DepositWidget/AssetInput.d.ts +23 -0
- package/dist/components/DepositWidget/index.d.ts +2 -0
- package/dist/index.cjs.js +353 -231
- package/dist/index.js +353 -231
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4129,11 +4129,13 @@ const DepositStatusPanel = ({
|
|
|
4129
4129
|
border: `1px solid ${theme.colors.border}`,
|
|
4130
4130
|
borderRadius: theme.borderRadius.lg,
|
|
4131
4131
|
padding: theme.spacing.lg,
|
|
4132
|
-
color: theme.colors.text
|
|
4132
|
+
color: theme.colors.text,
|
|
4133
|
+
overflow: "visible"
|
|
4133
4134
|
};
|
|
4134
4135
|
const headerStyles = {
|
|
4135
4136
|
textAlign: "center",
|
|
4136
|
-
marginBottom: theme.spacing.lg
|
|
4137
|
+
marginBottom: theme.spacing.lg,
|
|
4138
|
+
overflow: "visible"
|
|
4137
4139
|
};
|
|
4138
4140
|
const iconContainerStyles = {
|
|
4139
4141
|
width: "5rem",
|
|
@@ -4155,7 +4157,10 @@ const DepositStatusPanel = ({
|
|
|
4155
4157
|
};
|
|
4156
4158
|
const descriptionStyles = {
|
|
4157
4159
|
fontSize: theme.typography.fontSize.sm,
|
|
4158
|
-
color: theme.colors.textMuted
|
|
4160
|
+
color: theme.colors.textMuted,
|
|
4161
|
+
wordWrap: "break-word",
|
|
4162
|
+
overflowWrap: "break-word",
|
|
4163
|
+
whiteSpace: "normal"
|
|
4159
4164
|
};
|
|
4160
4165
|
const buttonContainerStyles = {
|
|
4161
4166
|
display: "flex",
|
|
@@ -4309,11 +4314,80 @@ const DepositStatusPanel = ({
|
|
|
4309
4314
|
fullWidth: true,
|
|
4310
4315
|
onClick: onNewDeposit,
|
|
4311
4316
|
theme,
|
|
4317
|
+
style: {
|
|
4318
|
+
width: "100%",
|
|
4319
|
+
padding: "16px",
|
|
4320
|
+
backgroundColor: "#ea4b4b",
|
|
4321
|
+
color: "#0e0d0b",
|
|
4322
|
+
border: "1px solid #0e0d0b",
|
|
4323
|
+
fontWeight: 500,
|
|
4324
|
+
fontSize: "18px",
|
|
4325
|
+
textTransform: "uppercase",
|
|
4326
|
+
cursor: "pointer",
|
|
4327
|
+
marginTop: "20px",
|
|
4328
|
+
display: "flex",
|
|
4329
|
+
alignItems: "center",
|
|
4330
|
+
justifyContent: "center",
|
|
4331
|
+
gap: "8px",
|
|
4332
|
+
transition: "all 150ms ease"
|
|
4333
|
+
},
|
|
4312
4334
|
children: "New Deposit"
|
|
4313
4335
|
}
|
|
4314
4336
|
),
|
|
4315
|
-
intentStatus.overallStatus === "failed" && onRetry && /* @__PURE__ */ jsx(
|
|
4316
|
-
|
|
4337
|
+
intentStatus.overallStatus === "failed" && onRetry && /* @__PURE__ */ jsx(
|
|
4338
|
+
Button,
|
|
4339
|
+
{
|
|
4340
|
+
variant: "error",
|
|
4341
|
+
fullWidth: true,
|
|
4342
|
+
onClick: onRetry,
|
|
4343
|
+
theme,
|
|
4344
|
+
style: {
|
|
4345
|
+
width: "100%",
|
|
4346
|
+
padding: "16px",
|
|
4347
|
+
backgroundColor: "#ea4b4b",
|
|
4348
|
+
color: "#0e0d0b",
|
|
4349
|
+
border: "1px solid #0e0d0b",
|
|
4350
|
+
fontWeight: 500,
|
|
4351
|
+
fontSize: "18px",
|
|
4352
|
+
textTransform: "uppercase",
|
|
4353
|
+
cursor: "pointer",
|
|
4354
|
+
marginTop: "20px",
|
|
4355
|
+
display: "flex",
|
|
4356
|
+
alignItems: "center",
|
|
4357
|
+
justifyContent: "center",
|
|
4358
|
+
gap: "8px",
|
|
4359
|
+
transition: "all 150ms ease"
|
|
4360
|
+
},
|
|
4361
|
+
children: "Try Again"
|
|
4362
|
+
}
|
|
4363
|
+
),
|
|
4364
|
+
intentStatus.overallStatus === "processing" && /* @__PURE__ */ jsx(
|
|
4365
|
+
Button,
|
|
4366
|
+
{
|
|
4367
|
+
variant: "ghost",
|
|
4368
|
+
fullWidth: true,
|
|
4369
|
+
onClick: onClose,
|
|
4370
|
+
theme,
|
|
4371
|
+
style: {
|
|
4372
|
+
width: "100%",
|
|
4373
|
+
padding: "16px",
|
|
4374
|
+
backgroundColor: "#ea4b4b",
|
|
4375
|
+
color: "#0e0d0b",
|
|
4376
|
+
border: "1px solid #0e0d0b",
|
|
4377
|
+
fontWeight: 500,
|
|
4378
|
+
fontSize: "18px",
|
|
4379
|
+
textTransform: "uppercase",
|
|
4380
|
+
cursor: "pointer",
|
|
4381
|
+
marginTop: "20px",
|
|
4382
|
+
display: "flex",
|
|
4383
|
+
alignItems: "center",
|
|
4384
|
+
justifyContent: "center",
|
|
4385
|
+
gap: "8px",
|
|
4386
|
+
transition: "all 150ms ease"
|
|
4387
|
+
},
|
|
4388
|
+
children: "Cancel"
|
|
4389
|
+
}
|
|
4390
|
+
)
|
|
4317
4391
|
] })
|
|
4318
4392
|
] });
|
|
4319
4393
|
};
|
|
@@ -5082,6 +5156,243 @@ const DepositWidgetModal = ({
|
|
|
5082
5156
|
);
|
|
5083
5157
|
};
|
|
5084
5158
|
|
|
5159
|
+
const AssetInput = ({
|
|
5160
|
+
asset,
|
|
5161
|
+
amount,
|
|
5162
|
+
onAmountChange,
|
|
5163
|
+
onPercentageClick,
|
|
5164
|
+
usdValue,
|
|
5165
|
+
disabled,
|
|
5166
|
+
styles,
|
|
5167
|
+
theme
|
|
5168
|
+
}) => {
|
|
5169
|
+
const balance = asset.balanceFormatted ?? 0;
|
|
5170
|
+
const numericAmount = parseFloat(amount) || 0;
|
|
5171
|
+
const currentPercentage = balance > 0 ? numericAmount / balance * 100 : 0;
|
|
5172
|
+
const handleInputChange = (e) => {
|
|
5173
|
+
const value = e.target.value;
|
|
5174
|
+
if (value === "" || /^\d*\.?\d*$/.test(value)) {
|
|
5175
|
+
onAmountChange(value);
|
|
5176
|
+
}
|
|
5177
|
+
};
|
|
5178
|
+
return /* @__PURE__ */ jsx(
|
|
5179
|
+
"div",
|
|
5180
|
+
{
|
|
5181
|
+
style: {
|
|
5182
|
+
backgroundColor: "#e9e9e9",
|
|
5183
|
+
border: "0.5px solid #a8a8a7",
|
|
5184
|
+
borderRadius: "6px",
|
|
5185
|
+
padding: "16px",
|
|
5186
|
+
height: "144px",
|
|
5187
|
+
display: "flex",
|
|
5188
|
+
flexDirection: "column",
|
|
5189
|
+
gap: "8px",
|
|
5190
|
+
position: "relative"
|
|
5191
|
+
},
|
|
5192
|
+
children: /* @__PURE__ */ jsxs(
|
|
5193
|
+
"div",
|
|
5194
|
+
{
|
|
5195
|
+
style: {
|
|
5196
|
+
flex: 1,
|
|
5197
|
+
display: "flex",
|
|
5198
|
+
alignItems: "center",
|
|
5199
|
+
justifyContent: "space-between"
|
|
5200
|
+
},
|
|
5201
|
+
children: [
|
|
5202
|
+
/* @__PURE__ */ jsx(
|
|
5203
|
+
"div",
|
|
5204
|
+
{
|
|
5205
|
+
style: {
|
|
5206
|
+
display: "flex",
|
|
5207
|
+
flexDirection: "column",
|
|
5208
|
+
justifyContent: "space-between",
|
|
5209
|
+
height: "100%"
|
|
5210
|
+
},
|
|
5211
|
+
children: /* @__PURE__ */ jsxs("div", { style: { display: "flex", flexDirection: "column", gap: "8px" }, children: [
|
|
5212
|
+
/* @__PURE__ */ jsx(
|
|
5213
|
+
"span",
|
|
5214
|
+
{
|
|
5215
|
+
style: {
|
|
5216
|
+
fontFamily: styles?.fontFamily || theme.typography.fontFamily,
|
|
5217
|
+
fontSize: "16px",
|
|
5218
|
+
fontWeight: 500,
|
|
5219
|
+
color: "#7d7c7b",
|
|
5220
|
+
lineHeight: "24px"
|
|
5221
|
+
},
|
|
5222
|
+
children: "Amount"
|
|
5223
|
+
}
|
|
5224
|
+
),
|
|
5225
|
+
/* @__PURE__ */ jsx(
|
|
5226
|
+
"input",
|
|
5227
|
+
{
|
|
5228
|
+
type: "text",
|
|
5229
|
+
value: amount,
|
|
5230
|
+
onChange: handleInputChange,
|
|
5231
|
+
placeholder: "0.00",
|
|
5232
|
+
disabled,
|
|
5233
|
+
style: {
|
|
5234
|
+
fontFamily: styles?.fontFamily || theme.typography.fontFamily,
|
|
5235
|
+
fontSize: "40px",
|
|
5236
|
+
fontWeight: 700,
|
|
5237
|
+
color: disabled ? "rgba(14, 13, 11, 0.16)" : amount ? "#0e0d0b" : "#d1d5db",
|
|
5238
|
+
lineHeight: "1.08",
|
|
5239
|
+
letterSpacing: "-1.2px",
|
|
5240
|
+
backgroundColor: "transparent",
|
|
5241
|
+
border: "none",
|
|
5242
|
+
outline: "none",
|
|
5243
|
+
padding: 0,
|
|
5244
|
+
width: "100%",
|
|
5245
|
+
maxWidth: "200px"
|
|
5246
|
+
}
|
|
5247
|
+
}
|
|
5248
|
+
)
|
|
5249
|
+
] })
|
|
5250
|
+
}
|
|
5251
|
+
),
|
|
5252
|
+
/* @__PURE__ */ jsxs(
|
|
5253
|
+
"div",
|
|
5254
|
+
{
|
|
5255
|
+
style: {
|
|
5256
|
+
display: "flex",
|
|
5257
|
+
flexDirection: "column",
|
|
5258
|
+
alignItems: "flex-end",
|
|
5259
|
+
justifyContent: "space-between",
|
|
5260
|
+
height: "100%",
|
|
5261
|
+
gap: "12px"
|
|
5262
|
+
},
|
|
5263
|
+
children: [
|
|
5264
|
+
/* @__PURE__ */ jsxs(
|
|
5265
|
+
"div",
|
|
5266
|
+
{
|
|
5267
|
+
style: {
|
|
5268
|
+
display: "flex",
|
|
5269
|
+
flexDirection: "column",
|
|
5270
|
+
gap: "8px",
|
|
5271
|
+
alignItems: "flex-end"
|
|
5272
|
+
},
|
|
5273
|
+
children: [
|
|
5274
|
+
/* @__PURE__ */ jsxs(
|
|
5275
|
+
"span",
|
|
5276
|
+
{
|
|
5277
|
+
style: {
|
|
5278
|
+
fontFamily: styles?.fontFamily || theme.typography.fontFamily,
|
|
5279
|
+
fontSize: "12px",
|
|
5280
|
+
fontWeight: 500,
|
|
5281
|
+
color: "#71757a",
|
|
5282
|
+
lineHeight: "16px"
|
|
5283
|
+
},
|
|
5284
|
+
children: [
|
|
5285
|
+
"Balance: ",
|
|
5286
|
+
balance.toFixed(4)
|
|
5287
|
+
]
|
|
5288
|
+
}
|
|
5289
|
+
),
|
|
5290
|
+
/* @__PURE__ */ jsx("div", { style: { width: "128px" }, children: /* @__PURE__ */ jsxs(
|
|
5291
|
+
"div",
|
|
5292
|
+
{
|
|
5293
|
+
style: {
|
|
5294
|
+
border: "1px solid #CDCFD1",
|
|
5295
|
+
borderRadius: "6px 6px 6px 6px",
|
|
5296
|
+
backgroundColor: "#ffffff",
|
|
5297
|
+
padding: "8px 12px 8px 8px",
|
|
5298
|
+
display: "flex",
|
|
5299
|
+
alignItems: "center",
|
|
5300
|
+
gap: "8px"
|
|
5301
|
+
},
|
|
5302
|
+
children: [
|
|
5303
|
+
/* @__PURE__ */ jsx(
|
|
5304
|
+
TokenIcon,
|
|
5305
|
+
{
|
|
5306
|
+
symbol: asset.symbol,
|
|
5307
|
+
logoURI: asset.logoURI,
|
|
5308
|
+
size: 30,
|
|
5309
|
+
theme
|
|
5310
|
+
}
|
|
5311
|
+
),
|
|
5312
|
+
/* @__PURE__ */ jsx(
|
|
5313
|
+
"span",
|
|
5314
|
+
{
|
|
5315
|
+
style: {
|
|
5316
|
+
fontFamily: styles?.fontFamily || theme.typography.fontFamily,
|
|
5317
|
+
fontSize: "16px",
|
|
5318
|
+
fontWeight: 500,
|
|
5319
|
+
color: "#3c3e42",
|
|
5320
|
+
lineHeight: "1.5"
|
|
5321
|
+
},
|
|
5322
|
+
children: asset.symbol
|
|
5323
|
+
}
|
|
5324
|
+
)
|
|
5325
|
+
]
|
|
5326
|
+
}
|
|
5327
|
+
) })
|
|
5328
|
+
]
|
|
5329
|
+
}
|
|
5330
|
+
),
|
|
5331
|
+
/* @__PURE__ */ jsx(
|
|
5332
|
+
"div",
|
|
5333
|
+
{
|
|
5334
|
+
style: {
|
|
5335
|
+
display: "flex",
|
|
5336
|
+
gap: "10px",
|
|
5337
|
+
height: "14px",
|
|
5338
|
+
alignItems: "center",
|
|
5339
|
+
justifyContent: "flex-end"
|
|
5340
|
+
},
|
|
5341
|
+
children: [0, 25, 50, 75, 100].map((pct, index) => {
|
|
5342
|
+
const isActive = Math.abs(currentPercentage - pct) < 1;
|
|
5343
|
+
const isLast = index === 4;
|
|
5344
|
+
const fillPercent = pct / 100;
|
|
5345
|
+
return /* @__PURE__ */ jsx(
|
|
5346
|
+
"button",
|
|
5347
|
+
{
|
|
5348
|
+
onClick: () => onPercentageClick(pct),
|
|
5349
|
+
disabled,
|
|
5350
|
+
title: `${pct}%`,
|
|
5351
|
+
style: {
|
|
5352
|
+
width: "14px",
|
|
5353
|
+
height: "14px",
|
|
5354
|
+
padding: 0,
|
|
5355
|
+
border: "none",
|
|
5356
|
+
backgroundColor: "transparent",
|
|
5357
|
+
cursor: disabled ? "not-allowed" : "pointer",
|
|
5358
|
+
opacity: isActive ? 1 : 0.5
|
|
5359
|
+
},
|
|
5360
|
+
children: /* @__PURE__ */ jsxs("svg", { width: "14", height: "14", viewBox: "0 0 14 14", children: [
|
|
5361
|
+
/* @__PURE__ */ jsx(
|
|
5362
|
+
"circle",
|
|
5363
|
+
{
|
|
5364
|
+
cx: "7",
|
|
5365
|
+
cy: "7",
|
|
5366
|
+
r: "6.84375",
|
|
5367
|
+
fill: isLast ? "#ea4b4b" : "none",
|
|
5368
|
+
stroke: isLast ? "#ea4b4b" : "#3C3E42",
|
|
5369
|
+
strokeWidth: "0.3125"
|
|
5370
|
+
}
|
|
5371
|
+
),
|
|
5372
|
+
!isLast && fillPercent > 0 && /* @__PURE__ */ jsx(
|
|
5373
|
+
"path",
|
|
5374
|
+
{
|
|
5375
|
+
d: `M 7 7 L 7 0.15625 A 6.84375 6.84375 0 ${fillPercent > 0.5 ? 1 : 0} 1 ${7 + 6.84375 * Math.sin(fillPercent * 2 * Math.PI)} ${7 - 6.84375 * Math.cos(fillPercent * 2 * Math.PI)} Z`,
|
|
5376
|
+
fill: "#3C3E42"
|
|
5377
|
+
}
|
|
5378
|
+
)
|
|
5379
|
+
] })
|
|
5380
|
+
},
|
|
5381
|
+
pct
|
|
5382
|
+
);
|
|
5383
|
+
})
|
|
5384
|
+
}
|
|
5385
|
+
)
|
|
5386
|
+
]
|
|
5387
|
+
}
|
|
5388
|
+
)
|
|
5389
|
+
]
|
|
5390
|
+
}
|
|
5391
|
+
)
|
|
5392
|
+
}
|
|
5393
|
+
);
|
|
5394
|
+
};
|
|
5395
|
+
|
|
5085
5396
|
const CrossChainDepositModal = ({
|
|
5086
5397
|
isOpen,
|
|
5087
5398
|
onClose,
|
|
@@ -5295,12 +5606,12 @@ const CrossChainDepositModal = ({
|
|
|
5295
5606
|
style: {
|
|
5296
5607
|
display: "flex",
|
|
5297
5608
|
alignItems: "flex-start",
|
|
5298
|
-
gap: "
|
|
5609
|
+
gap: "5px",
|
|
5299
5610
|
backgroundColor: "#f9fafb",
|
|
5300
|
-
border: "1px solid #
|
|
5611
|
+
border: "1px solid #ed6969",
|
|
5301
5612
|
borderRadius: "8px",
|
|
5302
|
-
padding: "
|
|
5303
|
-
margin: "
|
|
5613
|
+
padding: "10px",
|
|
5614
|
+
margin: "0 0 0 0"
|
|
5304
5615
|
},
|
|
5305
5616
|
children: [
|
|
5306
5617
|
/* @__PURE__ */ jsx(
|
|
@@ -5349,8 +5660,10 @@ const CrossChainDepositModal = ({
|
|
|
5349
5660
|
display: "flex",
|
|
5350
5661
|
flexDirection: "column",
|
|
5351
5662
|
alignItems: "center",
|
|
5352
|
-
justifyContent: "
|
|
5353
|
-
gap: "16px"
|
|
5663
|
+
justifyContent: "flex-start",
|
|
5664
|
+
gap: "16px",
|
|
5665
|
+
overflowY: "auto",
|
|
5666
|
+
paddingTop: "40px"
|
|
5354
5667
|
},
|
|
5355
5668
|
children: [
|
|
5356
5669
|
/* @__PURE__ */ jsx(
|
|
@@ -5398,7 +5711,8 @@ const CrossChainDepositModal = ({
|
|
|
5398
5711
|
padding: "12px",
|
|
5399
5712
|
borderRadius: "8px",
|
|
5400
5713
|
border: `1px solid ${result.success ? "#bbf7d0" : "#fecaca"}`,
|
|
5401
|
-
backgroundColor: result.success ? "#f0fdf4" : "#fef2f2"
|
|
5714
|
+
backgroundColor: result.success ? "#f0fdf4" : "#fef2f2",
|
|
5715
|
+
overflow: "visible"
|
|
5402
5716
|
},
|
|
5403
5717
|
children: [
|
|
5404
5718
|
/* @__PURE__ */ jsxs(
|
|
@@ -5444,7 +5758,10 @@ const CrossChainDepositModal = ({
|
|
|
5444
5758
|
style: {
|
|
5445
5759
|
fontSize: "12px",
|
|
5446
5760
|
color: "#dc2626",
|
|
5447
|
-
margin: "4px 0 0 0"
|
|
5761
|
+
margin: "4px 0 0 0",
|
|
5762
|
+
wordWrap: "break-word",
|
|
5763
|
+
overflowWrap: "break-word",
|
|
5764
|
+
whiteSpace: "normal"
|
|
5448
5765
|
},
|
|
5449
5766
|
children: result.error
|
|
5450
5767
|
}
|
|
@@ -5477,58 +5794,6 @@ const CrossChainDepositModal = ({
|
|
|
5477
5794
|
]
|
|
5478
5795
|
}
|
|
5479
5796
|
) : null;
|
|
5480
|
-
const PercentageButton = ({ percentage, isSelected, onClick }) => {
|
|
5481
|
-
const getFillLevel = () => {
|
|
5482
|
-
if (percentage === 0) return "empty";
|
|
5483
|
-
if (percentage === 25) return "quarter";
|
|
5484
|
-
if (percentage === 50) return "half";
|
|
5485
|
-
if (percentage === 75) return "three-quarter";
|
|
5486
|
-
return "full";
|
|
5487
|
-
};
|
|
5488
|
-
const fillLevel = getFillLevel();
|
|
5489
|
-
const size = 20;
|
|
5490
|
-
return /* @__PURE__ */ jsx(
|
|
5491
|
-
"button",
|
|
5492
|
-
{
|
|
5493
|
-
onClick,
|
|
5494
|
-
style: {
|
|
5495
|
-
width: size,
|
|
5496
|
-
height: size,
|
|
5497
|
-
borderRadius: "50%",
|
|
5498
|
-
border: `2px solid ${isSelected ? theme.colors.primary : "#d1d5db"}`,
|
|
5499
|
-
backgroundColor: "transparent",
|
|
5500
|
-
cursor: "pointer",
|
|
5501
|
-
padding: 0,
|
|
5502
|
-
position: "relative",
|
|
5503
|
-
overflow: "hidden"
|
|
5504
|
-
},
|
|
5505
|
-
title: `${percentage}%`,
|
|
5506
|
-
children: fillLevel === "full" ? /* @__PURE__ */ jsx(
|
|
5507
|
-
"div",
|
|
5508
|
-
{
|
|
5509
|
-
style: {
|
|
5510
|
-
position: "absolute",
|
|
5511
|
-
inset: 0,
|
|
5512
|
-
backgroundColor: theme.colors.primary,
|
|
5513
|
-
borderRadius: "50%"
|
|
5514
|
-
}
|
|
5515
|
-
}
|
|
5516
|
-
) : fillLevel !== "empty" && /* @__PURE__ */ jsx(
|
|
5517
|
-
"div",
|
|
5518
|
-
{
|
|
5519
|
-
style: {
|
|
5520
|
-
position: "absolute",
|
|
5521
|
-
bottom: 0,
|
|
5522
|
-
left: 0,
|
|
5523
|
-
right: 0,
|
|
5524
|
-
height: fillLevel === "quarter" ? "25%" : fillLevel === "half" ? "50%" : "75%",
|
|
5525
|
-
backgroundColor: "#9ca3af"
|
|
5526
|
-
}
|
|
5527
|
-
}
|
|
5528
|
-
)
|
|
5529
|
-
}
|
|
5530
|
-
);
|
|
5531
|
-
};
|
|
5532
5797
|
return /* @__PURE__ */ jsx(
|
|
5533
5798
|
SpiceModalShell,
|
|
5534
5799
|
{
|
|
@@ -5628,164 +5893,18 @@ const CrossChainDepositModal = ({
|
|
|
5628
5893
|
"div",
|
|
5629
5894
|
{
|
|
5630
5895
|
style: { display: "flex", flexDirection: "column", gap: "16px" },
|
|
5631
|
-
children: Array.from(selectedAssets.values()).map(({ asset, amount }) =>
|
|
5632
|
-
|
|
5633
|
-
|
|
5634
|
-
|
|
5635
|
-
|
|
5636
|
-
|
|
5637
|
-
|
|
5638
|
-
|
|
5639
|
-
|
|
5640
|
-
|
|
5641
|
-
|
|
5642
|
-
|
|
5643
|
-
},
|
|
5644
|
-
children: [
|
|
5645
|
-
/* @__PURE__ */ jsxs(
|
|
5646
|
-
"div",
|
|
5647
|
-
{
|
|
5648
|
-
style: {
|
|
5649
|
-
display: "flex",
|
|
5650
|
-
justifyContent: "space-between",
|
|
5651
|
-
alignItems: "center",
|
|
5652
|
-
marginBottom: "12px"
|
|
5653
|
-
},
|
|
5654
|
-
children: [
|
|
5655
|
-
/* @__PURE__ */ jsxs(
|
|
5656
|
-
"span",
|
|
5657
|
-
{
|
|
5658
|
-
style: {
|
|
5659
|
-
fontSize: "14px",
|
|
5660
|
-
fontWeight: 500,
|
|
5661
|
-
color: "#374151"
|
|
5662
|
-
},
|
|
5663
|
-
children: [
|
|
5664
|
-
asset.symbol,
|
|
5665
|
-
" Amount"
|
|
5666
|
-
]
|
|
5667
|
-
}
|
|
5668
|
-
),
|
|
5669
|
-
/* @__PURE__ */ jsxs(
|
|
5670
|
-
"div",
|
|
5671
|
-
{
|
|
5672
|
-
style: {
|
|
5673
|
-
display: "flex",
|
|
5674
|
-
alignItems: "center",
|
|
5675
|
-
gap: "8px"
|
|
5676
|
-
},
|
|
5677
|
-
children: [
|
|
5678
|
-
/* @__PURE__ */ jsxs("span", { style: { fontSize: "13px", color: "#6b7280" }, children: [
|
|
5679
|
-
"Balance: ",
|
|
5680
|
-
(asset.balanceFormatted || 0).toFixed(4)
|
|
5681
|
-
] }),
|
|
5682
|
-
/* @__PURE__ */ jsxs(
|
|
5683
|
-
"div",
|
|
5684
|
-
{
|
|
5685
|
-
style: {
|
|
5686
|
-
display: "flex",
|
|
5687
|
-
alignItems: "center",
|
|
5688
|
-
gap: "6px",
|
|
5689
|
-
padding: "4px 10px",
|
|
5690
|
-
backgroundColor: "white",
|
|
5691
|
-
borderRadius: "20px",
|
|
5692
|
-
border: "1px solid #e5e7eb"
|
|
5693
|
-
},
|
|
5694
|
-
children: [
|
|
5695
|
-
/* @__PURE__ */ jsx(
|
|
5696
|
-
"div",
|
|
5697
|
-
{
|
|
5698
|
-
style: {
|
|
5699
|
-
width: "20px",
|
|
5700
|
-
height: "20px",
|
|
5701
|
-
borderRadius: "50%",
|
|
5702
|
-
backgroundColor: asset.symbol === "USDC" ? "#2775CA" : asset.symbol === "USDT" ? "#26A17B" : "#F7931A",
|
|
5703
|
-
display: "flex",
|
|
5704
|
-
alignItems: "center",
|
|
5705
|
-
justifyContent: "center",
|
|
5706
|
-
color: "white",
|
|
5707
|
-
fontSize: "9px",
|
|
5708
|
-
fontWeight: 700
|
|
5709
|
-
},
|
|
5710
|
-
children: asset.symbol === "USDC" ? "$" : asset.symbol === "USDT" ? "\u20AE" : "\u20BF"
|
|
5711
|
-
}
|
|
5712
|
-
),
|
|
5713
|
-
/* @__PURE__ */ jsx(
|
|
5714
|
-
"span",
|
|
5715
|
-
{
|
|
5716
|
-
style: {
|
|
5717
|
-
fontSize: "13px",
|
|
5718
|
-
fontWeight: 500,
|
|
5719
|
-
color: "#111827"
|
|
5720
|
-
},
|
|
5721
|
-
children: asset.symbol
|
|
5722
|
-
}
|
|
5723
|
-
)
|
|
5724
|
-
]
|
|
5725
|
-
}
|
|
5726
|
-
)
|
|
5727
|
-
]
|
|
5728
|
-
}
|
|
5729
|
-
)
|
|
5730
|
-
]
|
|
5731
|
-
}
|
|
5732
|
-
),
|
|
5733
|
-
/* @__PURE__ */ jsxs(
|
|
5734
|
-
"div",
|
|
5735
|
-
{
|
|
5736
|
-
style: {
|
|
5737
|
-
display: "flex",
|
|
5738
|
-
alignItems: "center",
|
|
5739
|
-
gap: "12px"
|
|
5740
|
-
},
|
|
5741
|
-
children: [
|
|
5742
|
-
/* @__PURE__ */ jsx(
|
|
5743
|
-
"input",
|
|
5744
|
-
{
|
|
5745
|
-
type: "text",
|
|
5746
|
-
value: amount,
|
|
5747
|
-
onChange: (e) => handleAmountChange(asset.address, e.target.value),
|
|
5748
|
-
placeholder: "0.00",
|
|
5749
|
-
style: {
|
|
5750
|
-
flex: 1,
|
|
5751
|
-
fontSize: "32px",
|
|
5752
|
-
fontWeight: 600,
|
|
5753
|
-
color: amount ? "#111827" : "#d1d5db",
|
|
5754
|
-
backgroundColor: "transparent",
|
|
5755
|
-
border: "none",
|
|
5756
|
-
outline: "none",
|
|
5757
|
-
padding: 0,
|
|
5758
|
-
fontFamily: "system-ui, -apple-system, sans-serif"
|
|
5759
|
-
}
|
|
5760
|
-
}
|
|
5761
|
-
),
|
|
5762
|
-
/* @__PURE__ */ jsx(
|
|
5763
|
-
"div",
|
|
5764
|
-
{
|
|
5765
|
-
style: {
|
|
5766
|
-
display: "flex",
|
|
5767
|
-
gap: "6px",
|
|
5768
|
-
alignItems: "center"
|
|
5769
|
-
},
|
|
5770
|
-
children: [0, 25, 50, 75, 100].map((pct) => /* @__PURE__ */ jsx(
|
|
5771
|
-
PercentageButton,
|
|
5772
|
-
{
|
|
5773
|
-
percentage: pct,
|
|
5774
|
-
isSelected: Math.abs(percentage - pct) < 1,
|
|
5775
|
-
onClick: () => handlePercentageClick(asset.address, pct)
|
|
5776
|
-
},
|
|
5777
|
-
pct
|
|
5778
|
-
))
|
|
5779
|
-
}
|
|
5780
|
-
)
|
|
5781
|
-
]
|
|
5782
|
-
}
|
|
5783
|
-
)
|
|
5784
|
-
]
|
|
5785
|
-
},
|
|
5786
|
-
asset.address
|
|
5787
|
-
);
|
|
5788
|
-
})
|
|
5896
|
+
children: Array.from(selectedAssets.values()).map(({ asset, amount }) => /* @__PURE__ */ jsx(
|
|
5897
|
+
AssetInput,
|
|
5898
|
+
{
|
|
5899
|
+
asset,
|
|
5900
|
+
amount,
|
|
5901
|
+
onAmountChange: (value) => handleAmountChange(asset.address, value),
|
|
5902
|
+
onPercentageClick: (pct) => handlePercentageClick(asset.address, pct),
|
|
5903
|
+
theme,
|
|
5904
|
+
disabled: isExecuting
|
|
5905
|
+
},
|
|
5906
|
+
asset.address
|
|
5907
|
+
))
|
|
5789
5908
|
}
|
|
5790
5909
|
),
|
|
5791
5910
|
error && /* @__PURE__ */ jsx(
|
|
@@ -5802,20 +5921,23 @@ const CrossChainDepositModal = ({
|
|
|
5802
5921
|
}
|
|
5803
5922
|
),
|
|
5804
5923
|
!isSuccess && /* @__PURE__ */ jsx(
|
|
5805
|
-
|
|
5924
|
+
Button,
|
|
5806
5925
|
{
|
|
5926
|
+
variant: "outline",
|
|
5927
|
+
fullWidth: true,
|
|
5807
5928
|
onClick: executeDeposit,
|
|
5929
|
+
loading: isExecuting,
|
|
5808
5930
|
disabled: !canDeposit,
|
|
5931
|
+
theme,
|
|
5809
5932
|
style: {
|
|
5810
5933
|
width: "100%",
|
|
5811
5934
|
padding: "16px",
|
|
5812
|
-
|
|
5813
|
-
|
|
5814
|
-
|
|
5815
|
-
|
|
5816
|
-
|
|
5817
|
-
|
|
5818
|
-
letterSpacing: "0.5px",
|
|
5935
|
+
backgroundColor: "#ea4b4b",
|
|
5936
|
+
color: "#0e0d0b",
|
|
5937
|
+
border: "1px solid #0e0d0b",
|
|
5938
|
+
fontWeight: 500,
|
|
5939
|
+
fontSize: "18px",
|
|
5940
|
+
textTransform: "uppercase",
|
|
5819
5941
|
cursor: canDeposit ? "pointer" : "not-allowed",
|
|
5820
5942
|
marginTop: "20px",
|
|
5821
5943
|
display: "flex",
|