@coinlist-co/react 0.12.1-rc.df659d8 → 0.12.1-rc.e183ffd

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.
@@ -1,9 +1,9 @@
1
1
  import * as react from 'react';
2
2
  import { ReactNode, ButtonHTMLAttributes } from 'react';
3
- import { A as AuthorizationCode, C as CodeVerifier, L as Logger, W as WalletError, E as Erc20Namespace, a as EthereumChain, b as EvmContractAddress, B as BlockchainAmount, c as CoinListTokenSaleNamespace, O as OfferId, d as OfferOptionId, e as AssetId, P as Participation, f as CoinListTokenSaleNamespaceImpl, U as UniversalNamespaceContext, g as OndoNamespace, h as AssetSymbol, i as OfferSwapContract, j as OndoBuyTransaction, k as OndoSellTransaction, l as OndoSwapTransactionCore, m as OrderBookSide, n as OndoNamespaceImpl, S as SuperstateSwapNamespace, o as WalletsNamespace, p as Bps, q as EvmWalletAddress, r as SuperstateSwapNamespaceImpl, R as RequirementsNamespace, s as Requirement, t as RequirementsNamespaceImpl, u as Config, v as OAuthAccessToken, w as OffersNamespace, T as TokensNamespace, x as StablecoinSymbol, y as Erc20Asset, z as OfferDetail, D as TokenMetadata, F as OfferType, G as Offer, H as RequirementStatusInfo, I as RequirementType, J as RequirementStatusValue, K as OfferOptionAddress, M as RequirementId, N as KycLevelName, Q as DocumentSubmission, V as WalletChallengeType, X as PinoLoggerOptions, Y as OndoTradingStatus, Z as AssetDecimals, _ as BuildOndoBuyParams, $ as BuildOndoSellParams, a0 as OndoQuote, a1 as OndoQuoteSize, a2 as TokenIdentifier, a3 as OfferOptionAddressId, a4 as TokenLogo } from '../tokens-namespace-C-BxcYMj.cjs';
4
- export { a5 as DebugEvent, a6 as FrontlineEventId, a7 as HttpError, a8 as HttpResponse, a9 as KycToken, aa as LogBinding, ab as LogBindings, ac as LogCause, ad as LogLevel, ae as LogScope, af as LogValue, ag as ProductionLogLevel, ah as RedactedWalletError, ai as RequestId, aj as RpcFailureReason, ak as SafeEvent, al as SafeFields, am as UnredactedFields } from '../tokens-namespace-C-BxcYMj.cjs';
5
- import { P as PKCEConfig, E as EvmWallet, S as SwapQuote, A as AssetIconUrl, a as ShortenedWalletAddress, F as FormattedAmountAssetUi, b as FormattedPercentUi, T as TxExplorerUrl, C as ConnectWallet, N as NonEmptyArray } from '../collections-UYVlXbEh.cjs';
6
- export { B as BroadcastTxParams, c as EvmSigner, W as WriteContractParams } from '../collections-UYVlXbEh.cjs';
3
+ import { A as AuthorizationCode, C as CodeVerifier, L as Logger, W as WalletError, E as Erc20Namespace, a as EthereumChain, b as EvmContractAddress, B as BlockchainAmount, c as CoinListTokenSaleNamespace, O as OfferId, d as OfferOptionId, e as AssetId, P as Participation, f as CoinListTokenSaleNamespaceImpl, U as UniversalNamespaceContext, g as OndoNamespace, h as AssetSymbol, i as OfferSwapContract, j as OndoBuyTransaction, k as OndoSellTransaction, l as OndoSwapTransactionCore, m as OrderBookSide, n as OndoNamespaceImpl, S as SuperstateSwapNamespace, o as WalletsNamespace, p as Bps, q as EvmWalletAddress, r as SuperstateSwapNamespaceImpl, R as RequirementsNamespace, s as Requirement, t as RequirementsNamespaceImpl, u as Config, v as OAuthAccessToken, w as OffersNamespace, T as TokensNamespace, x as StablecoinSymbol, y as Erc20Asset, z as OfferDetail, D as TokenMetadata, F as OfferType, G as OndoSwapOfferDetail, H as CoinListTokenSaleOfferDetail, I as SuperstateSwapOfferDetail, J as Offer, K as RequirementStatusInfo, M as RequirementType, N as RequirementStatusValue, Q as OfferOptionAddress, V as RequirementId, X as KycLevelName, Y as DocumentSubmission, Z as WalletChallengeType, _ as PinoLoggerOptions, $ as OndoTradingStatus, a0 as AssetDecimals, a1 as BuildOndoBuyParams, a2 as BuildOndoSellParams, a3 as OndoQuote, a4 as OndoQuoteSize, a5 as TokenIdentifier, a6 as OfferOptionAddressId, a7 as TokenLogo } from '../tokens-namespace-CIWBtgt2.cjs';
4
+ export { a8 as DebugEvent, a9 as FrontlineEventId, aa as HttpError, ab as HttpResponse, ac as KycToken, ad as LogBinding, ae as LogBindings, af as LogCause, ag as LogLevel, ah as LogScope, ai as LogValue, aj as ProductionLogLevel, ak as RedactedWalletError, al as RequestId, am as RpcFailureReason, an as SafeEvent, ao as SafeFields, ap as UnredactedFields } from '../tokens-namespace-CIWBtgt2.cjs';
5
+ import { P as PKCEConfig, E as EvmWallet, S as SwapQuote, A as AssetIconUrl, a as ShortenedWalletAddress, F as FormattedAmountAssetUi, b as FormattedPercentUi, T as TxExplorerUrl, C as ConnectWallet, N as NonEmptyArray } from '../collections-Biy3pQQL.cjs';
6
+ export { B as BroadcastTxParams, c as EvmSigner, W as WriteContractParams } from '../collections-Biy3pQQL.cjs';
7
7
  import { Hash } from 'viem';
