@coinlist-co/react 0.12.2-rc.726778a → 0.12.2-rc.7b430dd
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/{chunk-C6F5FOFP.js → chunk-DCW7NQXH.js} +2 -2
- package/dist/{chunk-IRV5YU42.js → chunk-MOE5S6CE.js} +3 -17
- package/dist/chunk-MOE5S6CE.js.map +1 -0
- package/dist/{chunk-3UQPCAU4.js → chunk-VH34YC3Q.js} +2 -2
- package/dist/client/index.cjs +43 -35
- package/dist/client/index.cjs.map +1 -1
- package/dist/client/index.d.cts +2 -0
- package/dist/client/index.d.ts +2 -0
- package/dist/client/index.js +66 -46
- package/dist/client/index.js.map +1 -1
- package/dist/server/index.cjs +0 -2
- package/dist/server/index.cjs.map +1 -1
- package/dist/server/index.js +2 -2
- package/dist/universal/index.cjs +2 -17
- package/dist/universal/index.cjs.map +1 -1
- package/dist/universal/index.d.cts +1 -18
- package/dist/universal/index.d.ts +1 -18
- package/dist/universal/index.js +2 -4
- package/package.json +1 -1
- package/dist/chunk-IRV5YU42.js.map +0 -1
- /package/dist/{chunk-C6F5FOFP.js.map → chunk-DCW7NQXH.js.map} +0 -0
- /package/dist/{chunk-3UQPCAU4.js.map → chunk-VH34YC3Q.js.map} +0 -0
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
generateSecureRandomBase64Url,
|
|
20
20
|
internalLogger,
|
|
21
21
|
sha256
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-MOE5S6CE.js";
|
|
23
23
|
|
|
24
24
|
// src/universal/types/oauth.ts
|
|
25
25
|
var AuthorizationCode = (value) => value;
|
|
@@ -406,4 +406,4 @@ export {
|
|
|
406
406
|
UserEmail,
|
|
407
407
|
User
|
|
408
408
|
};
|
|
409
|
-
//# sourceMappingURL=chunk-
|
|
409
|
+
//# sourceMappingURL=chunk-VH34YC3Q.js.map
|
package/dist/client/index.cjs
CHANGED
|
@@ -1939,11 +1939,7 @@ function formatAmount(amount, locale, options) {
|
|
|
1939
1939
|
const decimal = formatRawAmount(amount);
|
|
1940
1940
|
let [integerPart, fractionPart = ""] = decimal.split(".");
|
|
1941
1941
|
const maxFractionDigits = options?.maxFractionDigits;
|
|
1942
|
-
const minFractionDigits = Math.min(
|
|
1943
|
-
options?.minFractionDigits ?? (maxFractionDigits !== void 0 ? maxFractionDigits : 2),
|
|
1944
|
-
maxFractionDigits ?? amount.decimals,
|
|
1945
|
-
amount.decimals
|
|
1946
|
-
);
|
|
1942
|
+
const minFractionDigits = maxFractionDigits !== void 0 ? Math.min(maxFractionDigits, amount.decimals) : Math.min(2, amount.decimals);
|
|
1947
1943
|
if (maxFractionDigits !== void 0 && fractionPart.length > maxFractionDigits) {
|
|
1948
1944
|
({ integerPart, fractionPart } = roundFractionHalfUp(
|
|
1949
1945
|
integerPart,
|
|
@@ -1951,8 +1947,7 @@ function formatAmount(amount, locale, options) {
|
|
|
1951
1947
|
maxFractionDigits
|
|
1952
1948
|
));
|
|
1953
1949
|
}
|
|
1954
|
-
const
|
|
1955
|
-
const fraction = trimmed.padEnd(minFractionDigits, "0");
|
|
1950
|
+
const fraction = minFractionDigits === 0 ? "" : fractionPart.padEnd(minFractionDigits, "0");
|
|
1956
1951
|
const integerFormatted = BigInt(integerPart).toLocaleString(locale);
|
|
1957
1952
|
if (minFractionDigits === 0 && fraction === "") {
|
|
1958
1953
|
return FormattedAmountUi(integerFormatted);
|
|
@@ -2013,14 +2008,6 @@ function assetAmount(amount, symbol) {
|
|
|
2013
2008
|
return FormattedAmountAssetUi(`${amount} ${symbol}`);
|
|
2014
2009
|
}
|
|
2015
2010
|
var NA_AMOUNT_ASSET_UI = FormattedAmountAssetUi("-");
|
|
2016
|
-
var SHARE_MAX_FRACTION_DIGITS = AssetDecimals(6);
|
|
2017
|
-
var SHARE_MIN_FRACTION_DIGITS = AssetDecimals(2);
|
|
2018
|
-
function formatShareAmount(amount, locale) {
|
|
2019
|
-
return formatAmount(amount, locale, {
|
|
2020
|
-
maxFractionDigits: SHARE_MAX_FRACTION_DIGITS,
|
|
2021
|
-
minFractionDigits: SHARE_MIN_FRACTION_DIGITS
|
|
2022
|
-
});
|
|
2023
|
-
}
|
|
2024
2011
|
var USD_FRACTION_DIGITS = AssetDecimals(2);
|
|
2025
2012
|
function formattedUsdPrice(amount, locale) {
|
|
2026
2013
|
if (!amount) return NA_AMOUNT_ASSET_UI;
|
|
@@ -6312,7 +6299,10 @@ function CheckoutConfirmationDialog({
|
|
|
6312
6299
|
}
|
|
6313
6300
|
)
|
|
6314
6301
|
] }),
|
|
6315
|
-
header,
|
|
6302
|
+
header && /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_jsx_runtime20.Fragment, { children: [
|
|
6303
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Divider, {}),
|
|
6304
|
+
header
|
|
6305
|
+
] }),
|
|
6316
6306
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Divider, {}),
|
|
6317
6307
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(CheckoutDetailList, { rows }),
|
|
6318
6308
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "clcosdk:flex clcosdk:flex-col clcosdk:gap-3", children: actions })
|
|
@@ -6329,7 +6319,6 @@ function AssetSummaryRow({
|
|
|
6329
6319
|
iconSize = 48,
|
|
6330
6320
|
value,
|
|
6331
6321
|
caption,
|
|
6332
|
-
wrapIdentity = false,
|
|
6333
6322
|
className
|
|
6334
6323
|
}) {
|
|
6335
6324
|
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(CoinListStyleScope, { children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
@@ -6348,8 +6337,7 @@ function AssetSummaryRow({
|
|
|
6348
6337
|
{
|
|
6349
6338
|
className: cn(
|
|
6350
6339
|
typeClasses.h4,
|
|
6351
|
-
"clcosdk:text-text-primary"
|
|
6352
|
-
wrapIdentity ? "clcosdk:break-words" : "clcosdk:truncate"
|
|
6340
|
+
"clcosdk:truncate clcosdk:text-text-primary"
|
|
6353
6341
|
),
|
|
6354
6342
|
children: asset.name
|
|
6355
6343
|
}
|
|
@@ -6359,8 +6347,7 @@ function AssetSummaryRow({
|
|
|
6359
6347
|
{
|
|
6360
6348
|
className: cn(
|
|
6361
6349
|
typeClasses.subhead,
|
|
6362
|
-
"clcosdk:text-text-secondary"
|
|
6363
|
-
wrapIdentity ? "clcosdk:break-words" : "clcosdk:truncate"
|
|
6350
|
+
"clcosdk:truncate clcosdk:text-text-secondary"
|
|
6364
6351
|
),
|
|
6365
6352
|
children: asset.symbol
|
|
6366
6353
|
}
|
|
@@ -6405,7 +6392,7 @@ function AssetSummaryRow({
|
|
|
6405
6392
|
// src/client/components/checkout/ondo/buy/confirmation/OndoBuyOrderConfirmed.tsx
|
|
6406
6393
|
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
6407
6394
|
var TITLE2 = "Order confirmed";
|
|
6408
|
-
var
|
|
6395
|
+
var SHARES_RECEIVED_CAPTION = "shares received";
|
|
6409
6396
|
var TOTAL_COST_LABEL = "Total cost";
|
|
6410
6397
|
var PRICE_PER_SHARE_LABEL = "Price per share";
|
|
6411
6398
|
var DELIVERED_TO_LABEL = "Delivered to";
|
|
@@ -6427,7 +6414,14 @@ function OndoBuyOrderConfirmed({
|
|
|
6427
6414
|
icon: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(SuccessGlyph, {}),
|
|
6428
6415
|
title: TITLE2,
|
|
6429
6416
|
subtitle: subtitle(state.outputAsset.symbol),
|
|
6430
|
-
header: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
6417
|
+
header: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
6418
|
+
AssetSummaryRow,
|
|
6419
|
+
{
|
|
6420
|
+
asset: state.outputAsset,
|
|
6421
|
+
value: state.outputAmount,
|
|
6422
|
+
caption: SHARES_RECEIVED_CAPTION
|
|
6423
|
+
}
|
|
6424
|
+
),
|
|
6431
6425
|
rows: detailRows(state),
|
|
6432
6426
|
actions: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(import_jsx_runtime22.Fragment, { children: [
|
|
6433
6427
|
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(ClButton, { variant: "gradient", fullWidth: true, onClick: onClose, children: DONE_LABEL }),
|
|
@@ -6440,7 +6434,6 @@ function OndoBuyOrderConfirmed({
|
|
|
6440
6434
|
}
|
|
6441
6435
|
function detailRows(state) {
|
|
6442
6436
|
return [
|
|
6443
|
-
{ label: SHARES_RECEIVED_LABEL, value: state.outputAmount },
|
|
6444
6437
|
{ label: TOTAL_COST_LABEL, value: state.totalCost },
|
|
6445
6438
|
{ label: PRICE_PER_SHARE_LABEL, value: state.pricePerShare },
|
|
6446
6439
|
{ label: DELIVERED_TO_LABEL, value: state.recipientAddress }
|
|
@@ -8245,7 +8238,7 @@ function useOndoBuyReviewViewModel({
|
|
|
8245
8238
|
tokenMetadata: outputTokenMetadata
|
|
8246
8239
|
}),
|
|
8247
8240
|
outputAmount: assetAmount(
|
|
8248
|
-
|
|
8241
|
+
formatAmount(built.receiveOutputAmount, locale),
|
|
8249
8242
|
ondoSymbol
|
|
8250
8243
|
),
|
|
8251
8244
|
recipientAddress: shortenAddress(active.wallet.address),
|
|
@@ -9064,7 +9057,7 @@ function toOrderConfirmedUi({
|
|
|
9064
9057
|
tokenMetadata: outputTokenMetadata
|
|
9065
9058
|
}),
|
|
9066
9059
|
outputAmount: assetAmount(
|
|
9067
|
-
|
|
9060
|
+
formatAmount(order.transaction.receiveOutputAmount, locale),
|
|
9068
9061
|
ondoSymbol
|
|
9069
9062
|
),
|
|
9070
9063
|
totalCost: assetAmount(
|
|
@@ -9316,7 +9309,7 @@ function MaxButton2({
|
|
|
9316
9309
|
var import_lucide_react7 = require("lucide-react");
|
|
9317
9310
|
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
9318
9311
|
var TITLE7 = "Order confirmed";
|
|
9319
|
-
var
|
|
9312
|
+
var SHARES_SOLD_CAPTION = "shares sold";
|
|
9320
9313
|
var RECEIVED_LABEL = "Received";
|
|
9321
9314
|
var PRICE_PER_SHARE_LABEL3 = "Price per share";
|
|
9322
9315
|
var DELIVERED_TO_LABEL2 = "Delivered to";
|
|
@@ -9339,9 +9332,18 @@ function OndoSellOrderConfirmed({
|
|
|
9339
9332
|
title: TITLE7,
|
|
9340
9333
|
subtitle: subtitle2(state.soldAsset.symbol, state.proceedsSymbol),
|
|
9341
9334
|
header: (
|
|
9342
|
-
// The
|
|
9343
|
-
//
|
|
9344
|
-
|
|
9335
|
+
// The asset row leads with what was *sold*, where the buy dialog
|
|
9336
|
+
// leads with what arrived. The proceeds are a detail row below,
|
|
9337
|
+
// because the position that changed is the thing the user is looking
|
|
9338
|
+
// for.
|
|
9339
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
9340
|
+
AssetSummaryRow,
|
|
9341
|
+
{
|
|
9342
|
+
asset: state.soldAsset,
|
|
9343
|
+
value: state.soldAmount,
|
|
9344
|
+
caption: SHARES_SOLD_CAPTION
|
|
9345
|
+
}
|
|
9346
|
+
)
|
|
9345
9347
|
),
|
|
9346
9348
|
rows: detailRows3(state),
|
|
9347
9349
|
actions: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_jsx_runtime36.Fragment, { children: [
|
|
@@ -9355,7 +9357,6 @@ function OndoSellOrderConfirmed({
|
|
|
9355
9357
|
}
|
|
9356
9358
|
function detailRows3(state) {
|
|
9357
9359
|
return [
|
|
9358
|
-
{ label: SHARES_SOLD_LABEL, value: state.soldAmount },
|
|
9359
9360
|
{ label: RECEIVED_LABEL, value: state.proceeds },
|
|
9360
9361
|
{ label: PRICE_PER_SHARE_LABEL3, value: state.pricePerShare },
|
|
9361
9362
|
{ label: DELIVERED_TO_LABEL2, value: state.recipientAddress }
|
|
@@ -10677,7 +10678,7 @@ function toOrderConfirmedUi2({
|
|
|
10677
10678
|
tokenMetadata: inputTokenMetadata
|
|
10678
10679
|
}),
|
|
10679
10680
|
soldAmount: assetAmount(
|
|
10680
|
-
|
|
10681
|
+
formatAmount(order.transaction.spendInputAmount, locale),
|
|
10681
10682
|
ondoSymbol
|
|
10682
10683
|
),
|
|
10683
10684
|
// The expected proceeds rather than the floor: this dialog reports a sale
|
|
@@ -10916,7 +10917,7 @@ var import_lucide_react9 = require("lucide-react");
|
|
|
10916
10917
|
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
10917
10918
|
var TITLE10 = "Order confirmed";
|
|
10918
10919
|
var TOTAL_COST_LABEL2 = "Total cost";
|
|
10919
|
-
var
|
|
10920
|
+
var SHARES_RECEIVED_LABEL = "Shares received";
|
|
10920
10921
|
var SHARES_RECEIVED_ESTIMATED_LABEL = "Shares received (estimated)";
|
|
10921
10922
|
var PRICE_PER_SHARE_LABEL5 = "Price per share";
|
|
10922
10923
|
var PRICE_PER_SHARE_ESTIMATED_LABEL = "Price per share (estimated)";
|
|
@@ -10939,7 +10940,13 @@ function SuperstateOrderConfirmed({
|
|
|
10939
10940
|
icon: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(SuccessGlyph3, {}),
|
|
10940
10941
|
title: TITLE10,
|
|
10941
10942
|
subtitle: subtitle3(state.asset.symbol),
|
|
10942
|
-
header: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
10943
|
+
header: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
10944
|
+
AssetSummaryRow,
|
|
10945
|
+
{
|
|
10946
|
+
asset: state.asset,
|
|
10947
|
+
caption: `Issued by ${state.issuer}`
|
|
10948
|
+
}
|
|
10949
|
+
),
|
|
10943
10950
|
rows: detailRows4(state),
|
|
10944
10951
|
actions: /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(import_jsx_runtime41.Fragment, { children: [
|
|
10945
10952
|
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(ClButton, { variant: "gradient", fullWidth: true, onClick: onClose, children: DONE_LABEL3 }),
|
|
@@ -10955,7 +10962,7 @@ function detailRows4(state) {
|
|
|
10955
10962
|
return [
|
|
10956
10963
|
{ label: TOTAL_COST_LABEL2, value: state.totalCost },
|
|
10957
10964
|
{
|
|
10958
|
-
label: confirmed ?
|
|
10965
|
+
label: confirmed ? SHARES_RECEIVED_LABEL : SHARES_RECEIVED_ESTIMATED_LABEL,
|
|
10959
10966
|
value: state.outputAmount
|
|
10960
10967
|
},
|
|
10961
10968
|
{
|
|
@@ -13027,6 +13034,7 @@ function toOrderConfirmedUi3({
|
|
|
13027
13034
|
networkName: getNetworkName(chain),
|
|
13028
13035
|
iconUrl: assetIconUrl
|
|
13029
13036
|
}),
|
|
13037
|
+
issuer: SUPERSTATE_ISSUER_NAME,
|
|
13030
13038
|
outputAmount: assetAmount(
|
|
13031
13039
|
formatAmount(order.outputAmount, locale),
|
|
13032
13040
|
order.outputAsset.symbol
|