@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.
@@ -2977,6 +2977,8 @@ type SuperstateOrderConfirmedUiState = {
2977
2977
  type: 'visible';
2978
2978
  /** What was bought. */
2979
2979
  asset: CheckoutAssetUi;
2980
+ /** Who issues it, e.g. `Superstate`. */
2981
+ issuer: string;
2980
2982
  /** How much of it arrived, e.g. `981.2431 USTB`. */
2981
2983
  outputAmount: FormattedAmountAssetUi;
2982
2984
  /**
@@ -2977,6 +2977,8 @@ type SuperstateOrderConfirmedUiState = {
2977
2977
  type: 'visible';
2978
2978
  /** What was bought. */
2979
2979
  asset: CheckoutAssetUi;
2980
+ /** Who issues it, e.g. `Superstate`. */
2981
+ issuer: string;
2980
2982
  /** How much of it arrived, e.g. `981.2431 USTB`. */
2981
2983
  outputAmount: FormattedAmountAssetUi;
2982
2984
  /**
@@ -5,7 +5,7 @@ import {
5
5
  SDK_LOGGER_NAME,
6
6
  loggerOverPino,
7
7
  publicClients
8
- } from "../chunk-C6F5FOFP.js";
8
+ } from "../chunk-DCW7NQXH.js";
9
9
  import {
10
10
  AuthorizationCode,
11
11
  CodeVerifier,
@@ -39,7 +39,7 @@ import {
39
39
  ondoQuoteOfferDeadline,
40
40
  superstateSwapContractAddress,
41
41
  swapSpender
42
- } from "../chunk-3UQPCAU4.js";
42
+ } from "../chunk-VH34YC3Q.js";
43
43
  import {
44
44
  API_VERSION,
45
45
  AssetDecimals,
@@ -80,7 +80,6 @@ import {
80
80
  formatAmount,
81
81
  formatBpsAsPercent,
82
82
  formatRawAmount,
83
- formatShareAmount,
84
83
  formattedUsdPrice,
85
84
  getNetworkName,
86
85
  getUUIDv4,
@@ -89,7 +88,7 @@ import {
89
88
  shortenAddress,
90
89
  txExplorerUrl,
91
90
  usdAmount
92
- } from "../chunk-IRV5YU42.js";
91
+ } from "../chunk-MOE5S6CE.js";
93
92
 
94
93
  // src/client/CoinListProvider.tsx
95
94
  import {
@@ -2283,7 +2282,7 @@ function Modal({ label, onClose, children, className }) {
2283
2282
  }
2284
2283
 
2285
2284
  // src/client/components/checkout/shared/confirmation/CheckoutConfirmationDialog.tsx
2286
- import { jsx as jsx20, jsxs as jsxs14 } from "react/jsx-runtime";
2285
+ import { Fragment as Fragment4, jsx as jsx20, jsxs as jsxs14 } from "react/jsx-runtime";
2287
2286
  function CheckoutConfirmationDialog({
2288
2287
  icon,
2289
2288
  title: title2,
@@ -2309,7 +2308,10 @@ function CheckoutConfirmationDialog({
2309
2308
  }
2310
2309
  )
2311
2310
  ] }),
2312
- header,
2311
+ header && /* @__PURE__ */ jsxs14(Fragment4, { children: [
2312
+ /* @__PURE__ */ jsx20(Divider, {}),
2313
+ header
2314
+ ] }),
2313
2315
  /* @__PURE__ */ jsx20(Divider, {}),
2314
2316
  /* @__PURE__ */ jsx20(CheckoutDetailList, { rows }),
2315
2317
  /* @__PURE__ */ jsx20("div", { className: "clcosdk:flex clcosdk:flex-col clcosdk:gap-3", children: actions })
@@ -2326,7 +2328,6 @@ function AssetSummaryRow({
2326
2328
  iconSize = 48,
2327
2329
  value,
2328
2330
  caption,
2329
- wrapIdentity = false,
2330
2331
  className
2331
2332
  }) {
2332
2333
  return /* @__PURE__ */ jsx21(CoinListStyleScope, { children: /* @__PURE__ */ jsxs15(
@@ -2345,8 +2346,7 @@ function AssetSummaryRow({
2345
2346
  {
2346
2347
  className: cn(
2347
2348
  typeClasses.h4,
2348
- "clcosdk:text-text-primary",
2349
- wrapIdentity ? "clcosdk:break-words" : "clcosdk:truncate"
2349
+ "clcosdk:truncate clcosdk:text-text-primary"
2350
2350
  ),
2351
2351
  children: asset.name
2352
2352
  }
@@ -2356,8 +2356,7 @@ function AssetSummaryRow({
2356
2356
  {
2357
2357
  className: cn(
2358
2358
  typeClasses.subhead,
2359
- "clcosdk:text-text-secondary",
2360
- wrapIdentity ? "clcosdk:break-words" : "clcosdk:truncate"
2359
+ "clcosdk:truncate clcosdk:text-text-secondary"
2361
2360
  ),
2362
2361
  children: asset.symbol
2363
2362
  }
@@ -2400,9 +2399,9 @@ function AssetSummaryRow({
2400
2399
  }
2401
2400
 
2402
2401
  // src/client/components/checkout/ondo/buy/confirmation/OndoBuyOrderConfirmed.tsx
2403
- import { Fragment as Fragment4, jsx as jsx22, jsxs as jsxs16 } from "react/jsx-runtime";
2402
+ import { Fragment as Fragment5, jsx as jsx22, jsxs as jsxs16 } from "react/jsx-runtime";
2404
2403
  var TITLE2 = "Order confirmed";
2405
- var SHARES_RECEIVED_LABEL = "Shares received";
2404
+ var SHARES_RECEIVED_CAPTION = "shares received";
2406
2405
  var TOTAL_COST_LABEL = "Total cost";
2407
2406
  var PRICE_PER_SHARE_LABEL = "Price per share";
2408
2407
  var DELIVERED_TO_LABEL = "Delivered to";
@@ -2424,9 +2423,16 @@ function OndoBuyOrderConfirmed({
2424
2423
  icon: /* @__PURE__ */ jsx22(SuccessGlyph, {}),
2425
2424
  title: TITLE2,
2426
2425
  subtitle: subtitle(state.outputAsset.symbol),
2427
- header: /* @__PURE__ */ jsx22(AssetSummaryRow, { asset: state.outputAsset, wrapIdentity: true }),
2426
+ header: /* @__PURE__ */ jsx22(
2427
+ AssetSummaryRow,
2428
+ {
2429
+ asset: state.outputAsset,
2430
+ value: state.outputAmount,
2431
+ caption: SHARES_RECEIVED_CAPTION
2432
+ }
2433
+ ),
2428
2434
  rows: detailRows(state),
2429
- actions: /* @__PURE__ */ jsxs16(Fragment4, { children: [
2435
+ actions: /* @__PURE__ */ jsxs16(Fragment5, { children: [
2430
2436
  /* @__PURE__ */ jsx22(ClButton, { variant: "gradient", fullWidth: true, onClick: onClose, children: DONE_LABEL }),
2431
2437
  /* @__PURE__ */ jsx22(ExplorerLink, { url: state.txExplorerUrl })
2432
2438
  ] }),
@@ -2437,7 +2443,6 @@ function OndoBuyOrderConfirmed({
2437
2443
  }
2438
2444
  function detailRows(state) {
2439
2445
  return [
2440
- { label: SHARES_RECEIVED_LABEL, value: state.outputAmount },
2441
2446
  { label: TOTAL_COST_LABEL, value: state.totalCost },
2442
2447
  { label: PRICE_PER_SHARE_LABEL, value: state.pricePerShare },
2443
2448
  { label: DELIVERED_TO_LABEL, value: state.recipientAddress }
@@ -3134,7 +3139,7 @@ function PriceCaption({ price }) {
3134
3139
  import { Wallet } from "lucide-react";
3135
3140
 
3136
3141
  // src/client/components/checkout/shared/selection/SelectableOptionRow.tsx
3137
- import { Children, Fragment as Fragment5 } from "react";
3142
+ import { Children, Fragment as Fragment6 } from "react";
3138
3143
  import { jsx as jsx31, jsxs as jsxs21 } from "react/jsx-runtime";
3139
3144
  function SelectableOptionRow({
3140
3145
  selected,
@@ -3221,7 +3226,7 @@ function OptionMetaRow({ children }) {
3221
3226
  const items = Children.toArray(children).filter(Boolean);
3222
3227
  return /* @__PURE__ */ jsx31("div", { className: "clcosdk:flex clcosdk:min-w-0 clcosdk:items-center clcosdk:gap-1.5", children: items.map((item, index) => (
3223
3228
  // biome-ignore lint/suspicious/noArrayIndexKey: positional separators, and the list is caller-authored JSX.
3224
- /* @__PURE__ */ jsxs21(Fragment5, { children: [
3229
+ /* @__PURE__ */ jsxs21(Fragment6, { children: [
3225
3230
  index > 0 && /* @__PURE__ */ jsx31(MetaDot, {}),
3226
3231
  item
3227
3232
  ] }, index)
@@ -4242,7 +4247,7 @@ function useOndoBuyReviewViewModel({
4242
4247
  tokenMetadata: outputTokenMetadata
4243
4248
  }),
4244
4249
  outputAmount: assetAmount(
4245
- formatShareAmount(built.receiveOutputAmount, locale),
4250
+ formatAmount(built.receiveOutputAmount, locale),
4246
4251
  ondoSymbol
4247
4252
  ),
4248
4253
  recipientAddress: shortenAddress(active.wallet.address),
@@ -5061,7 +5066,7 @@ function toOrderConfirmedUi({
5061
5066
  tokenMetadata: outputTokenMetadata
5062
5067
  }),
5063
5068
  outputAmount: assetAmount(
5064
- formatShareAmount(order.transaction.receiveOutputAmount, locale),
5069
+ formatAmount(order.transaction.receiveOutputAmount, locale),
5065
5070
  ondoSymbol
5066
5071
  ),
5067
5072
  totalCost: assetAmount(
@@ -5311,9 +5316,9 @@ function MaxButton2({
5311
5316
 
5312
5317
  // src/client/components/checkout/ondo/sell/confirmation/OndoSellOrderConfirmed.tsx
5313
5318
  import { Check as Check2, ExternalLink as ExternalLink2 } from "lucide-react";
5314
- import { Fragment as Fragment6, jsx as jsx36, jsxs as jsxs25 } from "react/jsx-runtime";
5319
+ import { Fragment as Fragment7, jsx as jsx36, jsxs as jsxs25 } from "react/jsx-runtime";
5315
5320
  var TITLE7 = "Order confirmed";
5316
- var SHARES_SOLD_LABEL = "Shares sold";
5321
+ var SHARES_SOLD_CAPTION = "shares sold";
5317
5322
  var RECEIVED_LABEL = "Received";
5318
5323
  var PRICE_PER_SHARE_LABEL3 = "Price per share";
5319
5324
  var DELIVERED_TO_LABEL2 = "Delivered to";
@@ -5336,12 +5341,21 @@ function OndoSellOrderConfirmed({
5336
5341
  title: TITLE7,
5337
5342
  subtitle: subtitle2(state.soldAsset.symbol, state.proceedsSymbol),
5338
5343
  header: (
5339
- // The header names what was sold. The quantity is a detail row, so a
5340
- // long fund name and a long share count each get the full width.
5341
- /* @__PURE__ */ jsx36(AssetSummaryRow, { asset: state.soldAsset, wrapIdentity: true })
5344
+ // The asset row leads with what was *sold*, where the buy dialog
5345
+ // leads with what arrived. The proceeds are a detail row below,
5346
+ // because the position that changed is the thing the user is looking
5347
+ // for.
5348
+ /* @__PURE__ */ jsx36(
5349
+ AssetSummaryRow,
5350
+ {
5351
+ asset: state.soldAsset,
5352
+ value: state.soldAmount,
5353
+ caption: SHARES_SOLD_CAPTION
5354
+ }
5355
+ )
5342
5356
  ),
5343
5357
  rows: detailRows3(state),
5344
- actions: /* @__PURE__ */ jsxs25(Fragment6, { children: [
5358
+ actions: /* @__PURE__ */ jsxs25(Fragment7, { children: [
5345
5359
  /* @__PURE__ */ jsx36(ClButton, { variant: "gradient", fullWidth: true, onClick: onClose, children: DONE_LABEL2 }),
5346
5360
  /* @__PURE__ */ jsx36(ExplorerLink2, { url: state.txExplorerUrl })
5347
5361
  ] }),
@@ -5352,7 +5366,6 @@ function OndoSellOrderConfirmed({
5352
5366
  }
5353
5367
  function detailRows3(state) {
5354
5368
  return [
5355
- { label: SHARES_SOLD_LABEL, value: state.soldAmount },
5356
5369
  { label: RECEIVED_LABEL, value: state.proceeds },
5357
5370
  { label: PRICE_PER_SHARE_LABEL3, value: state.pricePerShare },
5358
5371
  { label: DELIVERED_TO_LABEL2, value: state.recipientAddress }
@@ -6674,7 +6687,7 @@ function toOrderConfirmedUi2({
6674
6687
  tokenMetadata: inputTokenMetadata
6675
6688
  }),
6676
6689
  soldAmount: assetAmount(
6677
- formatShareAmount(order.transaction.spendInputAmount, locale),
6690
+ formatAmount(order.transaction.spendInputAmount, locale),
6678
6691
  ondoSymbol
6679
6692
  ),
6680
6693
  // The expected proceeds rather than the floor: this dialog reports a sale
@@ -6910,10 +6923,10 @@ function MaxButton3({ onClick }) {
6910
6923
 
6911
6924
  // src/client/components/checkout/superstate/swap/confirmation/SuperstateOrderConfirmed.tsx
6912
6925
  import { Check as Check3, ExternalLink as ExternalLink3 } from "lucide-react";
6913
- import { Fragment as Fragment7, jsx as jsx41, jsxs as jsxs29 } from "react/jsx-runtime";
6926
+ import { Fragment as Fragment8, jsx as jsx41, jsxs as jsxs29 } from "react/jsx-runtime";
6914
6927
  var TITLE10 = "Order confirmed";
6915
6928
  var TOTAL_COST_LABEL2 = "Total cost";
6916
- var SHARES_RECEIVED_LABEL2 = "Shares received";
6929
+ var SHARES_RECEIVED_LABEL = "Shares received";
6917
6930
  var SHARES_RECEIVED_ESTIMATED_LABEL = "Shares received (estimated)";
6918
6931
  var PRICE_PER_SHARE_LABEL5 = "Price per share";
6919
6932
  var PRICE_PER_SHARE_ESTIMATED_LABEL = "Price per share (estimated)";
@@ -6936,9 +6949,15 @@ function SuperstateOrderConfirmed({
6936
6949
  icon: /* @__PURE__ */ jsx41(SuccessGlyph3, {}),
6937
6950
  title: TITLE10,
6938
6951
  subtitle: subtitle3(state.asset.symbol),
6939
- header: /* @__PURE__ */ jsx41(AssetSummaryRow, { asset: state.asset, wrapIdentity: true }),
6952
+ header: /* @__PURE__ */ jsx41(
6953
+ AssetSummaryRow,
6954
+ {
6955
+ asset: state.asset,
6956
+ caption: `Issued by ${state.issuer}`
6957
+ }
6958
+ ),
6940
6959
  rows: detailRows4(state),
6941
- actions: /* @__PURE__ */ jsxs29(Fragment7, { children: [
6960
+ actions: /* @__PURE__ */ jsxs29(Fragment8, { children: [
6942
6961
  /* @__PURE__ */ jsx41(ClButton, { variant: "gradient", fullWidth: true, onClick: onClose, children: DONE_LABEL3 }),
6943
6962
  /* @__PURE__ */ jsx41(ExplorerLink3, { url: state.txExplorerUrl })
6944
6963
  ] }),
@@ -6952,7 +6971,7 @@ function detailRows4(state) {
6952
6971
  return [
6953
6972
  { label: TOTAL_COST_LABEL2, value: state.totalCost },
6954
6973
  {
6955
- label: confirmed ? SHARES_RECEIVED_LABEL2 : SHARES_RECEIVED_ESTIMATED_LABEL,
6974
+ label: confirmed ? SHARES_RECEIVED_LABEL : SHARES_RECEIVED_ESTIMATED_LABEL,
6956
6975
  value: state.outputAmount
6957
6976
  },
6958
6977
  {
@@ -9024,6 +9043,7 @@ function toOrderConfirmedUi3({
9024
9043
  networkName: getNetworkName(chain),
9025
9044
  iconUrl: assetIconUrl
9026
9045
  }),
9046
+ issuer: SUPERSTATE_ISSUER_NAME,
9027
9047
  outputAmount: assetAmount(
9028
9048
  formatAmount(order.outputAmount, locale),
9029
9049
  order.outputAsset.symbol
@@ -9169,7 +9189,7 @@ function renderOndoSide(side, branches) {
9169
9189
  }
9170
9190
 
9171
9191
  // src/client/components/design-system/ThemedImage.tsx
9172
- import { Fragment as Fragment8, jsx as jsx49, jsxs as jsxs35 } from "react/jsx-runtime";
9192
+ import { Fragment as Fragment9, jsx as jsx49, jsxs as jsxs35 } from "react/jsx-runtime";
9173
9193
  function ThemedImage({
9174
9194
  light,
9175
9195
  dark,
@@ -9194,7 +9214,7 @@ function ThemedImage({
9194
9214
  }
9195
9215
  );
9196
9216
  }
9197
- return /* @__PURE__ */ jsxs35(Fragment8, { children: [
9217
+ return /* @__PURE__ */ jsxs35(Fragment9, { children: [
9198
9218
  /* @__PURE__ */ jsx49(
9199
9219
  "img",
9200
9220
  {
@@ -10282,7 +10302,7 @@ function StepStatusIcon({ status, className }) {
10282
10302
  }
10283
10303
 
10284
10304
  // src/client/components/requirements/RequirementItem.tsx
10285
- import { Fragment as Fragment9, jsx as jsx59, jsxs as jsxs41 } from "react/jsx-runtime";
10305
+ import { Fragment as Fragment10, jsx as jsx59, jsxs as jsxs41 } from "react/jsx-runtime";
10286
10306
  var DEFAULT_PENDING = "Under review. We'll notify you when complete.";
10287
10307
  var DEFAULT_REJECTED = "Verification rejected.";
10288
10308
  var SUPPORT_LINK = "Contact support";
@@ -10337,7 +10357,7 @@ function RejectedMessage({
10337
10357
  return message;
10338
10358
  }
10339
10359
  if (linkAt === -1) {
10340
- return /* @__PURE__ */ jsxs41(Fragment9, { children: [
10360
+ return /* @__PURE__ */ jsxs41(Fragment10, { children: [
10341
10361
  message,
10342
10362
  " ",
10343
10363
  /* @__PURE__ */ jsx59(
@@ -10352,7 +10372,7 @@ function RejectedMessage({
10352
10372
  "."
10353
10373
  ] });
10354
10374
  }
10355
- return /* @__PURE__ */ jsxs41(Fragment9, { children: [
10375
+ return /* @__PURE__ */ jsxs41(Fragment10, { children: [
10356
10376
  message.slice(0, linkAt),
10357
10377
  /* @__PURE__ */ jsx59(
10358
10378
  "button",
@@ -10375,7 +10395,7 @@ function WalletActionZone({
10375
10395
  onRemoveWallet
10376
10396
  }) {
10377
10397
  if (multiWallet) {
10378
- return /* @__PURE__ */ jsxs41(Fragment9, { children: [
10398
+ return /* @__PURE__ */ jsxs41(Fragment10, { children: [
10379
10399
  /* @__PURE__ */ jsx59(
10380
10400
  ConnectedWalletList,
10381
10401
  {
@@ -10396,7 +10416,7 @@ function WalletActionZone({
10396
10416
  }
10397
10417
  if (status === "completed") {
10398
10418
  const connected = connectedWallets[0];
10399
- return /* @__PURE__ */ jsxs41(Fragment9, { children: [
10419
+ return /* @__PURE__ */ jsxs41(Fragment10, { children: [
10400
10420
  onAction !== null && /* @__PURE__ */ jsx59(
10401
10421
  ClButton,
10402
10422
  {
@@ -10429,7 +10449,7 @@ function WalletActionZone({
10429
10449
  ] });
10430
10450
  }
10431
10451
  if (status === "rejected") {
10432
- return /* @__PURE__ */ jsxs41(Fragment9, { children: [
10452
+ return /* @__PURE__ */ jsxs41(Fragment10, { children: [
10433
10453
  onAction !== null && /* @__PURE__ */ jsx59(ClButton, { size: "sm", className: "clcosdk:self-start", onClick: onAction, children: "Connect wallet" }),
10434
10454
  /* @__PURE__ */ jsx59(
10435
10455
  AlertBanner,
@@ -10551,7 +10571,7 @@ function RequirementItem({
10551
10571
  }
10552
10572
 
10553
10573
  // src/client/components/requirements/RequirementsChecklistView.tsx
10554
- import { Fragment as Fragment10, jsx as jsx60, jsxs as jsxs42 } from "react/jsx-runtime";
10574
+ import { Fragment as Fragment11, jsx as jsx60, jsxs as jsxs42 } from "react/jsx-runtime";
10555
10575
  function RequirementsChecklistView(props) {
10556
10576
  return /* @__PURE__ */ jsx60(CoinListStyleScope, { children: /* @__PURE__ */ jsx60(RequirementsChecklistViewBody, { ...props }) });
10557
10577
  }
@@ -10621,7 +10641,7 @@ function RequirementsChecklistViewBody({
10621
10641
  onClick: () => onEvent({ type: "ON_CONTINUE" }),
10622
10642
  children: "Continue"
10623
10643
  }
10624
- ) : /* @__PURE__ */ jsxs42(Fragment10, { children: [
10644
+ ) : /* @__PURE__ */ jsxs42(Fragment11, { children: [
10625
10645
  /* @__PURE__ */ jsx60("div", { className: "clcosdk:flex clcosdk:flex-col clcosdk:divide-y clcosdk:divide-divider", children: state.items.map((row, index) => /* @__PURE__ */ jsx60(
10626
10646
  RequirementItem,
10627
10647
  {
@@ -12230,7 +12250,7 @@ function toVerificationUi(verifyingRequirementId, statusById, identityVerificati
12230
12250
  }
12231
12251
 
12232
12252
  // src/client/components/requirements/RequirementsChecklistContainer.tsx
12233
- import { Fragment as Fragment11, jsx as jsx66, jsxs as jsxs46 } from "react/jsx-runtime";
12253
+ import { Fragment as Fragment12, jsx as jsx66, jsxs as jsxs46 } from "react/jsx-runtime";
12234
12254
  function RequirementsChecklistContainer({
12235
12255
  loading,
12236
12256
  error,
@@ -12242,7 +12262,7 @@ function RequirementsChecklistContainer({
12242
12262
  ...options,
12243
12263
  enabled
12244
12264
  });
12245
- return /* @__PURE__ */ jsxs46(Fragment11, { children: [
12265
+ return /* @__PURE__ */ jsxs46(Fragment12, { children: [
12246
12266
  /* @__PURE__ */ jsx66(
12247
12267
  RequirementsChecklistView,
12248
12268
  {
@@ -12253,7 +12273,7 @@ function RequirementsChecklistContainer({
12253
12273
  className
12254
12274
  }
12255
12275
  ),
12256
- state.type === "content" && /* @__PURE__ */ jsxs46(Fragment11, { children: [
12276
+ state.type === "content" && /* @__PURE__ */ jsxs46(Fragment12, { children: [
12257
12277
  /* @__PURE__ */ jsx66(
12258
12278
  TaxDocumentModalContainer,
12259
12279
  {