8
8
  import * as class_variance_authority_types from 'class-variance-authority/types';
9
9
  import { VariantProps } from 'class-variance-authority';
@@ -1518,7 +1518,7 @@ type OndoCheckoutConfig = {
1518
1518
  * Called only for an `ondo::swap` offer, when that branch is mounted. A
1519
1519
  * Superstate or token-sale checkout never runs it.
1520
1520
  */
1521
- symbol: (offer: OfferDetail) => AssetSymbol;
1521
+ symbol: (offer: OndoSwapOfferDetail) => AssetSymbol;
1522
1522
  /**
1523
1523
  * Which way the trade runs: `buy` invests in the asset, `sell` liquidates a
1524
1524
  * holding of it.
@@ -1564,7 +1564,7 @@ type SuperstateCheckoutConfig = {
1564
1564
  * offers returns `null`.
1565
1565
  */
1566
1566
  type CoinListTokenSaleCheckoutConfig = {
1567
- render: (offer: OfferDetail) => ReactNode;
1567
+ render: (offer: CoinListTokenSaleOfferDetail) => ReactNode;
1568
1568
  };
1569
1569
  /**
1570
1570
  * The parts of {@link CheckoutConfig} only the host can know.
@@ -2109,7 +2109,7 @@ declare function OndoBuyOrderConfirmed({ state, onEvent, className, }: OndoOrder
2109
2109
 
2110
2110
  interface OndoBuyCheckoutContainerProps {
2111
2111
  /** The offer being bought: names the asset and supplies its logo. */
2112
- offer: OfferDetail;
2112
+ offer: OndoSwapOfferDetail;
2113
2113
  /**
2114
2114
  * Ondo's API symbol for the asset, e.g. `AAPLon`.
2115
2115
  *
@@ -2541,7 +2541,7 @@ declare function OndoSellOrderConfirmed({ state, onEvent, className, }: OndoSell
2541
2541
 
2542
2542
  interface OndoSellCheckoutContainerProps {
2543
2543
  /** The offer being sold: names the asset and supplies its logo. */
2544
- offer: OfferDetail;
2544
+ offer: OndoSwapOfferDetail;
2545
2545
  /**
2546
2546
  * Ondo's API symbol for the asset, e.g. `TSLAon`.
2547
2547
  *
@@ -3094,7 +3094,7 @@ declare function SuperstateReviewView(props: SuperstateReviewViewProps): ReactNo
3094
3094
 
3095
3095
  interface SuperstateSwapCheckoutContainerProps {
3096
3096
  /** The offer being bought: names the asset, the window and the minimum. */
3097
- offer: OfferDetail;
3097
+ offer: SuperstateSwapOfferDetail;
3098
3098
  /**
3099
3099
  * The chain the order executes on: the balance reads, the approval and the
3100
3100
  * swap. The swap contract is looked up from it, so a chain with none
@@ -3201,7 +3201,8 @@ type OfferAssetCardUi = {
3201
3201
  name?: string;
3202
3202
  /** Absent when the list payload has no asset. Display form of `asset.code`. */
3203
3203
  symbol?: string;
3204
- logoUrl: string;
3204
+ /** Null when the offer carries no artwork; the card then omits the icon. */
3205
+ logoUrl: string | null;
3205
3206
  };
3206
3207
  declare const OfferAssetCardUi: {
3207
3208
  fromOffer: (offer: Offer) => OfferAssetCardUi;
@@ -3284,14 +3285,18 @@ declare function OffersGridContainer({ data, onOfferClick, enabled, ...viewProps
3284
3285
  * `name` as an h2 and renders the h2 only when the field is present. Prefer
3285
3286
  * {@link OfferSaleCardUi.fromDetail} when the host has a name. Missing logo
3286
3287
  * omits the icon — name and tagline only.
3288
+ *
3289
+ * `tagline` and `startsAt` are null for an offer that runs no sale window, an
3290
+ * Ondo swap: the card then omits the tagline and, with nothing to count down
3291
+ * to, reads as live.
3287
3292
  */
3288
3293
  type OfferSaleCardUi = {
3289
3294
  id: OfferId;
3290
3295
  /** Absent when the list payload has no display name; only `fromDetail` sets it. */
3291
3296
  name?: string;
3292
- tagline: string;
3293
- logoUrl: string;
3294
- startsAt: Date;
3297
+ tagline: string | null;
3298
+ logoUrl: string | null;
3299
+ startsAt: Date | null;
3295
3300
  endsAt: Date | null;
3296
3301
  };
3297
3302
  declare const OfferSaleCardUi: {
@@ -4470,7 +4475,7 @@ interface UseOndoBuyReviewViewModelOptions {
4470
4475
  * agrees with the reference panel beside it and a dropped poll cannot leave
4471
4476
  * the review unable to say what was bought.
4472
4477
  */
4473
- offer: OfferDetail;
4478
+ offer: OndoSwapOfferDetail;
4474
4479
  /**
4475
4480
  * Registry metadata for the bought asset; `null` falls back to the offer's
4476
4481
  * logo.
@@ -4538,7 +4543,7 @@ interface UseOndoBuyCheckoutViewModelOptions {
4538
4543
  * Fixed for the lifetime of the hook — see the note on
4539
4544
  * {@link useOndoBuyCheckoutViewModel} about switching offers.
4540
4545
  */
4541
- offer: OfferDetail;
4546
+ offer: OndoSwapOfferDetail;
4542
4547
  /**
4543
4548
  * Ondo's API symbol for the asset, e.g. `AAPLon`.
4544
4549
  *
@@ -4673,7 +4678,7 @@ interface UseOndoSellAmountViewModelOptions {
4673
4678
  * The offer being sold: supplies the asset's display name and its fallback
4674
4679
  * artwork.
4675
4680
  */
4676
- offer: OfferDetail;
4681
+ offer: OndoSwapOfferDetail;
4677
4682
  /**
4678
4683
  * Registry metadata for the sold asset; `null` falls back to the offer's
4679
4684
  * logo.
@@ -4912,7 +4917,7 @@ interface UseOndoSellCheckoutViewModelOptions {
4912
4917
  * Fixed for the lifetime of the hook — see the note on
4913
4918
  * {@link useOndoSellCheckoutViewModel} about switching offers.
4914
4919
  */
4915
- offer: OfferDetail;
4920
+ offer: OndoSwapOfferDetail;
4916
4921
  /**
4917
4922
  * Ondo's API symbol for the asset, e.g. `TSLAon`.
4918
4923
  *
@@ -5137,7 +5142,7 @@ declare function useOndoTradingStatus(options: UseOndoTradingStatusOptions): Use
5137
5142
 
5138
5143
  interface UseOndoSidebarViewModelOptions {
5139
5144
  /** Where the asset's identity comes from: name and logo. */
5140
- offer: OfferDetail;
5145
+ offer: OndoSwapOfferDetail;
5141
5146
  /** Ondo's API symbol, e.g. `AAPLon`. */
5142
5147
  ondoSymbol: AssetSymbol;
5143
5148
  /** The chain the order executes on, and so the network shown. */
@@ -5503,7 +5508,7 @@ declare function useSwapQuote(options: UseSwapQuoteOptions): UseSwapQuoteResult;
5503
5508
 
5504
5509
  interface UseSuperstateSidebarViewModelOptions {
5505
5510
  /** The offer being bought: names the asset, the window and the minimum. */
5506
- offer: OfferDetail;
5511
+ offer: SuperstateSwapOfferDetail;
5507
5512
  /** The chain the token lives on, which names the network row. */
5508
5513
  chain: EthereumChain;
5509
5514
  /**
@@ -5567,7 +5572,7 @@ interface UseSuperstateSwapCheckoutViewModelOptions {
5567
5572
  * Fixed for the lifetime of the hook — see the note on
5568
5573
  * {@link useSuperstateSwapCheckoutViewModel} about switching offers.
5569
5574
  */
5570
- offer: OfferDetail;
5575
+ offer: SuperstateSwapOfferDetail;
5571
5576
  /**
5572
5577
  * The chain the order executes on: the balance reads, the approval and the
5573
5578
  * swap. The swap contract is looked up from it; a chain with none deployed
@@ -6274,11 +6279,12 @@ declare function stablecoinIconUrl(symbol: StablecoinSymbol): AssetIconUrl;
6274
6279
  * The artwork an offer carries for the asset it sells, or `null` where it
6275
6280
  * carries none.
6276
6281
  *
6277
- * Frontline publishes a missing logo as an empty string rather than omitting
6278
- * the field, so the absent case has to be recognised rather than merely
6279
- * falsy-checked into a `""` that renders as a broken image. Every consumer
6280
- * wants the same answer, and writing the convention out at each of them is how
6281
- * one of them ends up disagreeing.
6282
+ * A swap publishes without artwork, which `OfferDetail.fromDto` maps to
6283
+ * `null`. The empty string frontline has sent in its place is recognised here
6284
+ * too, because an `OfferDetail` need not have come through `fromDto` - a host
6285
+ * may build one - and a `""` that reaches an `<img>` renders as a broken
6286
+ * image. Every consumer wants the same answer, and writing the convention out
6287
+ * at each of them is how one of them ends up disagreeing.
6282
6288
  *
6283
6289
  * Absence is ordinary, not an error: `AssetIcon` renders a neutral placeholder
6284
6290
  * for `null`, which is what the offers grid already does.
@@ -1,9 +1,9 @@
1
1
  import * as react from 'react';
2
2
  import { ReactNode, ButtonHTMLAttributes } from 'react';
3
- import { A as AuthorizationCode, C as CodeVerifier, L as Logger, W as WalletError, E as Erc20Namespace, a as EthereumChain, b as EvmContractAddress, B as BlockchainAmount, c as CoinListTokenSaleNamespace, O as OfferId, d as OfferOptionId, e as AssetId, P as Participation, f as CoinListTokenSaleNamespaceImpl, U as UniversalNamespaceContext, g as OndoNamespace, h as AssetSymbol, i as OfferSwapContract, j as OndoBuyTransaction, k as OndoSellTransaction, l as OndoSwapTransactionCore, m as OrderBookSide, n as OndoNamespaceImpl, S as SuperstateSwapNamespace, o as WalletsNamespace, p as Bps, q as EvmWalletAddress, r as SuperstateSwapNamespaceImpl, R as RequirementsNamespace, s as Requirement, t as RequirementsNamespaceImpl, u as Config, v as OAuthAccessToken, w as OffersNamespace, T as TokensNamespace, x as StablecoinSymbol, y as Erc20Asset, z as OfferDetail, D as TokenMetadata, F as OfferType, G as Offer, H as RequirementStatusInfo, I as RequirementType, J as RequirementStatusValue, K as OfferOptionAddress, M as RequirementId, N as KycLevelName, Q as DocumentSubmission, V as WalletChallengeType, X as PinoLoggerOptions, Y as OndoTradingStatus, Z as AssetDecimals, _ as BuildOndoBuyParams, $ as BuildOndoSellParams, a0 as OndoQuote, a1 as OndoQuoteSize, a2 as TokenIdentifier, a3 as OfferOptionAddressId, a4 as TokenLogo } from '../tokens-namespace-C-BxcYMj.js';
4
- export { a5 as DebugEvent, a6 as FrontlineEventId, a7 as HttpError, a8 as HttpResponse, a9 as KycToken, aa as LogBinding, ab as LogBindings, ac as LogCause, ad as LogLevel, ae as LogScope, af as LogValue, ag as ProductionLogLevel, ah as RedactedWalletError, ai as RequestId, aj as RpcFailureReason, ak as SafeEvent, al as SafeFields, am as UnredactedFields } from '../tokens-namespace-C-BxcYMj.js';
5
- import { P as PKCEConfig, E as EvmWallet, S as SwapQuote, A as AssetIconUrl, a as ShortenedWalletAddress, F as FormattedAmountAssetUi, b as FormattedPercentUi, T as TxExplorerUrl, C as ConnectWallet, N as NonEmptyArray } from '../collections-C6b-rJpx.js';
6
- export { B as BroadcastTxParams, c as EvmSigner, W as WriteContractParams } from '../collections-C6b-rJpx.js';
3
+ import { A as AuthorizationCode, C as CodeVerifier, L as Logger, W as WalletError, E as Erc20Namespace, a as EthereumChain, b as EvmContractAddress, B as BlockchainAmount, c as CoinListTokenSaleNamespace, O as OfferId, d as OfferOptionId, e as AssetId, P as Participation, f as CoinListTokenSaleNamespaceImpl, U as UniversalNamespaceContext, g as OndoNamespace, h as AssetSymbol, i as OfferSwapContract, j as OndoBuyTransaction, k as OndoSellTransaction, l as OndoSwapTransactionCore, m as OrderBookSide, n as OndoNamespaceImpl, S as SuperstateSwapNamespace, o as WalletsNamespace, p as Bps, q as EvmWalletAddress, r as SuperstateSwapNamespaceImpl, R as RequirementsNamespace, s as Requirement, t as RequirementsNamespaceImpl, u as Config, v as OAuthAccessToken, w as OffersNamespace, T as TokensNamespace, x as StablecoinSymbol, y as Erc20Asset, z as OfferDetail, D as TokenMetadata, F as OfferType, G as OndoSwapOfferDetail, H as CoinListTokenSaleOfferDetail, I as SuperstateSwapOfferDetail, J as Offer, K as RequirementStatusInfo, M as RequirementType, N as RequirementStatusValue, Q as OfferOptionAddress, V as RequirementId, X as KycLevelName, Y as DocumentSubmission, Z as WalletChallengeType, _ as PinoLoggerOptions, $ as OndoTradingStatus, a0 as AssetDecimals, a1 as BuildOndoBuyParams, a2 as BuildOndoSellParams, a3 as OndoQuote, a4 as OndoQuoteSize, a5 as TokenIdentifier, a6 as OfferOptionAddressId, a7 as TokenLogo } from '../tokens-namespace-CIWBtgt2.js';
4
+ export { a8 as DebugEvent, a9 as FrontlineEventId, aa as HttpError, ab as HttpResponse, ac as KycToken, ad as LogBinding, ae as LogBindings, af as LogCause, ag as LogLevel, ah as LogScope, ai as LogValue, aj as ProductionLogLevel, ak as RedactedWalletError, al as RequestId, am as RpcFailureReason, an as SafeEvent, ao as SafeFields, ap as UnredactedFields } from '../tokens-namespace-CIWBtgt2.js';
5
+ import { P as PKCEConfig, E as EvmWallet, S as SwapQuote, A as AssetIconUrl, a as ShortenedWalletAddress, F as FormattedAmountAssetUi, b as FormattedPercentUi, T as TxExplorerUrl, C as ConnectWallet, N as NonEmptyArray } from '../collections-JfNDG8Tc.js';
6
+ export { B as BroadcastTxParams, c as EvmSigner, W as WriteContractParams } from '../collections-JfNDG8Tc.js';
7
7
  import { Hash } from 'viem';
8
8
  import * as class_variance_authority_types from 'class-variance-authority/types';
9
9
  import { VariantProps } from 'class-variance-authority';
@@ -1518,7 +1518,7 @@ type OndoCheckoutConfig = {
1518
1518
  * Called only for an `ondo::swap` offer, when that branch is mounted. A
1519
1519
  * Superstate or token-sale checkout never runs it.
1520
1520
  */
1521
- symbol: (offer: OfferDetail) => AssetSymbol;
1521
+ symbol: (offer: OndoSwapOfferDetail) => AssetSymbol;
1522
1522
  /**
1523
1523
  * Which way the trade runs: `buy` invests in the asset, `sell` liquidates a
1524
1524
  * holding of it.
@@ -1564,7 +1564,7 @@ type SuperstateCheckoutConfig = {
1564
1564
  * offers returns `null`.
1565
1565
  */
1566
1566
  type CoinListTokenSaleCheckoutConfig = {
1567
- render: (offer: OfferDetail) => ReactNode;
1567
+ render: (offer: CoinListTokenSaleOfferDetail) => ReactNode;
1568
1568
  };
1569
1569
  /**
1570
1570
  * The parts of {@link CheckoutConfig} only the host can know.
@@ -2109,7 +2109,7 @@ declare function OndoBuyOrderConfirmed({ state, onEvent, className, }: OndoOrder
2109
2109
 
2110
2110
  interface OndoBuyCheckoutContainerProps {
2111
2111
  /** The offer being bought: names the asset and supplies its logo. */
2112
- offer: OfferDetail;
2112
+ offer: OndoSwapOfferDetail;
2113
2113
  /**
2114
2114
  * Ondo's API symbol for the asset, e.g. `AAPLon`.
2115
2115
  *
@@ -2541,7 +2541,7 @@ declare function OndoSellOrderConfirmed({ state, onEvent, className, }: OndoSell
2541
2541
 
2542
2542
  interface OndoSellCheckoutContainerProps {
2543
2543
  /** The offer being sold: names the asset and supplies its logo. */
2544
- offer: OfferDetail;
2544
+ offer: OndoSwapOfferDetail;
2545
2545
  /**
2546
2546
  * Ondo's API symbol for the asset, e.g. `TSLAon`.
2547
2547
  *
@@ -3094,7 +3094,7 @@ declare function SuperstateReviewView(props: SuperstateReviewViewProps): ReactNo
3094
3094
 
3095
3095
  interface SuperstateSwapCheckoutContainerProps {
3096
3096
  /** The offer being bought: names the asset, the window and the minimum. */
3097
- offer: OfferDetail;
3097
+ offer: SuperstateSwapOfferDetail;
3098
3098
  /**
3099
3099
  * The chain the order executes on: the balance reads, the approval and the
3100
3100
  * swap. The swap contract is looked up from it, so a chain with none
@@ -3201,7 +3201,8 @@ type OfferAssetCardUi = {
3201
3201
  name?: string;
3202
3202
  /** Absent when the list payload has no asset. Display form of `asset.code`. */
3203
3203
  symbol?: string;
3204
- logoUrl: string;
3204
+ /** Null when the offer carries no artwork; the card then omits the icon. */
3205
+ logoUrl: string | null;
3205
3206
  };
3206
3207
  declare const OfferAssetCardUi: {
3207
3208
  fromOffer: (offer: Offer) => OfferAssetCardUi;
@@ -3284,14 +3285,18 @@ declare function OffersGridContainer({ data, onOfferClick, enabled, ...viewProps
3284
3285
  * `name` as an h2 and renders the h2 only when the field is present. Prefer
3285
3286
  * {@link OfferSaleCardUi.fromDetail} when the host has a name. Missing logo
3286
3287
  * omits the icon — name and tagline only.
3288
+ *
3289
+ * `tagline` and `startsAt` are null for an offer that runs no sale window, an
3290
+ * Ondo swap: the card then omits the tagline and, with nothing to count down
3291
+ * to, reads as live.
3287
3292
  */
3288
3293
  type OfferSaleCardUi = {
3289
3294
  id: OfferId;
3290
3295
  /** Absent when the list payload has no display name; only `fromDetail` sets it. */
3291
3296
  name?: string;
3292
- tagline: string;
3293
- logoUrl: string;
3294
- startsAt: Date;
3297
+ tagline: string | null;
3298
+ logoUrl: string | null;
3299
+ startsAt: Date | null;
3295
3300
  endsAt: Date | null;
3296
3301
  };
3297
3302
  declare const OfferSaleCardUi: {
@@ -4470,7 +4475,7 @@ interface UseOndoBuyReviewViewModelOptions {
4470
4475
  * agrees with the reference panel beside it and a dropped poll cannot leave
4471
4476
  * the review unable to say what was bought.
4472
4477
  */
4473
- offer: OfferDetail;
4478
+ offer: OndoSwapOfferDetail;
4474
4479
  /**
4475
4480
  * Registry metadata for the bought asset; `null` falls back to the offer's
4476
4481
  * logo.
@@ -4538,7 +4543,7 @@ interface UseOndoBuyCheckoutViewModelOptions {
4538
4543
  * Fixed for the lifetime of the hook — see the note on
4539
4544
  * {@link useOndoBuyCheckoutViewModel} about switching offers.
4540
4545
  */
4541
- offer: OfferDetail;
4546
+ offer: OndoSwapOfferDetail;
4542
4547
  /**
4543
4548
  * Ondo's API symbol for the asset, e.g. `AAPLon`.
4544
4549
  *
@@ -4673,7 +4678,7 @@ interface UseOndoSellAmountViewModelOptions {
4673
4678
  * The offer being sold: supplies the asset's display name and its fallback
4674
4679
  * artwork.
4675
4680
  */
4676
- offer: OfferDetail;
4681
+ offer: OndoSwapOfferDetail;
4677
4682
  /**
4678
4683
  * Registry metadata for the sold asset; `null` falls back to the offer's
4679
4684
  * logo.
@@ -4912,7 +4917,7 @@ interface UseOndoSellCheckoutViewModelOptions {
4912
4917
  * Fixed for the lifetime of the hook — see the note on
4913
4918
  * {@link useOndoSellCheckoutViewModel} about switching offers.
4914
4919
  */
4915
- offer: OfferDetail;
4920
+ offer: OndoSwapOfferDetail;
4916
4921
  /**
4917
4922
  * Ondo's API symbol for the asset, e.g. `TSLAon`.
4918
4923
  *
@@ -5137,7 +5142,7 @@ declare function useOndoTradingStatus(options: UseOndoTradingStatusOptions): Use
5137
5142
 
5138
5143
  interface UseOndoSidebarViewModelOptions {
5139
5144
  /** Where the asset's identity comes from: name and logo. */
5140
- offer: OfferDetail;
5145
+ offer: OndoSwapOfferDetail;
5141
5146
  /** Ondo's API symbol, e.g. `AAPLon`. */
5142
5147
  ondoSymbol: AssetSymbol;
5143
5148
  /** The chain the order executes on, and so the network shown. */
@@ -5503,7 +5508,7 @@ declare function useSwapQuote(options: UseSwapQuoteOptions): UseSwapQuoteResult;
5503
5508
 
5504
5509
  interface UseSuperstateSidebarViewModelOptions {
5505
5510
  /** The offer being bought: names the asset, the window and the minimum. */
5506
- offer: OfferDetail;
5511
+ offer: SuperstateSwapOfferDetail;
5507
5512
  /** The chain the token lives on, which names the network row. */
5508
5513
  chain: EthereumChain;
5509
5514
  /**
@@ -5567,7 +5572,7 @@ interface UseSuperstateSwapCheckoutViewModelOptions {
5567
5572
  * Fixed for the lifetime of the hook — see the note on
5568
5573
  * {@link useSuperstateSwapCheckoutViewModel} about switching offers.
5569
5574
  */
5570
- offer: OfferDetail;
5575
+ offer: SuperstateSwapOfferDetail;
5571
5576
  /**
5572
5577
  * The chain the order executes on: the balance reads, the approval and the
5573
5578
  * swap. The swap contract is looked up from it; a chain with none deployed
@@ -6274,11 +6279,12 @@ declare function stablecoinIconUrl(symbol: StablecoinSymbol): AssetIconUrl;
6274
6279
  * The artwork an offer carries for the asset it sells, or `null` where it
6275
6280
  * carries none.
6276
6281
  *
6277
- * Frontline publishes a missing logo as an empty string rather than omitting
6278
- * the field, so the absent case has to be recognised rather than merely
6279
- * falsy-checked into a `""` that renders as a broken image. Every consumer
6280
- * wants the same answer, and writing the convention out at each of them is how
6281
- * one of them ends up disagreeing.
6282
+ * A swap publishes without artwork, which `OfferDetail.fromDto` maps to
6283
+ * `null`. The empty string frontline has sent in its place is recognised here
6284
+ * too, because an `OfferDetail` need not have come through `fromDto` - a host
6285
+ * may build one - and a `""` that reaches an `<img>` renders as a broken
6286
+ * image. Every consumer wants the same answer, and writing the convention out
6287
+ * at each of them is how one of them ends up disagreeing.
6282
6288
  *
6283
6289
  * Absence is ordinary, not an error: `AssetIcon` renders a neutral placeholder
6284
6290
  * for `null`, which is what the offers grid already does.
@@ -5,7 +5,7 @@ import {
5
5
  SDK_LOGGER_NAME,
6
6
  loggerOverPino,
7
7
  publicClients
8
- } from "../chunk-I5EHOV7V.js";
8
+ } from "../chunk-DCW7NQXH.js";
9
9
  import {
10
10
  AuthorizationCode,
11
11
  CodeVerifier,
@@ -37,7 +37,7 @@ import {
37
37
  isSwapAvailable,
38
38
  superstateSwapContractAddress,
39
39
  swapSpender
40
- } from "../chunk-3EOK47CQ.js";
40
+ } from "../chunk-ONLH57LF.js";
41
41
  import {
42
42
  API_VERSION,
43
43
  AssetDecimals,
@@ -86,7 +86,7 @@ import {
86
86
  shortenAddress,
87
87
  txExplorerUrl,
88
88
  usdAmount
89
- } from "../chunk-VSYGGTI6.js";
89
+ } from "../chunk-MOE5S6CE.js";
90
90
 
91
91
  // src/client/CoinListProvider.tsx
92
92
  import {
@@ -3602,7 +3602,7 @@ function stablecoinIconUrl(symbol) {
3602
3602
  }
3603
3603
  }
3604
3604
  function offerIconUrl(offer) {
3605
- return offer.logoUrl === "" ? null : AssetIconUrl(offer.logoUrl);
3605
+ return offer.logoUrl ? AssetIconUrl(offer.logoUrl) : null;
3606
3606
  }
3607
3607
  function tokenLogoUrl(logo, minWidth = 40) {
3608
3608
  switch (logo.kind) {
@@ -9110,11 +9110,11 @@ function CheckoutContainer({
9110
9110
  enabled = true,
9111
9111
  className
9112
9112
  }) {
9113
- return renderOffer(offer.type, {
9114
- ondo: () => /* @__PURE__ */ jsx50(
9113
+ return renderOffer(offer, {
9114
+ ondo: (ondoOffer) => /* @__PURE__ */ jsx50(
9115
9115
  OndoCheckoutContainer,
9116
9116
  {
9117
- offer,
9117
+ offer: ondoOffer,
9118
9118
  chain,
9119
9119
  wallets,
9120
9120
  config: config["ondo::swap"],
@@ -9122,10 +9122,10 @@ function CheckoutContainer({
9122
9122
  className
9123
9123
  }
9124
9124
  ),
9125
- superstate: () => /* @__PURE__ */ jsx50(
9125
+ superstate: (superstateOffer) => /* @__PURE__ */ jsx50(
9126
9126
  SuperstateSwapCheckoutContainer,
9127
9127
  {
9128
- offer,
9128
+ offer: superstateOffer,
9129
9129
  chain,
9130
9130
  wallets,
9131
9131
  enabled,
@@ -9133,7 +9133,7 @@ function CheckoutContainer({
9133
9133
  className
9134
9134
  }
9135
9135
  ),
9136
- tokenSale: () => config["coinlist::token_sale"].render(offer)
9136
+ tokenSale: (tokenSaleOffer) => config["coinlist::token_sale"].render(tokenSaleOffer)
9137
9137
  });
9138
9138
  }
9139
9139
  function OndoCheckoutContainer({
@@ -9173,16 +9173,16 @@ function OndoCheckoutContainer({
9173
9173
  )
9174
9174
  });
9175
9175
  }
9176
- function renderOffer(type, branches) {
9177
- switch (type) {
9176
+ function renderOffer(offer, branches) {
9177
+ switch (offer.type) {
9178
9178
  case "ondo::swap":
9179
- return branches.ondo();
9179
+ return branches.ondo(offer);
9180
9180
  case "superstate::swap":
9181
- return branches.superstate();
9181
+ return branches.superstate(offer);
9182
9182
  case "coinlist::token_sale":
9183
- return branches.tokenSale();
9183
+ return branches.tokenSale(offer);
9184
9184
  default: {
9185
- const exhaustive = type;
9185
+ const exhaustive = offer;
9186
9186
  return exhaustive;
9187
9187
  }
9188
9188
  }
@@ -9667,20 +9667,31 @@ function useOffers(options = {}) {
9667
9667
  var OfferSaleCardUi = {
9668
9668
  fromOffer: (offer) => ({
9669
9669
  id: offer.id,
9670
- tagline: offer.tagline,
9670
+ ...saleWindow(offer),
9671
9671
  logoUrl: offer.logoUrl,
9672
- startsAt: offer.startsAt,
9673
9672
  endsAt: offer.endsAt
9674
9673
  }),
9675
9674
  fromDetail: (detail) => ({
9676
9675
  id: detail.id,
9677
9676
  name: detail.name,
9678
- tagline: detail.tagline,
9677
+ ...saleWindow(detail),
9679
9678
  logoUrl: detail.logoUrl,
9680
- startsAt: detail.startsAt,
9681
9679
  endsAt: detail.endsAt
9682
9680
  })
9683
9681
  };
9682
+ function saleWindow(offer) {
9683
+ switch (offer.type) {
9684
+ case "coinlist::token_sale":
9685
+ case "superstate::swap":
9686
+ return { tagline: offer.tagline, startsAt: offer.startsAt };
9687
+ case "ondo::swap":
9688
+ return { tagline: null, startsAt: null };
9689
+ default: {
9690
+ const exhaustive = offer;
9691
+ return exhaustive;
9692
+ }
9693
+ }
9694
+ }
9684
9695
 
9685
9696
  // src/client/hooks/offers/grid/useOffersGridViewModel.ts
9686
9697
  var NOT_AUTHENTICATED_MESSAGE = "Sign in to view available offers.";