@stridge/kit 0.1.0-alpha.24 → 0.1.0-alpha.26
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/README.md +4 -2
- package/dist/deposit/compound/index.d.ts +2 -2
- package/dist/drivers/stridge-mock/createStridgeMockWithdrawDriver.d.ts +1 -1
- package/dist/drivers/stridge-mock/fixtures.d.ts +7 -5
- package/dist/drivers/stridge-mock/fixtures.js +1 -1
- package/dist/flows/deposit/widgets/processing-state/ProcessingState.js +1 -1
- package/dist/flows/withdraw/widgets/withdraw-in-progress/WithdrawInProgress.d.ts +1 -1
- package/dist/flows/withdraw/widgets/withdraw-in-progress/WithdrawInProgress.js +1 -1
- package/dist/i18n/locales/ar.js +1 -1
- package/dist/i18n/locales/es.js +1 -1
- package/dist/i18n/locales/source-keys.d.ts +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/package.js +1 -1
- package/dist/shared/chains/index.d.ts +7 -35
- package/dist/shared/chains/index.js +1 -1
- package/dist/shared/widgets/processing-state/compound/ProcessingState.d.ts +1 -5
- package/dist/shared/widgets/processing-state/compound/ProcessingState.js +1 -1
- package/dist/shared/widgets/processing-state/compound/ProcessingState.slots.d.ts +0 -1
- package/dist/shared/widgets/processing-state/compound/ProcessingState.slots.js +1 -1
- package/dist/shared/widgets/processing-state/compound/ProcessingState.styles.js +1 -1
- package/dist/shared/widgets/processing-state/compound/components/Details.d.ts +6 -1
- package/dist/shared/widgets/processing-state/compound/components/Details.js +1 -1
- package/dist/shared/widgets/processing-state/compound/components/Header.d.ts +4 -3
- package/dist/shared/widgets/processing-state/compound/components/Header.js +1 -1
- package/dist/shared/widgets/processing-state/compound/components/Hero.js +1 -1
- package/dist/shared/widgets/processing-state/compound/components/Rows.js +1 -1
- package/dist/shared/widgets/processing-state/compound/components/StatusPill.js +1 -1
- package/dist/shared/widgets/processing-state/compound/index.d.ts +1 -1
- package/dist/shared/widgets/processing-state/compound/types.d.ts +1 -26
- package/dist/stridge/StridgeProvider.d.ts +12 -12
- package/dist/stridge/StridgeProvider.js +1 -1
- package/dist/withdraw/compound/index.d.ts +2 -2
- package/package.json +1 -1
- package/dist/shared/widgets/processing-state/compound/components/Actions.d.ts +0 -17
- package/dist/shared/widgets/processing-state/compound/components/Actions.js +0 -1
package/README.md
CHANGED
|
@@ -15,13 +15,15 @@ Peer dependencies: `react`, `react-dom`, `viem`. `wagmi` is optional — require
|
|
|
15
15
|
## Quick start
|
|
16
16
|
|
|
17
17
|
```tsx
|
|
18
|
-
import { StridgeProvider
|
|
18
|
+
import { StridgeProvider } from "@stridge/kit";
|
|
19
19
|
import { DepositDialog } from "@stridge/kit/deposit/dialog";
|
|
20
20
|
import { WithdrawDialog } from "@stridge/kit/withdraw/dialog";
|
|
21
21
|
|
|
22
22
|
<StridgeProvider
|
|
23
23
|
gatewayKey={process.env.NEXT_PUBLIC_STRIDGE_GATEWAY_KEY!}
|
|
24
|
-
|
|
24
|
+
// `networkId` is the Stridge network id, listed at
|
|
25
|
+
// https://api.stridge.com/v1/uda/supported-assets — "9006" is BSC.
|
|
26
|
+
asset={{ networkId: "9006", symbol: "USDC" }}
|
|
25
27
|
flows={{
|
|
26
28
|
deposit: {
|
|
27
29
|
// Required — where bridged funds settle (your treasury, or the customer's wallet
|
|
@@ -19,10 +19,10 @@ import { ASSET_PICKER_SLOTS, AssetPickerSlot } from "../../shared/widgets/asset-
|
|
|
19
19
|
import { ErrorStateActionsProps, ErrorStateAsset, ErrorStateAssetValueProps, ErrorStateBodyProps, ErrorStateDestination, ErrorStateDetailProps, ErrorStateDetailsProps, ErrorStateDialogProps, ErrorStateDisclosureChevronProps, ErrorStateHeaderProps, ErrorStateHelp, ErrorStateHelpInfoProps, ErrorStateHeroProps, ErrorStateMoreDetailsProps, ErrorStateProps, ErrorStateRowProps, ErrorStateSourceWallet, ErrorStateStatusValueProps, ErrorStateTxRef } from "../../shared/widgets/error-state/compound/types.js";
|
|
20
20
|
import { ErrorState } from "../../shared/widgets/error-state/compound/ErrorState.js";
|
|
21
21
|
import { ERROR_STATE_SLOTS, ErrorStateSlot } from "../../shared/widgets/error-state/compound/ErrorState.slots.js";
|
|
22
|
-
import {
|
|
22
|
+
import { ProcessingStateAsset, ProcessingStateBodyProps, ProcessingStateDetailProps, ProcessingStateDetailsProps, ProcessingStateDialogProps, ProcessingStateHeaderProps, ProcessingStateHeroProps, ProcessingStateProps, ProcessingStateRowProps, ProcessingStateSourceWallet, ProcessingStateStatusPillProps, ProcessingStateTxRef } from "../../shared/widgets/processing-state/compound/types.js";
|
|
23
23
|
import { ProcessingState } from "../../shared/widgets/processing-state/compound/ProcessingState.js";
|
|
24
24
|
import { PROCESSING_STATE_SLOTS, ProcessingStateSlot } from "../../shared/widgets/processing-state/compound/ProcessingState.slots.js";
|
|
25
25
|
import { SuccessStateActionsProps, SuccessStateAsset, SuccessStateAssetValueProps, SuccessStateBodyProps, SuccessStateDetailProps, SuccessStateDetailsProps, SuccessStateDialogProps, SuccessStateExplorer, SuccessStateHeaderProps, SuccessStateHeadlineProps, SuccessStateMoreDetailsProps, SuccessStateProps, SuccessStateRouteValueProps, SuccessStateRowProps, SuccessStateSourceWallet, SuccessStateStatusPillProps, SuccessStateTxRef } from "../../shared/widgets/success-state/compound/types.js";
|
|
26
26
|
import { SuccessState } from "../../shared/widgets/success-state/compound/SuccessState.js";
|
|
27
27
|
import { SUCCESS_STATE_SLOTS, SuccessStateSlot } from "../../shared/widgets/success-state/compound/SuccessState.slots.js";
|
|
28
|
-
export { AMOUNT_ENTRY_SLOTS, ASSET_PICKER_SLOTS, AmountEntry, AmountEntryBodyProps, AmountEntryDialogProps, AmountEntryFlowProps, AmountEntryFooterProps, AmountEntryHeaderProps, AmountEntryHeroProps, AmountEntryPercentPreset, AmountEntryPillsProps, AmountEntryProps, AmountEntrySlot, AmountEntryToken, AssetOption, AssetPicker, AssetPickerAssetProps, AssetPickerBodyProps, AssetPickerDialogProps, AssetPickerFooterProps, AssetPickerHeaderProps, AssetPickerListProps, AssetPickerProps, AssetPickerSlot, AssetPickerToken, CONFIRM_TRANSFER_SLOTS, ConfirmTransfer, ConfirmTransferAmountsProps, ConfirmTransferBodyProps, ConfirmTransferBreakdown, ConfirmTransferBreakdownPercentRow, ConfirmTransferBreakdownProps, ConfirmTransferBreakdownTextRow, ConfirmTransferBreakdownUsdRow, ConfirmTransferDialogProps, ConfirmTransferDisclaimerProps, ConfirmTransferFooterProps, ConfirmTransferHeaderProps, ConfirmTransferHeroProps, ConfirmTransferMetaProps, ConfirmTransferProps, ConfirmTransferSlot, ConfirmTransferToken, ConfirmTransferTransfer, DEPOSIT_SLOTS, DEPOSIT_STATUS_BANNER_SLOTS, Deposit, DepositBodyProps, DepositDialogProps, DepositHeaderProps, DepositMethodInput, DepositMethodOption, DepositMethodProps, DepositMethodsProps, DepositProps, DepositSlot, DepositStatusBanner, DepositStatusBannerAsset, DepositStatusBannerBodyProps, DepositStatusBannerCloseProps, DepositStatusBannerDetailProps, DepositStatusBannerDetailsProps, DepositStatusBannerFooterProps, DepositStatusBannerHeroProps, DepositStatusBannerKind, DepositStatusBannerPrimaryActionProps, DepositStatusBannerProps, DepositStatusBannerRowProps, DepositStatusBannerSlot, DepositStatusBannerToggleProps, DepositStatusBannerTxRef, ERROR_STATE_SLOTS, ErrorState, ErrorStateActionsProps, ErrorStateAsset, ErrorStateAssetValueProps, ErrorStateBodyProps, ErrorStateDestination, ErrorStateDetailProps, ErrorStateDetailsProps, ErrorStateDialogProps, ErrorStateDisclosureChevronProps, ErrorStateHeaderProps, ErrorStateHelp, ErrorStateHelpInfoProps, ErrorStateHeroProps, ErrorStateMoreDetailsProps, ErrorStateProps, ErrorStateRowProps, ErrorStateSlot, ErrorStateSourceWallet, ErrorStateStatusValueProps, ErrorStateTxRef, PROCESSING_STATE_SLOTS, ProcessingState,
|
|
28
|
+
export { AMOUNT_ENTRY_SLOTS, ASSET_PICKER_SLOTS, AmountEntry, AmountEntryBodyProps, AmountEntryDialogProps, AmountEntryFlowProps, AmountEntryFooterProps, AmountEntryHeaderProps, AmountEntryHeroProps, AmountEntryPercentPreset, AmountEntryPillsProps, AmountEntryProps, AmountEntrySlot, AmountEntryToken, AssetOption, AssetPicker, AssetPickerAssetProps, AssetPickerBodyProps, AssetPickerDialogProps, AssetPickerFooterProps, AssetPickerHeaderProps, AssetPickerListProps, AssetPickerProps, AssetPickerSlot, AssetPickerToken, CONFIRM_TRANSFER_SLOTS, ConfirmTransfer, ConfirmTransferAmountsProps, ConfirmTransferBodyProps, ConfirmTransferBreakdown, ConfirmTransferBreakdownPercentRow, ConfirmTransferBreakdownProps, ConfirmTransferBreakdownTextRow, ConfirmTransferBreakdownUsdRow, ConfirmTransferDialogProps, ConfirmTransferDisclaimerProps, ConfirmTransferFooterProps, ConfirmTransferHeaderProps, ConfirmTransferHeroProps, ConfirmTransferMetaProps, ConfirmTransferProps, ConfirmTransferSlot, ConfirmTransferToken, ConfirmTransferTransfer, DEPOSIT_SLOTS, DEPOSIT_STATUS_BANNER_SLOTS, Deposit, DepositBodyProps, DepositDialogProps, DepositHeaderProps, DepositMethodInput, DepositMethodOption, DepositMethodProps, DepositMethodsProps, DepositProps, DepositSlot, DepositStatusBanner, DepositStatusBannerAsset, DepositStatusBannerBodyProps, DepositStatusBannerCloseProps, DepositStatusBannerDetailProps, DepositStatusBannerDetailsProps, DepositStatusBannerFooterProps, DepositStatusBannerHeroProps, DepositStatusBannerKind, DepositStatusBannerPrimaryActionProps, DepositStatusBannerProps, DepositStatusBannerRowProps, DepositStatusBannerSlot, DepositStatusBannerToggleProps, DepositStatusBannerTxRef, ERROR_STATE_SLOTS, ErrorState, ErrorStateActionsProps, ErrorStateAsset, ErrorStateAssetValueProps, ErrorStateBodyProps, ErrorStateDestination, ErrorStateDetailProps, ErrorStateDetailsProps, ErrorStateDialogProps, ErrorStateDisclosureChevronProps, ErrorStateHeaderProps, ErrorStateHelp, ErrorStateHelpInfoProps, ErrorStateHeroProps, ErrorStateMoreDetailsProps, ErrorStateProps, ErrorStateRowProps, ErrorStateSlot, ErrorStateSourceWallet, ErrorStateStatusValueProps, ErrorStateTxRef, PROCESSING_STATE_SLOTS, ProcessingState, ProcessingStateAsset, ProcessingStateBodyProps, ProcessingStateDetailProps, ProcessingStateDetailsProps, ProcessingStateDialogProps, ProcessingStateHeaderProps, ProcessingStateHeroProps, ProcessingStateProps, ProcessingStateRowProps, ProcessingStateSlot, ProcessingStateSourceWallet, ProcessingStateStatusPillProps, ProcessingStateTxRef, SUCCESS_STATE_SLOTS, SuccessState, SuccessStateActionsProps, SuccessStateAsset, SuccessStateAssetValueProps, SuccessStateBodyProps, SuccessStateDetailProps, SuccessStateDetailsProps, SuccessStateDialogProps, SuccessStateExplorer, SuccessStateHeaderProps, SuccessStateHeadlineProps, SuccessStateMoreDetailsProps, SuccessStateProps, SuccessStateRouteValueProps, SuccessStateRowProps, SuccessStateSlot, SuccessStateSourceWallet, SuccessStateStatusPillProps, SuccessStateTxRef, TRANSFER_CRYPTO_SLOTS, TransferCrypto, TransferCryptoAsset, TransferCryptoBodyProps, TransferCryptoChain, TransferCryptoDialogProps, TransferCryptoDisclosureProps, TransferCryptoHeaderProps, TransferCryptoProps, TransferCryptoSlot, TransferCryptoToken };
|
|
@@ -93,7 +93,7 @@ interface CreateStridgeMockWithdrawDriverInput {
|
|
|
93
93
|
/**
|
|
94
94
|
* Settlement asset override — same shape as the deposit factory's `asset` field. Drives the
|
|
95
95
|
* withdrawable-balance row, the quote receive-side, and every settlement banner so the
|
|
96
|
-
* picker's `(
|
|
96
|
+
* picker's `(networkId, symbol)` is reflected end-to-end. Unknown combinations fall back to USDC
|
|
97
97
|
* on BSC via {@link resolveMockAsset}.
|
|
98
98
|
*/
|
|
99
99
|
asset?: MockAssetSelection;
|
|
@@ -16,7 +16,7 @@ declare const DEFAULT_WALLET_INFO: WalletInfo;
|
|
|
16
16
|
declare const DEFAULT_BRAND_PAYLOAD: BrandPayload;
|
|
17
17
|
/**
|
|
18
18
|
* Resolved destination-asset record the mock driver seeds every entity from. Hosts that need
|
|
19
|
-
* to demo a non-default `(
|
|
19
|
+
* to demo a non-default `(networkId, symbol)` pass {@link MockAssetSelection} through the factory;
|
|
20
20
|
* the driver resolves it once via {@link resolveMockAsset} and threads this shape into every
|
|
21
21
|
* builder, so target / quote / settlement payloads all stay coherent against the same asset.
|
|
22
22
|
*/
|
|
@@ -42,11 +42,13 @@ interface MockAsset {
|
|
|
42
42
|
nativeSymbol: string;
|
|
43
43
|
}
|
|
44
44
|
/**
|
|
45
|
-
* Selector accepted by {@link resolveMockAsset}. `
|
|
46
|
-
* (
|
|
45
|
+
* Selector accepted by {@link resolveMockAsset}. `networkId` is the Stridge network id
|
|
46
|
+
* (`"9006"`) — the same wire value `StridgeAsset.networkId` carries — and is also matched,
|
|
47
|
+
* case-insensitively, against the gateway's `network_name` (`"bsc"` / `"BSC"`) so legacy
|
|
48
|
+
* callers keep working. `symbol` is the asset ticker (`"USDC"`).
|
|
47
49
|
*/
|
|
48
50
|
interface MockAssetSelection {
|
|
49
|
-
|
|
51
|
+
networkId: string;
|
|
50
52
|
symbol: string;
|
|
51
53
|
}
|
|
52
54
|
/**
|
|
@@ -87,7 +89,7 @@ declare function buildDefaultBalances(i18n: I18n): ReadonlyArray<BalanceItemPayl
|
|
|
87
89
|
* Default quote payload. Captured production scenario: 5 USDC on Ethereum routed to the
|
|
88
90
|
* destination asset (USDC on BSC by default) via LIFI cross-chain. Total time around 28m on
|
|
89
91
|
* the wire — same number {@link DEFAULT_SUCCESS_PAYLOAD} uses for `totalTime`. Pass `asset` to
|
|
90
|
-
* retarget the receive side at a different `(
|
|
92
|
+
* retarget the receive side at a different `(networkId, symbol)` while keeping the same numeric
|
|
91
93
|
* route shape.
|
|
92
94
|
*/
|
|
93
95
|
declare function buildDefaultQuotePayload(i18n: I18n, expiresAt: number, asset?: MockAsset): QuotePayload;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{formatDurationCompact as e}from"../../shared/format/formatDurationCompact.js";import{formatPercent as t}from"../../shared/format/formatPercent.js";import{formatTimestamp as n}from"../../shared/format/formatTimestamp.js";import{formatTokenAmount as r}from"../../shared/format/formatTokenAmount.js";import{formatUsd as i}from"../../shared/format/formatUsd.js";import{shortenAddress as a}from"../../shared/format/shortenAddress.js";const o=`Stridge ACME`,s=`0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266`,c=`0x1d72b900dd9b4f9fb0e11c14978d9cbbff7b47db0b820911839aad7081f6b72a`,l=`0x268a11a1002eb7026e3a77999872695ee3a920e5c46172a43aa396da10ac5296`,u=`0xcae135e02df387bba14e231988126295a663c8d9f8e90c1ead5876cc2fee036d`,d=1778167499e3,f=1778169184e3,p=1778086787e3,m=1778087105e3,h=`0x8AC76a51cc950d9822D68b83fE1Ad97B32Cd580d`,g=`https://cdn.stridge.com/assets/usdc.svg`,_=`https://cdn.stridge.com/assets/usdt.svg`,v={1:`https://cdn.stridge.com/networks/60.svg`,8453:`https://cdn.stridge.com/networks/8453.svg`,42161:`https://cdn.stridge.com/networks/9001.svg`},y=`https://cdn.stridge.com/networks/9006.svg`,b=`https://cdn.stridge.com/networks/966.svg`,x=`0x166872371d1EB43B62c25861Bb7B1be4d5f09F56`,S={address:s,chainId:56},C={name:o},w={networkId:`9006`,networkName:`BSC`,eip155IdString:`56`,eip155IdNumber:56,chainLogoUrl:y,explorerBase:`https://bscscan.com`,symbol:`USDC`,decimals:18,address:h,assetLogoUrl:g,isNative:!1,nativeSymbol:`BNB`};function T(e){if(!e)return w;let t=e.chain.toLowerCase(),n=k.find(e=>e.networkName.toLowerCase()===t);if(!n)return w;let r=n.acceptedAssets.find(t=>t.symbol.toUpperCase()===e.symbol.toUpperCase());if(!r)return w;let i=n.acceptedAssets.find(e=>e.isNative);return{networkId:M[n.eip155Id]??n.eip155Id,networkName:n.networkName,eip155IdString:n.eip155Id,eip155IdNumber:Number(n.eip155Id),chainLogoUrl:n.chainLogoUrl,explorerBase:n.explorerBase,symbol:r.symbol,decimals:r.decimals,address:r.address,assetLogoUrl:r.assetLogoUrl??n.chainLogoUrl,isNative:r.isNative,nativeSymbol:i?.symbol??r.symbol}}function E(e=w){return{network_id:e.networkId,network_name:e.networkName,network_symbol:e.networkName.toLowerCase(),chain_type:`EVM`,eip155_id:e.eip155IdNumber,native_currency:{symbol:e.nativeSymbol,name:e.nativeSymbol,decimals:18,logo:e.chainLogoUrl},assets:[{symbol:e.symbol,decimals:e.decimals,address:e.address,logo:e.assetLogoUrl}]}}const D=E();function O(e,t,n=w){return{networkId:n.networkId,networkName:n.networkName,eip155Id:n.eip155IdString,chainLogoUrl:n.chainLogoUrl,symbol:n.symbol,decimals:n.decimals,address:n.address,assetLogoUrl:n.assetLogoUrl,isNative:n.isNative,...t===void 0?{}:{minDepositUsd:{value:t,formatted:i(t,e)}}}}const k=[{eip155Id:`1`,networkName:`Ethereum`,chainLogoUrl:v[1],explorerBase:`https://etherscan.io`,acceptedAssets:[{symbol:`ETH`,address:``,decimals:18,isNative:!0,assetLogoUrl:v[1]},{symbol:`TUSD`,address:`0x0000000000085d4780B73119b644AE5ecd22b376`,decimals:18,isNative:!1,assetLogoUrl:`https://cdn.stridge.com/assets/tusd.svg`},{symbol:`PAXG`,address:`0x45804880De22913dAFE09f4980848ECE6EcbAf78`,decimals:18,isNative:!1,assetLogoUrl:`https://cdn.stridge.com/assets/paxg.svg`},{symbol:`DAI`,address:`0x6B175474E89094C44Da98b954EedeAC495271d0F`,decimals:18,isNative:!1,assetLogoUrl:`https://cdn.stridge.com/assets/dai.svg`},{symbol:`PYUSD`,address:`0x6c3ea9036406852006290770BEdFcAbA0e23A0e8`,decimals:6,isNative:!1,assetLogoUrl:`https://cdn.stridge.com/assets/pyusd.svg`},{symbol:`USDC`,address:`0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48`,decimals:6,isNative:!1,assetLogoUrl:`https://cdn.stridge.com/assets/usdc.svg`},{symbol:`WETH`,address:`0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2`,decimals:18,isNative:!1,assetLogoUrl:`https://cdn.stridge.com/assets/weth.svg`},{symbol:`USDT`,address:`0xdAC17F958D2ee523a2206206994597C13D831ec7`,decimals:6,isNative:!1,assetLogoUrl:_}]},{eip155Id:`56`,networkName:`BSC`,chainLogoUrl:y,explorerBase:`https://bscscan.com`,acceptedAssets:[{symbol:`BNB`,address:``,decimals:18,isNative:!0,assetLogoUrl:y},{symbol:`WETH`,address:`0x2170Ed0880ac9A755fd29B2688956BD959F933F8`,decimals:18,isNative:!1,assetLogoUrl:`https://cdn.stridge.com/assets/weth.svg`},{symbol:`TUSD`,address:`0x40af3827F39D0EAcBF4A168f8D4ee67c121D11c9`,decimals:18,isNative:!1,assetLogoUrl:`https://cdn.stridge.com/assets/tusd.svg`},{symbol:`USDT`,address:`0x55d398326f99059fF775485246999027B3197955`,decimals:18,isNative:!1,assetLogoUrl:_},{symbol:`USDC`,address:h,decimals:18,isNative:!1,assetLogoUrl:g}]},{eip155Id:`8453`,networkName:`Base`,chainLogoUrl:v[8453],explorerBase:`https://basescan.org`,acceptedAssets:[{symbol:`ETH`,address:``,decimals:18,isNative:!0,assetLogoUrl:v[8453]},{symbol:`WETH`,address:`0x4200000000000000000000000000000000000006`,decimals:18,isNative:!1,assetLogoUrl:`https://cdn.stridge.com/assets/weth.svg`},{symbol:`DAI`,address:`0x50c5725949A6F0c72E6C4a641F24049A917DB0Cb`,decimals:18,isNative:!1,assetLogoUrl:`https://cdn.stridge.com/assets/dai.svg`},{symbol:`USDC`,address:`0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913`,decimals:6,isNative:!1,assetLogoUrl:`https://cdn.stridge.com/assets/usdc.svg`},{symbol:`USDT`,address:`0xfde4C96c8593536E31F229EA8f37b2ADa2699bb2`,decimals:6,isNative:!1,assetLogoUrl:_}]},{eip155Id:`42161`,networkName:`Arbitrum`,chainLogoUrl:v[42161],explorerBase:`https://arbiscan.io`,acceptedAssets:[{symbol:`ETH`,address:``,decimals:18,isNative:!0,assetLogoUrl:v[42161]},{symbol:`TUSD`,address:`0x4D15a3A2286D883AF0AA1B3f21367843FAc63E07`,decimals:18,isNative:!1,assetLogoUrl:`https://cdn.stridge.com/assets/tusd.svg`},{symbol:`WETH`,address:`0x82aF49447D8a07e3bd95BD0d56f35241523fBab1`,decimals:18,isNative:!1,assetLogoUrl:`https://cdn.stridge.com/assets/weth.svg`},{symbol:`USDC`,address:`0xaf88d065e77c8cC2239327C5EDb3A432268e5831`,decimals:6,isNative:!1,assetLogoUrl:`https://cdn.stridge.com/assets/usdc.svg`},{symbol:`DAI`,address:`0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1`,decimals:18,isNative:!1,assetLogoUrl:`https://cdn.stridge.com/assets/dai.svg`},{symbol:`USDT`,address:`0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9`,decimals:6,isNative:!1,assetLogoUrl:_}]},{eip155Id:`137`,networkName:`Polygon`,chainLogoUrl:b,explorerBase:`https://polygonscan.com`,acceptedAssets:[{symbol:`POL`,address:``,decimals:18,isNative:!0,assetLogoUrl:b},{symbol:`TUSD`,address:`0x2e1AD108fF1D8C782fcBbB89AAd783aC49586756`,decimals:18,isNative:!1,assetLogoUrl:`https://cdn.stridge.com/assets/tusd.svg`},{symbol:`USDC`,address:`0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359`,decimals:6,isNative:!1,assetLogoUrl:`https://cdn.stridge.com/assets/usdc.svg`},{symbol:`WETH`,address:`0x7ceB23fD6bC0adD59E62ac25578270cFf1b9f619`,decimals:18,isNative:!1,assetLogoUrl:`https://cdn.stridge.com/assets/weth.svg`},{symbol:`DAI`,address:`0x8f3Cf7ad23Cd3CaDbD9735AFf958023239c6A063`,decimals:18,isNative:!1,assetLogoUrl:`https://cdn.stridge.com/assets/dai.svg`},{symbol:`USDT`,address:`0xc2132D05D31c914a87C6611C10748AEb04B58e8F`,decimals:6,isNative:!1,assetLogoUrl:_}]}];function A(e,t){let n=t===void 0?{}:{minDepositUsd:{value:t,formatted:i(t,e)}};return k.map(({eip155Id:e,networkName:t,chainLogoUrl:r,explorerBase:i,acceptedAssets:o})=>({eip155Id:e,networkName:t,chainLogoUrl:r,address:{value:x,formatted:a(x)},explorerUrl:`${i}/address/${x}`,acceptedAssets:o,...n}))}const j=k.map(({eip155Id:e,networkName:t,chainLogoUrl:n,explorerBase:r,acceptedAssets:i})=>({eip155Id:e,networkName:t,chainLogoUrl:n,address:{value:x,formatted:a(x)},explorerUrl:`${r}/address/${x}`,acceptedAssets:i})),M={1:`60`,56:`9006`,137:`9001`,8453:`8453`,42161:`42161`};function N(){return{assets:k.map(e=>{let t=e.acceptedAssets.find(e=>e.isNative),n=e.acceptedAssets.filter(e=>!e.isNative);return{eip155_id:Number(e.eip155Id),network_id:M[e.eip155Id]??e.eip155Id,network_name:e.networkName.toLowerCase(),network_symbol:e.networkName.toLowerCase(),chain_type:`EVM`,assets:n.map(e=>({address:e.address,decimals:e.decimals,logo:e.assetLogoUrl??``,name:e.symbol,symbol:e.symbol})),native_currency:{symbol:t?.symbol??``,name:t?.symbol??``,decimals:t?.decimals??18,logo:t?.assetLogoUrl??e.chainLogoUrl}}})}}function P(e){return[{networkId:`9006`,networkName:`BSC`,eip155Id:`56`,symbol:`USDC`,decimals:18,address:h,assetLogoUrl:g,chainLogoUrl:y,isNative:!1,amount:{value:42.805864,formatted:r(42.805864,e,{compact:!0})},amountUsd:{value:42.81,formatted:i(42.81,e)},priceUsd:1},{networkId:`9006`,networkName:`BSC`,eip155Id:`56`,symbol:`BNB`,decimals:18,address:``,assetLogoUrl:y,chainLogoUrl:y,isNative:!0,amount:{value:.016699,formatted:r(.016699,e,{compact:!0})},amountUsd:{value:10.86,formatted:i(10.86,e)},priceUsd:650.41},{networkId:`60`,networkName:`Ethereum`,eip155Id:`1`,symbol:`USDT`,decimals:6,address:`0xdAC17F958D2ee523a2206206994597C13D831ec7`,assetLogoUrl:_,chainLogoUrl:v[1],isNative:!1,amount:{value:.757479,formatted:r(.757479,e,{compact:!0})},amountUsd:{value:.76,formatted:i(.76,e)},priceUsd:1,lowBalance:!0,disabled:!0},{networkId:`9006`,networkName:`BSC`,eip155Id:`56`,symbol:`USDT`,decimals:18,address:`0x55d398326f99059fF775485246999027B3197955`,assetLogoUrl:_,chainLogoUrl:y,isNative:!1,amount:{value:.595218,formatted:r(.595218,e,{compact:!0})},amountUsd:{value:.6,formatted:i(.6,e)},priceUsd:1,lowBalance:!0,disabled:!0},{networkId:`60`,networkName:`Ethereum`,eip155Id:`1`,symbol:`ETH`,decimals:18,address:``,assetLogoUrl:v[1],chainLogoUrl:v[1],isNative:!0,amount:{value:167e-6,formatted:r(167e-6,e,{compact:!0})},amountUsd:{value:.39,formatted:i(.39,e)},priceUsd:2316.86,lowBalance:!0,disabled:!0},{networkId:`60`,networkName:`Ethereum`,eip155Id:`1`,symbol:`USDC`,decimals:6,address:`0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48`,assetLogoUrl:`https://cdn.stridge.com/assets/usdc.svg`,chainLogoUrl:v[1],isNative:!1,amount:{value:.10408,formatted:r(.10408,e,{compact:!0})},amountUsd:{value:.1,formatted:i(.1,e)},priceUsd:1,lowBalance:!0,disabled:!0}]}function F(e,n,a=w){return{heroAmountUsd:{value:1.999758,formatted:i(1.999758,e)},sendAsset:{symbol:`USDC`,decimals:6,address:`0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48`,assetLogoUrl:`https://cdn.stridge.com/assets/usdc.svg`,isNative:!1,chainId:1,networkName:`Ethereum`,eip155Id:`1`,chainLogoUrl:v[1]},sendAmount:{value:2,formatted:r(2,e)},receiveAsset:{symbol:a.symbol,decimals:a.decimals,address:a.address,assetLogoUrl:a.assetLogoUrl,isNative:a.isNative,chainId:a.eip155IdNumber,networkName:a.networkName,eip155Id:a.eip155IdString,chainLogoUrl:a.chainLogoUrl},receiveAmount:{value:1.9958,formatted:r(1.9958,e)},quoteTotalSeconds:30,expiresAt:n,etaSeconds:30,breakdown:{selectedRoute:{provider:`lifi`,scenario:`cross_chain_diff_token`,label:`LIFI · cross chain diff token`},networkCost:{value:.0042,formatted:i(.0042,e)},priceImpact:{value:.21,formatted:t(.21,e)}}}}function I(e,t=w){return{kind:`pending`,sourceWallet:{name:`Wallet`,address:{value:s,formatted:a(s)},explorerUrl:`https://etherscan.io/address/${s}`},creditedAsset:{symbol:t.symbol,decimals:t.decimals,address:t.address,assetLogoUrl:t.assetLogoUrl,isNative:t.isNative},creditedTo:o,txHash:{value:c,formatted:a(c)},txExplorerUrl:`https://etherscan.io/tx/${c}`,detectedAt:{value:d,formatted:n(d,e)},submittedAt:{value:d,formatted:n(d,e)},receiveAmount:{value:4.983615,formatted:r(4.983615,e)}}}function L(t,i=w){let u=f-d;return{kind:`succeeded`,sourceWallet:{name:`Wallet`,address:{value:s,formatted:a(s)},explorerUrl:`https://etherscan.io/address/${s}`},destination:{name:o,address:{value:s,formatted:a(s)}},creditedAsset:{symbol:i.symbol,decimals:i.decimals,address:i.address,assetLogoUrl:i.assetLogoUrl,isNative:i.isNative},receiveAmount:{value:4.983615,formatted:r(4.983615,t)},routeHops:[{provider:`LIFI`,chainId:1},{provider:`LIFI`,chainId:i.eip155IdNumber}],totalTime:{value:u,formatted:e(u,t)},depositTx:{hash:{value:c,formatted:a(c)},explorerUrl:`https://etherscan.io/tx/${c}`},completionTx:{hash:{value:l,formatted:a(l)},explorerUrl:`${i.explorerBase}/tx/${l}`},submittedAt:{value:d,formatted:n(d,t)},filledAt:{value:f,formatted:n(f,t)}}}function R(e,t=`execution-reverted`,i=w){return{kind:`failed`,failureKind:t,sourceWallet:{name:`Wallet`,address:{value:s,formatted:a(s)},explorerUrl:`https://etherscan.io/address/${s}`},destination:{name:o,address:{value:s,formatted:a(s)}},creditedAsset:{symbol:i.symbol,decimals:i.decimals,address:i.address,assetLogoUrl:i.assetLogoUrl,isNative:i.isNative},receiveAmount:{value:0,formatted:r(0,e)},txHash:{value:u,formatted:a(u)},txExplorerUrl:`https://etherscan.io/tx/${u}`,submittedAt:{value:p,formatted:n(p,e)},failedAt:{value:m,formatted:n(m,e)}}}function z(e,t=S){let n=P(e).reduce((e,t)=>e+(t.amountUsd?.value??0),0);return{address:{value:t.address,formatted:a(t.address)},...t.chainId===void 0?{}:{chainId:t.chainId},balanceTotalUsd:{value:n,formatted:i(n,e)}}}const B={deposit_addresses:[],metadata:{brand_name:o}},V=[],H={assets:[]},U={chains:[]},W={},G={id:`mock-settlement`,status:`completed`,created_at:new Date(d).toISOString(),updated_at:new Date(f).toISOString()},K={settlements:[],is_terminal:!1};function q(e,t,n,r){return t===`pending`?I(e,n&&typeof n!=`string`?n:void 0):t===`succeeded`?L(e,n&&typeof n!=`string`?n:void 0):R(e,typeof n==`string`?n:void 0,r)}export{j as DEFAULT_ADDRESSES_PAYLOAD,C as DEFAULT_BRAND_PAYLOAD,w as DEFAULT_MOCK_ASSET,D as DEFAULT_TARGET_RAW,S as DEFAULT_WALLET_INFO,V as STUB_DEPOSIT_ADDRESSES_RAW,K as STUB_GATEWAY_POLL_RESPONSE,G as STUB_GATEWAY_SETTLEMENT_DTO,B as STUB_GATEWAY_START_RESPONSE,U as STUB_ONCHAIN_BALANCE_RESPONSE,W as STUB_QUOTE_RESPONSE,H as STUB_SUPPORTED_ASSETS_RESPONSE,A as buildDefaultAddressesPayload,P as buildDefaultBalances,R as buildDefaultFailurePayload,I as buildDefaultPendingPayload,F as buildDefaultQuotePayload,L as buildDefaultSuccessPayload,N as buildDefaultSupportedAssetsResponse,O as buildDefaultTargetPayload,E as buildDefaultTargetRaw,z as buildDefaultWalletPayload,q as buildSettlementPayload,T as resolveMockAsset};
|
|
1
|
+
import{formatDurationCompact as e}from"../../shared/format/formatDurationCompact.js";import{formatPercent as t}from"../../shared/format/formatPercent.js";import{formatTimestamp as n}from"../../shared/format/formatTimestamp.js";import{formatTokenAmount as r}from"../../shared/format/formatTokenAmount.js";import{formatUsd as i}from"../../shared/format/formatUsd.js";import{shortenAddress as a}from"../../shared/format/shortenAddress.js";const o=`Stridge ACME`,s=`0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266`,c=`0x1d72b900dd9b4f9fb0e11c14978d9cbbff7b47db0b820911839aad7081f6b72a`,l=`0x268a11a1002eb7026e3a77999872695ee3a920e5c46172a43aa396da10ac5296`,u=`0xcae135e02df387bba14e231988126295a663c8d9f8e90c1ead5876cc2fee036d`,d=1778167499e3,f=1778169184e3,p=1778086787e3,m=1778087105e3,h=`0x8AC76a51cc950d9822D68b83fE1Ad97B32Cd580d`,g=`https://cdn.stridge.com/assets/usdc.svg`,_=`https://cdn.stridge.com/assets/usdt.svg`,v={1:`https://cdn.stridge.com/networks/60.svg`,8453:`https://cdn.stridge.com/networks/8453.svg`,42161:`https://cdn.stridge.com/networks/9001.svg`},y=`https://cdn.stridge.com/networks/9006.svg`,b=`https://cdn.stridge.com/networks/966.svg`,x=`0x166872371d1EB43B62c25861Bb7B1be4d5f09F56`,S={address:s,chainId:56},C={name:o},w={networkId:`9006`,networkName:`BSC`,eip155IdString:`56`,eip155IdNumber:56,chainLogoUrl:y,explorerBase:`https://bscscan.com`,symbol:`USDC`,decimals:18,address:h,assetLogoUrl:g,isNative:!1,nativeSymbol:`BNB`};function T(e){if(!e)return w;let t=e.networkId.toLowerCase(),n=k.find(n=>n.networkName.toLowerCase()===t||(M[n.eip155Id]??n.eip155Id)===e.networkId);if(!n)return w;let r=n.acceptedAssets.find(t=>t.symbol.toUpperCase()===e.symbol.toUpperCase());if(!r)return w;let i=n.acceptedAssets.find(e=>e.isNative);return{networkId:M[n.eip155Id]??n.eip155Id,networkName:n.networkName,eip155IdString:n.eip155Id,eip155IdNumber:Number(n.eip155Id),chainLogoUrl:n.chainLogoUrl,explorerBase:n.explorerBase,symbol:r.symbol,decimals:r.decimals,address:r.address,assetLogoUrl:r.assetLogoUrl??n.chainLogoUrl,isNative:r.isNative,nativeSymbol:i?.symbol??r.symbol}}function E(e=w){return{network_id:e.networkId,network_name:e.networkName,network_symbol:e.networkName.toLowerCase(),chain_type:`EVM`,eip155_id:e.eip155IdNumber,native_currency:{symbol:e.nativeSymbol,name:e.nativeSymbol,decimals:18,logo:e.chainLogoUrl},assets:[{symbol:e.symbol,decimals:e.decimals,address:e.address,logo:e.assetLogoUrl}]}}const D=E();function O(e,t,n=w){return{networkId:n.networkId,networkName:n.networkName,eip155Id:n.eip155IdString,chainLogoUrl:n.chainLogoUrl,symbol:n.symbol,decimals:n.decimals,address:n.address,assetLogoUrl:n.assetLogoUrl,isNative:n.isNative,...t===void 0?{}:{minDepositUsd:{value:t,formatted:i(t,e)}}}}const k=[{eip155Id:`1`,networkName:`Ethereum`,chainLogoUrl:v[1],explorerBase:`https://etherscan.io`,acceptedAssets:[{symbol:`ETH`,address:``,decimals:18,isNative:!0,assetLogoUrl:v[1]},{symbol:`TUSD`,address:`0x0000000000085d4780B73119b644AE5ecd22b376`,decimals:18,isNative:!1,assetLogoUrl:`https://cdn.stridge.com/assets/tusd.svg`},{symbol:`PAXG`,address:`0x45804880De22913dAFE09f4980848ECE6EcbAf78`,decimals:18,isNative:!1,assetLogoUrl:`https://cdn.stridge.com/assets/paxg.svg`},{symbol:`DAI`,address:`0x6B175474E89094C44Da98b954EedeAC495271d0F`,decimals:18,isNative:!1,assetLogoUrl:`https://cdn.stridge.com/assets/dai.svg`},{symbol:`PYUSD`,address:`0x6c3ea9036406852006290770BEdFcAbA0e23A0e8`,decimals:6,isNative:!1,assetLogoUrl:`https://cdn.stridge.com/assets/pyusd.svg`},{symbol:`USDC`,address:`0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48`,decimals:6,isNative:!1,assetLogoUrl:`https://cdn.stridge.com/assets/usdc.svg`},{symbol:`WETH`,address:`0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2`,decimals:18,isNative:!1,assetLogoUrl:`https://cdn.stridge.com/assets/weth.svg`},{symbol:`USDT`,address:`0xdAC17F958D2ee523a2206206994597C13D831ec7`,decimals:6,isNative:!1,assetLogoUrl:_}]},{eip155Id:`56`,networkName:`BSC`,chainLogoUrl:y,explorerBase:`https://bscscan.com`,acceptedAssets:[{symbol:`BNB`,address:``,decimals:18,isNative:!0,assetLogoUrl:y},{symbol:`WETH`,address:`0x2170Ed0880ac9A755fd29B2688956BD959F933F8`,decimals:18,isNative:!1,assetLogoUrl:`https://cdn.stridge.com/assets/weth.svg`},{symbol:`TUSD`,address:`0x40af3827F39D0EAcBF4A168f8D4ee67c121D11c9`,decimals:18,isNative:!1,assetLogoUrl:`https://cdn.stridge.com/assets/tusd.svg`},{symbol:`USDT`,address:`0x55d398326f99059fF775485246999027B3197955`,decimals:18,isNative:!1,assetLogoUrl:_},{symbol:`USDC`,address:h,decimals:18,isNative:!1,assetLogoUrl:g}]},{eip155Id:`8453`,networkName:`Base`,chainLogoUrl:v[8453],explorerBase:`https://basescan.org`,acceptedAssets:[{symbol:`ETH`,address:``,decimals:18,isNative:!0,assetLogoUrl:v[8453]},{symbol:`WETH`,address:`0x4200000000000000000000000000000000000006`,decimals:18,isNative:!1,assetLogoUrl:`https://cdn.stridge.com/assets/weth.svg`},{symbol:`DAI`,address:`0x50c5725949A6F0c72E6C4a641F24049A917DB0Cb`,decimals:18,isNative:!1,assetLogoUrl:`https://cdn.stridge.com/assets/dai.svg`},{symbol:`USDC`,address:`0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913`,decimals:6,isNative:!1,assetLogoUrl:`https://cdn.stridge.com/assets/usdc.svg`},{symbol:`USDT`,address:`0xfde4C96c8593536E31F229EA8f37b2ADa2699bb2`,decimals:6,isNative:!1,assetLogoUrl:_}]},{eip155Id:`42161`,networkName:`Arbitrum`,chainLogoUrl:v[42161],explorerBase:`https://arbiscan.io`,acceptedAssets:[{symbol:`ETH`,address:``,decimals:18,isNative:!0,assetLogoUrl:v[42161]},{symbol:`TUSD`,address:`0x4D15a3A2286D883AF0AA1B3f21367843FAc63E07`,decimals:18,isNative:!1,assetLogoUrl:`https://cdn.stridge.com/assets/tusd.svg`},{symbol:`WETH`,address:`0x82aF49447D8a07e3bd95BD0d56f35241523fBab1`,decimals:18,isNative:!1,assetLogoUrl:`https://cdn.stridge.com/assets/weth.svg`},{symbol:`USDC`,address:`0xaf88d065e77c8cC2239327C5EDb3A432268e5831`,decimals:6,isNative:!1,assetLogoUrl:`https://cdn.stridge.com/assets/usdc.svg`},{symbol:`DAI`,address:`0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1`,decimals:18,isNative:!1,assetLogoUrl:`https://cdn.stridge.com/assets/dai.svg`},{symbol:`USDT`,address:`0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9`,decimals:6,isNative:!1,assetLogoUrl:_}]},{eip155Id:`137`,networkName:`Polygon`,chainLogoUrl:b,explorerBase:`https://polygonscan.com`,acceptedAssets:[{symbol:`POL`,address:``,decimals:18,isNative:!0,assetLogoUrl:b},{symbol:`TUSD`,address:`0x2e1AD108fF1D8C782fcBbB89AAd783aC49586756`,decimals:18,isNative:!1,assetLogoUrl:`https://cdn.stridge.com/assets/tusd.svg`},{symbol:`USDC`,address:`0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359`,decimals:6,isNative:!1,assetLogoUrl:`https://cdn.stridge.com/assets/usdc.svg`},{symbol:`WETH`,address:`0x7ceB23fD6bC0adD59E62ac25578270cFf1b9f619`,decimals:18,isNative:!1,assetLogoUrl:`https://cdn.stridge.com/assets/weth.svg`},{symbol:`DAI`,address:`0x8f3Cf7ad23Cd3CaDbD9735AFf958023239c6A063`,decimals:18,isNative:!1,assetLogoUrl:`https://cdn.stridge.com/assets/dai.svg`},{symbol:`USDT`,address:`0xc2132D05D31c914a87C6611C10748AEb04B58e8F`,decimals:6,isNative:!1,assetLogoUrl:_}]}];function A(e,t){let n=t===void 0?{}:{minDepositUsd:{value:t,formatted:i(t,e)}};return k.map(({eip155Id:e,networkName:t,chainLogoUrl:r,explorerBase:i,acceptedAssets:o})=>({eip155Id:e,networkName:t,chainLogoUrl:r,address:{value:x,formatted:a(x)},explorerUrl:`${i}/address/${x}`,acceptedAssets:o,...n}))}const j=k.map(({eip155Id:e,networkName:t,chainLogoUrl:n,explorerBase:r,acceptedAssets:i})=>({eip155Id:e,networkName:t,chainLogoUrl:n,address:{value:x,formatted:a(x)},explorerUrl:`${r}/address/${x}`,acceptedAssets:i})),M={1:`60`,56:`9006`,137:`966`,8453:`8453`,42161:`9001`};function N(){return{assets:k.map(e=>{let t=e.acceptedAssets.find(e=>e.isNative),n=e.acceptedAssets.filter(e=>!e.isNative);return{eip155_id:Number(e.eip155Id),network_id:M[e.eip155Id]??e.eip155Id,network_name:e.networkName.toLowerCase(),network_symbol:e.networkName.toLowerCase(),chain_type:`EVM`,assets:n.map(e=>({address:e.address,decimals:e.decimals,logo:e.assetLogoUrl??``,name:e.symbol,symbol:e.symbol})),native_currency:{symbol:t?.symbol??``,name:t?.symbol??``,decimals:t?.decimals??18,logo:t?.assetLogoUrl??e.chainLogoUrl}}})}}function P(e){return[{networkId:`9006`,networkName:`BSC`,eip155Id:`56`,symbol:`USDC`,decimals:18,address:h,assetLogoUrl:g,chainLogoUrl:y,isNative:!1,amount:{value:42.805864,formatted:r(42.805864,e,{compact:!0})},amountUsd:{value:42.81,formatted:i(42.81,e)},priceUsd:1},{networkId:`9006`,networkName:`BSC`,eip155Id:`56`,symbol:`BNB`,decimals:18,address:``,assetLogoUrl:y,chainLogoUrl:y,isNative:!0,amount:{value:.016699,formatted:r(.016699,e,{compact:!0})},amountUsd:{value:10.86,formatted:i(10.86,e)},priceUsd:650.41},{networkId:`60`,networkName:`Ethereum`,eip155Id:`1`,symbol:`USDT`,decimals:6,address:`0xdAC17F958D2ee523a2206206994597C13D831ec7`,assetLogoUrl:_,chainLogoUrl:v[1],isNative:!1,amount:{value:.757479,formatted:r(.757479,e,{compact:!0})},amountUsd:{value:.76,formatted:i(.76,e)},priceUsd:1,lowBalance:!0,disabled:!0},{networkId:`9006`,networkName:`BSC`,eip155Id:`56`,symbol:`USDT`,decimals:18,address:`0x55d398326f99059fF775485246999027B3197955`,assetLogoUrl:_,chainLogoUrl:y,isNative:!1,amount:{value:.595218,formatted:r(.595218,e,{compact:!0})},amountUsd:{value:.6,formatted:i(.6,e)},priceUsd:1,lowBalance:!0,disabled:!0},{networkId:`60`,networkName:`Ethereum`,eip155Id:`1`,symbol:`ETH`,decimals:18,address:``,assetLogoUrl:v[1],chainLogoUrl:v[1],isNative:!0,amount:{value:167e-6,formatted:r(167e-6,e,{compact:!0})},amountUsd:{value:.39,formatted:i(.39,e)},priceUsd:2316.86,lowBalance:!0,disabled:!0},{networkId:`60`,networkName:`Ethereum`,eip155Id:`1`,symbol:`USDC`,decimals:6,address:`0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48`,assetLogoUrl:`https://cdn.stridge.com/assets/usdc.svg`,chainLogoUrl:v[1],isNative:!1,amount:{value:.10408,formatted:r(.10408,e,{compact:!0})},amountUsd:{value:.1,formatted:i(.1,e)},priceUsd:1,lowBalance:!0,disabled:!0}]}function F(e,n,a=w){return{heroAmountUsd:{value:1.999758,formatted:i(1.999758,e)},sendAsset:{symbol:`USDC`,decimals:6,address:`0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48`,assetLogoUrl:`https://cdn.stridge.com/assets/usdc.svg`,isNative:!1,chainId:1,networkName:`Ethereum`,eip155Id:`1`,chainLogoUrl:v[1]},sendAmount:{value:2,formatted:r(2,e)},receiveAsset:{symbol:a.symbol,decimals:a.decimals,address:a.address,assetLogoUrl:a.assetLogoUrl,isNative:a.isNative,chainId:a.eip155IdNumber,networkName:a.networkName,eip155Id:a.eip155IdString,chainLogoUrl:a.chainLogoUrl},receiveAmount:{value:1.9958,formatted:r(1.9958,e)},quoteTotalSeconds:30,expiresAt:n,etaSeconds:30,breakdown:{selectedRoute:{provider:`lifi`,scenario:`cross_chain_diff_token`,label:`LIFI · cross chain diff token`},networkCost:{value:.0042,formatted:i(.0042,e)},priceImpact:{value:.21,formatted:t(.21,e)}}}}function I(e,t=w){return{kind:`pending`,sourceWallet:{name:`Wallet`,address:{value:s,formatted:a(s)},explorerUrl:`https://etherscan.io/address/${s}`},creditedAsset:{symbol:t.symbol,decimals:t.decimals,address:t.address,assetLogoUrl:t.assetLogoUrl,isNative:t.isNative},creditedTo:o,txHash:{value:c,formatted:a(c)},txExplorerUrl:`https://etherscan.io/tx/${c}`,detectedAt:{value:d,formatted:n(d,e)},submittedAt:{value:d,formatted:n(d,e)},receiveAmount:{value:4.983615,formatted:r(4.983615,e)}}}function L(t,i=w){let u=f-d;return{kind:`succeeded`,sourceWallet:{name:`Wallet`,address:{value:s,formatted:a(s)},explorerUrl:`https://etherscan.io/address/${s}`},destination:{name:o,address:{value:s,formatted:a(s)}},creditedAsset:{symbol:i.symbol,decimals:i.decimals,address:i.address,assetLogoUrl:i.assetLogoUrl,isNative:i.isNative},receiveAmount:{value:4.983615,formatted:r(4.983615,t)},routeHops:[{provider:`LIFI`,chainId:1},{provider:`LIFI`,chainId:i.eip155IdNumber}],totalTime:{value:u,formatted:e(u,t)},depositTx:{hash:{value:c,formatted:a(c)},explorerUrl:`https://etherscan.io/tx/${c}`},completionTx:{hash:{value:l,formatted:a(l)},explorerUrl:`${i.explorerBase}/tx/${l}`},submittedAt:{value:d,formatted:n(d,t)},filledAt:{value:f,formatted:n(f,t)}}}function R(e,t=`execution-reverted`,i=w){return{kind:`failed`,failureKind:t,sourceWallet:{name:`Wallet`,address:{value:s,formatted:a(s)},explorerUrl:`https://etherscan.io/address/${s}`},destination:{name:o,address:{value:s,formatted:a(s)}},creditedAsset:{symbol:i.symbol,decimals:i.decimals,address:i.address,assetLogoUrl:i.assetLogoUrl,isNative:i.isNative},receiveAmount:{value:0,formatted:r(0,e)},txHash:{value:u,formatted:a(u)},txExplorerUrl:`https://etherscan.io/tx/${u}`,submittedAt:{value:p,formatted:n(p,e)},failedAt:{value:m,formatted:n(m,e)}}}function z(e,t=S){let n=P(e).reduce((e,t)=>e+(t.amountUsd?.value??0),0);return{address:{value:t.address,formatted:a(t.address)},...t.chainId===void 0?{}:{chainId:t.chainId},balanceTotalUsd:{value:n,formatted:i(n,e)}}}const B={deposit_addresses:[],metadata:{brand_name:o}},V=[],H={assets:[]},U={chains:[]},W={},G={id:`mock-settlement`,status:`completed`,created_at:new Date(d).toISOString(),updated_at:new Date(f).toISOString()},K={settlements:[],is_terminal:!1};function q(e,t,n,r){return t===`pending`?I(e,n&&typeof n!=`string`?n:void 0):t===`succeeded`?L(e,n&&typeof n!=`string`?n:void 0):R(e,typeof n==`string`?n:void 0,r)}export{j as DEFAULT_ADDRESSES_PAYLOAD,C as DEFAULT_BRAND_PAYLOAD,w as DEFAULT_MOCK_ASSET,D as DEFAULT_TARGET_RAW,S as DEFAULT_WALLET_INFO,V as STUB_DEPOSIT_ADDRESSES_RAW,K as STUB_GATEWAY_POLL_RESPONSE,G as STUB_GATEWAY_SETTLEMENT_DTO,B as STUB_GATEWAY_START_RESPONSE,U as STUB_ONCHAIN_BALANCE_RESPONSE,W as STUB_QUOTE_RESPONSE,H as STUB_SUPPORTED_ASSETS_RESPONSE,A as buildDefaultAddressesPayload,P as buildDefaultBalances,R as buildDefaultFailurePayload,I as buildDefaultPendingPayload,F as buildDefaultQuotePayload,L as buildDefaultSuccessPayload,N as buildDefaultSupportedAssetsResponse,O as buildDefaultTargetPayload,E as buildDefaultTargetRaw,z as buildDefaultWalletPayload,q as buildSettlementPayload,T as resolveMockAsset};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{useDepositSnapshot as e}from"../../driver/context.js";import{useLingui as t}from"../../../../shared/i18n/useLingui.js";import"../../../../i18n/index.js";import{useDepositActions as n,useDepositEffectiveState as r}from"../../orchestrator/controller.js";import{shortenAddress as i}from"../../../../shared/format/shortenAddress.js";import{DialogShell as a}from"../../../../shared/dialog/DialogShell.js";import{ProcessingState as o}from"../../../../shared/widgets/processing-state/compound/ProcessingState.js";import"../../../../shared/widgets/processing-state/compound/index.js";import{jsx as s,jsxs as c}from"react/jsx-runtime";function l(a){let l=e(),u=r(),{back:d
|
|
1
|
+
"use client";import{useDepositSnapshot as e}from"../../driver/context.js";import{useLingui as t}from"../../../../shared/i18n/useLingui.js";import"../../../../i18n/index.js";import{useDepositActions as n,useDepositEffectiveState as r}from"../../orchestrator/controller.js";import{shortenAddress as i}from"../../../../shared/format/shortenAddress.js";import{DialogShell as a}from"../../../../shared/dialog/DialogShell.js";import{ProcessingState as o}from"../../../../shared/widgets/processing-state/compound/ProcessingState.js";import"../../../../shared/widgets/processing-state/compound/index.js";import{jsx as s,jsxs as c}from"react/jsx-runtime";function l(a){let l=e(),u=r(),{back:d}=n(),{_:f}=t();if(u.name!==`processing`)return null;let p=l.settlement,m=(p.status===`ready`||p.status===`stale`)&&p.payload.kind===`pending`?p.payload:void 0,h=l.brand,g=h.status===`ready`||h.status===`stale`?h.payload.name:void 0,_=l.target,v=_.status===`ready`||_.status===`stale`?_.payload:void 0,y=l.wallet,b=y.status===`ready`||y.status===`stale`?y.payload:void 0,x=!m||m.receiveAmount.value===0,S=m?m.receiveAmount.formatted:``,C=m?.creditedAsset.symbol??v?.symbol??``,w=m?.creditedTo||g||C,T=u.ctx.tx,E=m?.txHash?.formatted??(T.hash?i(T.hash):``),D=m?.txExplorerUrl??T.explorerUrl,O=m?.sourceWallet.name??f({id:`sb9Y58`,message:`Wallet`}),k=m?.sourceWallet.address.formatted??b?.address.formatted??``,A=m?.sourceWallet.explorerUrl,j=k?{name:O,address:k,...A?{explorerUrl:A}:{}}:void 0,M=E?{hash:E,...D?{explorerUrl:D}:{}}:void 0;return c(o,{...a,amount:S,creditedAsset:{symbol:C},creditedTo:w,...x?{loading:!0}:{},onBack:d,...j?{sourceWallet:j}:{},...M?{sourceTx:M}:{},...m?.submittedAt?{submittedAt:m.submittedAt.formatted}:{},...m?.detectedAt?{detectedAt:m.detectedAt.formatted}:{},children:[s(o.Header,{}),c(o.Body,{children:[s(o.Hero,{}),s(o.StatusPill,{}),c(o.Details,{children:[s(o.SourceRow,{}),s(o.SourceTxRow,{}),s(o.SubmittedAtRow,{}),s(o.DetectedAtRow,{})]})]})]})}function u({open:e,defaultOpen:t,onOpenChange:n,trigger:r,...i}){return s(a,{open:e,defaultOpen:t,onOpenChange:n,trigger:r,children:s(l,{...i})})}(function(e){e.Dialog=u})(l||={});export{l as ProcessingState};
|
|
@@ -5,7 +5,7 @@ import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
|
5
5
|
/**
|
|
6
6
|
* Orchestrated `WithdrawInProgress` widget. Composes the shared `ProcessingState` compound so
|
|
7
7
|
* the in-flight surface matches the deposit flow's processing screen 1:1 — same Hero / StatusPill /
|
|
8
|
-
* Details
|
|
8
|
+
* Details architecture. Withdraw-specific deltas:
|
|
9
9
|
*
|
|
10
10
|
* - No source-wallet row (the user IS the source); `<SourceRow>` is omitted.
|
|
11
11
|
* - The single broadcast hash is surfaced through `<SourceTxRow>` with the "Withdrawal tx" label.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{useLingui as e}from"../../../../shared/i18n/useLingui.js";import"../../../../i18n/index.js";import{useWithdrawSnapshot as t}from"../../driver/context.js";import{
|
|
1
|
+
"use client";import{useLingui as e}from"../../../../shared/i18n/useLingui.js";import"../../../../i18n/index.js";import{useWithdrawSnapshot as t}from"../../driver/context.js";import{useWithdrawEffectiveState as n}from"../../orchestrator/controller.js";import{formatTokenAmount as r}from"../../../../shared/format/formatTokenAmount.js";import{ProcessingState as i}from"../../../../shared/widgets/processing-state/compound/ProcessingState.js";import"../../../../shared/widgets/processing-state/compound/index.js";import{toAssetDescriptor as a}from"../../../../shared/widgets/asset-descriptor.js";import{jsx as o,jsxs as s}from"react/jsx-runtime";function c(c){let l=t(),u=n(),{_:d,i18n:f}=e(),p=l.settlement,m=(p.status===`ready`||p.status===`stale`)&&p.payload.kind===`pending`?p.payload:void 0;if(u.name!==`inProgress`)return null;let h=u.ctx.input,g=m?.txHash?.formatted,_=m?.txExplorerUrl,v=m?.recipient.formatted,y=m?.receiveAsset,b=m?.receiveAmount,x=b&&b.value>0?b.formatted:r(h.amount,f,{...y?.decimals===void 0?{}:{maxDecimals:y.decimals}}),S=y?.symbol??h.receiveTokenSymbol,C=a(y)??{symbol:S},w=l.quote,T=w.status===`ready`||w.status===`stale`?w.payload:void 0,E=m?.receiveAmountUsd?.formatted??T?.receiveAmountUsd?.formatted,D=g?{hash:g,explorerUrl:_}:void 0;return s(i,{...c,headerTitle:d({id:`w-2VR9`,message:`Withdrawal in progress…`}),amount:x,...E?{amountUsd:E}:{},creditedAsset:C,creditedTo:v,sourceTx:D,submittedAt:m?.submittedAt.formatted,children:[o(i.Header,{}),s(i.Body,{children:[o(i.Hero,{}),o(i.StatusPill,{}),s(i.Details,{children:[o(i.SourceTxRow,{label:d({id:`60ahSE`,message:`Withdrawal tx`})}),o(i.SubmittedAtRow,{})]})]})]})}export{c as WithdrawInProgress};
|
package/dist/i18n/locales/ar.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=JSON.parse(`{"--OGth":["نجح الإيداع"],"-nuEh_":["الوقت المُقدَّر"],"-tu7Q8":["المزيد عن ",["0"]],"02NghK":["Close this dialog and try again in a moment. If the problem persists, double-check the gateway key on your integration."],"0eg2g7":["جاري تقدير الغاز…"],"0lHlRj":["قيد النقل"],"2Eoi_a":["عرض التفاصيل"],"3dqPLT":["تحويل العملة الرقمية"],"3eKjkO":["الحد الأدنى للإيداع ",["formattedMin"]],"3kg1gB":["اكتمل الإيداع"],"3yd3IL":["The deposit driver failed to load gateway configuration."],"5AApJw":["اتصل بمحفظة للمتابعة"],"5joj8M":["تفاصيل المعاملة"],"60ahSE":["معاملة السحب"],"69Gavs":["Technical details"],"6D8qH6":["أرسل العملة المختارة على الشبكة المختارة إلى هذا العنوان. تظهر الأموال في حسابك بمجرد تأكيد الشبكة للتحويل."],"6RDwJM":["العملات"],"7Bj3x9":["فشل"],"7evBec":["وقت المعالجة: ",["resolvedProcessingTime"]],"88cUW-":["تستلم"],"9JHY2T":["تمت إضافة أموال إيداعك إلى حسابك."],"9XIJb8":["T…"],"9cCjMJ":["إيداع الحد الأقصى من الرصيد"],"< 1 min":["< دقيقة"],"AO44G_":["عرض الإيصال"],"AOPSKq":["إيداع ",["0"]],"AWtGgd":["احصل على المساعدة"],"AeXO77":["حساب"],"AeZIvT":["ستستلم"],"AikETk":["الحد الأدنى ",["minDeposit"]],"BhQhbU":["استخدم عنوان المستلم المقترح"],"CK1KXz":["الأقصى"],"Ck1xL4":["ترسل"],"D79cZK":["فوري"],"DPfwMq":["تم"],"Dd7jP5":["تواجه مشكلات؟"],"DoS2vD":["إخفاء التفاصيل التقنية"],"ELhVSL":["Failed to submit deposit."],"Ej5HL9":["Signature declined. Please try again."],"Enslfm":["الوجهة"],"G-SK3q":["واجهت الواجهة خطأً غير متوقع وتعذَّر إكمال العرض. حاول مرة أخرى، أو أغلق هذا الحوار وأعد المحاولة من التطبيق."],"GX8GKD":["الأصول"],"GZPxmc":["Enter Valid Recipient Address"],"GcuGHR":["تمت الإضافة إلى ",["captionSuffix"]],"GwkmPx":["تبديل المبلغ المعروض"],"
|
|
1
|
+
const e=JSON.parse(`{"--OGth":["نجح الإيداع"],"-nuEh_":["الوقت المُقدَّر"],"-tu7Q8":["المزيد عن ",["0"]],"02NghK":["Close this dialog and try again in a moment. If the problem persists, double-check the gateway key on your integration."],"0eg2g7":["جاري تقدير الغاز…"],"0lHlRj":["قيد النقل"],"2Eoi_a":["عرض التفاصيل"],"3dqPLT":["تحويل العملة الرقمية"],"3eKjkO":["الحد الأدنى للإيداع ",["formattedMin"]],"3kg1gB":["اكتمل الإيداع"],"3yd3IL":["The deposit driver failed to load gateway configuration."],"5AApJw":["اتصل بمحفظة للمتابعة"],"5joj8M":["تفاصيل المعاملة"],"60ahSE":["معاملة السحب"],"69Gavs":["Technical details"],"6D8qH6":["أرسل العملة المختارة على الشبكة المختارة إلى هذا العنوان. تظهر الأموال في حسابك بمجرد تأكيد الشبكة للتحويل."],"6RDwJM":["العملات"],"7Bj3x9":["فشل"],"7evBec":["وقت المعالجة: ",["resolvedProcessingTime"]],"88cUW-":["تستلم"],"9JHY2T":["تمت إضافة أموال إيداعك إلى حسابك."],"9XIJb8":["T…"],"9cCjMJ":["إيداع الحد الأقصى من الرصيد"],"< 1 min":["< دقيقة"],"AO44G_":["عرض الإيصال"],"AOPSKq":["إيداع ",["0"]],"AWtGgd":["احصل على المساعدة"],"AeXO77":["حساب"],"AeZIvT":["ستستلم"],"AikETk":["الحد الأدنى ",["minDeposit"]],"BhQhbU":["استخدم عنوان المستلم المقترح"],"CK1KXz":["الأقصى"],"Ck1xL4":["ترسل"],"D79cZK":["فوري"],"DPfwMq":["تم"],"Dd7jP5":["تواجه مشكلات؟"],"DoS2vD":["إخفاء التفاصيل التقنية"],"ELhVSL":["Failed to submit deposit."],"Ej5HL9":["Signature declined. Please try again."],"Enslfm":["الوجهة"],"G-SK3q":["واجهت الواجهة خطأً غير متوقع وتعذَّر إكمال العرض. حاول مرة أخرى، أو أغلق هذا الحوار وأعد المحاولة من التطبيق."],"GX8GKD":["الأصول"],"GZPxmc":["Enter Valid Recipient Address"],"GcuGHR":["تمت الإضافة إلى ",["captionSuffix"]],"GwkmPx":["تبديل المبلغ المعروض"],"IDt4jm":[["0","plural",{"one":["#"," second"],"other":["#"," seconds"]}]," left on quote"],"IRogzB":["تمت إضافة أموال إيداعك إلى ",["brand"],"."],"KDw4GX":["حاول مرة أخرى"],"KGoAE6":["تلقائي · ",["value"]],"KTNWsg":["فشل السحب"],"KuqCAK":["~ 2 دقيقة"],"LEbOpR":["مزيد من التفاصيل"],"Ly6geA":["جاري إعادة احتساب عرض السعر…"],"MZ_nQf":["عنوان المستلم"],"N2DUxS":["Insufficient Balance"],"OLF0i7":["Couldn't load deposit options"],"Offl0a":["ستُضاف أموال إيداعك إلى حسابك."],"Oi8TiZ":["عرض التقدم"],"OsyKSt":["سحب"],"P9fBwv":["Stack"],"PiH3UR":["تم النسخ!"],"Q12Rrs":["معاملة الإيداع"],"QU2cIs":["لديك أسئلة؟"],"Rxjdjn":["لم يكتمل الإيداع"],"SOVBoe":["نسخ عنوان الإيداع"],"SZRUQ4":["أقصى انزلاق سعري"],"Sjplg3":["عرض في المستكشف"],"SlfejT":["Error"],"TG4WOd":["ستُضاف أموال إيداعك إلى ",["brand"],"."],"TT0aVH":["تم إرسال الطلب"],"Uevt3L":["جاري تقدير العرض"],"UqHbdz":["إغلاق إشعار الإيداع قيد التنفيذ"],"V1fa9u":["عرض المزيد"],"VAZUpd":["فشل الطلب"],"WkRH60":["الحد الأدنى ",["0"]],"Wqz0SO":["رصيد منخفض"],"Z1WbO6":["الأموال آمنة على شبكة المصدر — تواصل مع الدعم للاسترجاع."],"ZqugiS":["الرصيد: ",["0"]," ",["1"]],"_girqu":["نجح السحب"],"_kXBrK":["إجمالي الوقت"],"a2WllD":["العملة المستلمة"],"aiEUrg":["إظهار التفاصيل التقنية"],"bOZXx5":["تحديث الطلب"],"bZnukT":["تكلفة الشبكة"],"c6Bl9M":["Toggle technical details"],"cGYrpE":["تطبَّق الشروط"],"cHPbBJ":["تعذَّر على الجسر تمويل معاملة الوجهة (نفد رصيد الغاز)."],"cxR5Qy":["معاملة التسوية"],"e3xU5E":["تم استلام الإيداع"],"fKSGnu":["الحد الأدنى للمبلغ المطلوب على هذه الشبكة لتغطية رسوم الشبكة والتوجيه."],"fWsBTs":["حدث خطأ. حاول مرة أخرى."],"flMR3h":["تم سحب أموالك بنجاح."],"g2UNkE":["مشغل بواسطة"],"gfh8CC":["الشبكات"],"hKMHs1":["الفرق بين الناتج المتوقع للمسار وسعر السوق الأوسط الأساسي."],"he3ygx":["نسخ"],"hehnjM":["المبلغ"],"i-4Fbp":["فشل الإيداع"],"i-EgW-":["التكلفة التقديرية لبث هذه المعاملة على سلسلة الوجهة."],"iH8pgl":["رجوع"],"junZX6":["تم استلام الإيداع وجاري المعالجة…"],"kH6wUX":["تأثير السعر"],"kR8ayx":["بالنقر على تأكيد الإيداع، فإنك توافق على <0>الشروط</0>."],"kUFhUv":["Withdrawal failed."],"kj3M8S":["إيداع"],"kjrq_8":["مزيد من المعلومات"],"lOEm_1":["تم تنفيذ الطلب"],"ldK3jJ":["Failed to submit withdrawal."],"lxjao1":["مسار السيولة المختار المستخدم لتسوية هذا السحب."],"mgLWEL":["تراجعت معاملة الوجهة على السلسلة."],"mvYQx_":["تم الاكتشاف"],"njn4bC":["أكِّد المعاملة في محفظتك"],"nr03QI":["أدخل عنوان المستلم"],"nwtY4N":["حدث خطأ"],"oBNGNc":["The route's expected output drifted while your transaction was pending."],"oFmN8a":["إيداع ",["symbol"]],"oW1G8i":["تم إيداع أموالك بنجاح."],"ob8R_m":["حاول مرة أخرى أو تواصل معنا إذا استمرت المشكلة."],"ogD_nm":["إيداع إلى ",["0"]],"olEUh2":["ناجح"],"pCzTTC":["عنوان الإيداع الخاص بك"],"q32Nt8":["اكتمل السحب"],"qQ5VJt":["We can't reach the gateway right now"],"qj0vvX":["تأكيد الإيداع"],"qtoOYG":["بدون حد"],"rT8e1f":["المسار"],"rZdp61":["معاملة الإكمال"],"sSiLKx":["شبكة الاستلام"],"sb9Y58":["محفظة"],"sbwbC0":["طريقة الدفع"],"uPo3PQ":["عرض أقل"],"vrnnn9":["جاري المعالجة"],"w-2VR9":["جاري السحب…"],"wdxz7K":["المصدر"],"xDAtGP":["Message"],"xGVfLh":["متابعة"],"yH9V_J":["أدخل المبلغ"],"yrvWai":["معاملة المصدر"],"yxnt3y":["حالة التنفيذ"],"yy2rkt":["0x…"],"yz7wBu":["إغلاق"],"zYD5xm":["جاري الإضافة"],"zbtijb":["إيداع ",["0"]," إلى ",["1"]],"znqB4T":["رصيد غير كافٍ"],"{hours} hr":[["hours"]," ساعة"],"{minutes} min":[["minutes"]," دقيقة"],"{n}h":[["n"],"س"],"{n}m":[["n"],"د"],"{n}s":[["n"],"ث"]}`);export{e as messages};
|
package/dist/i18n/locales/es.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=JSON.parse(`{"--OGth":["Depósito exitoso"],"-nuEh_":["Tiempo estimado"],"-tu7Q8":["Más sobre ",["0"]],"02NghK":["Close this dialog and try again in a moment. If the problem persists, double-check the gateway key on your integration."],"0eg2g7":["Estimando gas…"],"0lHlRj":["En tránsito"],"2Eoi_a":["Ver detalles"],"3dqPLT":["Transferir cripto"],"3eKjkO":["Depósito mínimo de ",["formattedMin"]],"3kg1gB":["Depósito completado"],"3yd3IL":["The deposit driver failed to load gateway configuration."],"5AApJw":["Conecta una billetera para continuar"],"5joj8M":["Desglose de la transacción"],"60ahSE":["Tx del retiro"],"69Gavs":["Technical details"],"6D8qH6":["Envía el token seleccionado en la red elegida a esta dirección. Los fondos aparecerán en tu cuenta cuando la red confirme la transferencia."],"6RDwJM":["Tokens"],"7Bj3x9":["Fallido"],"7evBec":["Tiempo de procesamiento: ",["resolvedProcessingTime"]],"88cUW-":["Recibes"],"9JHY2T":["Tu depósito se acreditó en tu cuenta."],"9XIJb8":["T…"],"9cCjMJ":["Depositar saldo máximo"],"< 1 min":["< 1 min"],"AO44G_":["Ver recibo"],"AOPSKq":["Depositar ",["0"]],"AWtGgd":["Obtener ayuda"],"AeXO77":["Cuenta"],"AeZIvT":["Recibirás"],"AikETk":["Mín ",["minDeposit"]],"BhQhbU":["Usar la dirección sugerida del destinatario"],"CK1KXz":["Máx"],"Ck1xL4":["Envías"],"D79cZK":["Instantáneo"],"DPfwMq":["Listo"],"Dd7jP5":["¿Tienes problemas?"],"DoS2vD":["Ocultar detalles técnicos"],"ELhVSL":["Failed to submit deposit."],"Ej5HL9":["Signature declined. Please try again."],"Enslfm":["Destino"],"G-SK3q":["El kit encontró un error inesperado y no pudo terminar de renderizar. Vuelve a intentarlo, o cierra este diálogo y reinténtalo desde la aplicación."],"GX8GKD":["Activos"],"GZPxmc":["Enter Valid Recipient Address"],"GcuGHR":["Acreditado a ",["captionSuffix"]],"GwkmPx":["Cambiar el importe mostrado"],"
|
|
1
|
+
const e=JSON.parse(`{"--OGth":["Depósito exitoso"],"-nuEh_":["Tiempo estimado"],"-tu7Q8":["Más sobre ",["0"]],"02NghK":["Close this dialog and try again in a moment. If the problem persists, double-check the gateway key on your integration."],"0eg2g7":["Estimando gas…"],"0lHlRj":["En tránsito"],"2Eoi_a":["Ver detalles"],"3dqPLT":["Transferir cripto"],"3eKjkO":["Depósito mínimo de ",["formattedMin"]],"3kg1gB":["Depósito completado"],"3yd3IL":["The deposit driver failed to load gateway configuration."],"5AApJw":["Conecta una billetera para continuar"],"5joj8M":["Desglose de la transacción"],"60ahSE":["Tx del retiro"],"69Gavs":["Technical details"],"6D8qH6":["Envía el token seleccionado en la red elegida a esta dirección. Los fondos aparecerán en tu cuenta cuando la red confirme la transferencia."],"6RDwJM":["Tokens"],"7Bj3x9":["Fallido"],"7evBec":["Tiempo de procesamiento: ",["resolvedProcessingTime"]],"88cUW-":["Recibes"],"9JHY2T":["Tu depósito se acreditó en tu cuenta."],"9XIJb8":["T…"],"9cCjMJ":["Depositar saldo máximo"],"< 1 min":["< 1 min"],"AO44G_":["Ver recibo"],"AOPSKq":["Depositar ",["0"]],"AWtGgd":["Obtener ayuda"],"AeXO77":["Cuenta"],"AeZIvT":["Recibirás"],"AikETk":["Mín ",["minDeposit"]],"BhQhbU":["Usar la dirección sugerida del destinatario"],"CK1KXz":["Máx"],"Ck1xL4":["Envías"],"D79cZK":["Instantáneo"],"DPfwMq":["Listo"],"Dd7jP5":["¿Tienes problemas?"],"DoS2vD":["Ocultar detalles técnicos"],"ELhVSL":["Failed to submit deposit."],"Ej5HL9":["Signature declined. Please try again."],"Enslfm":["Destino"],"G-SK3q":["El kit encontró un error inesperado y no pudo terminar de renderizar. Vuelve a intentarlo, o cierra este diálogo y reinténtalo desde la aplicación."],"GX8GKD":["Activos"],"GZPxmc":["Enter Valid Recipient Address"],"GcuGHR":["Acreditado a ",["captionSuffix"]],"GwkmPx":["Cambiar el importe mostrado"],"IDt4jm":[["0","plural",{"one":["#"," second"],"other":["#"," seconds"]}]," left on quote"],"IRogzB":["Tu depósito se acreditó a ",["brand"],"."],"KDw4GX":["Reintentar"],"KGoAE6":["Auto · ",["value"]],"KTNWsg":["El retiro falló"],"KuqCAK":["~ 2 min"],"LEbOpR":["Más detalles"],"Ly6geA":["Regenerando cotización…"],"MZ_nQf":["Dirección del destinatario"],"N2DUxS":["Insufficient Balance"],"OLF0i7":["Couldn't load deposit options"],"Offl0a":["Tu depósito se acreditará en tu cuenta."],"Oi8TiZ":["Ver progreso"],"OsyKSt":["Retirar"],"P9fBwv":["Stack"],"PiH3UR":["¡Copiado!"],"Q12Rrs":["Tx depósito"],"QU2cIs":["¿Tienes preguntas?"],"Rxjdjn":["El depósito no se completó"],"SOVBoe":["Copiar dirección de depósito"],"SZRUQ4":["Deslizamiento máximo"],"Sjplg3":["Ver en el explorador"],"SlfejT":["Error"],"TG4WOd":["Tu depósito se acreditará a ",["brand"],"."],"TT0aVH":["Orden enviada"],"Uevt3L":["Estimando cotización"],"UqHbdz":["Descartar aviso de depósito pendiente"],"V1fa9u":["Ver más"],"VAZUpd":["Orden fallida"],"WkRH60":["Mín ",["0"]],"Wqz0SO":["Saldo bajo"],"Z1WbO6":["Los fondos están seguros en la red de origen — contacta a soporte para recuperarlos."],"ZqugiS":["Saldo: ",["0"]," ",["1"]],"_girqu":["Retiro exitoso"],"_kXBrK":["Tiempo total"],"a2WllD":["Token a recibir"],"aiEUrg":["Mostrar detalles técnicos"],"bOZXx5":["Actualizar orden"],"bZnukT":["Costo de red"],"c6Bl9M":["Toggle technical details"],"cGYrpE":["Aplican términos"],"cHPbBJ":["El puente no pudo financiar la transacción de destino (presupuesto de gas agotado)."],"cxR5Qy":["Tx liquidación"],"e3xU5E":["Depósito recibido"],"fKSGnu":["Cantidad mínima requerida para que esta red cubra las tarifas y el enrutamiento."],"fWsBTs":["Algo salió mal. Vuelve a intentarlo."],"flMR3h":["Tus fondos fueron retirados con éxito."],"g2UNkE":["Con tecnología de"],"gfh8CC":["Redes"],"hKMHs1":["Diferencia entre el resultado esperado de la ruta y el precio medio de mercado subyacente."],"he3ygx":["Copiar"],"hehnjM":["Monto"],"i-4Fbp":["Depósito fallido"],"i-EgW-":["El costo estimado para emitir esta transacción en la red de destino."],"iH8pgl":["Atrás"],"junZX6":["Depósito recibido y procesando…"],"kH6wUX":["Impacto en precio"],"kR8ayx":["Al hacer clic en Confirmar depósito, aceptas nuestros <0>términos</0>."],"kUFhUv":["Withdrawal failed."],"kj3M8S":["Depositar"],"kjrq_8":["Más información"],"lOEm_1":["Orden completada"],"ldK3jJ":["Failed to submit withdrawal."],"lxjao1":["La ruta de liquidez seleccionada para liquidar este retiro."],"mgLWEL":["La transacción del tramo de destino se revirtió en cadena."],"mvYQx_":["Detectado"],"njn4bC":["Confirma la transacción en tu billetera"],"nr03QI":["Ingresa la dirección del destinatario"],"nwtY4N":["Algo salió mal"],"oBNGNc":["The route's expected output drifted while your transaction was pending."],"oFmN8a":["Depositar ",["symbol"]],"oW1G8i":["Tus fondos se depositaron correctamente."],"ob8R_m":["Inténtalo nuevamente o contáctanos si el problema persiste."],"ogD_nm":["Depositar a ",["0"]],"olEUh2":["Exitoso"],"pCzTTC":["Tu dirección de depósito"],"q32Nt8":["Retiro completado"],"qQ5VJt":["We can't reach the gateway right now"],"qj0vvX":["Confirmar depósito"],"qtoOYG":["Sin límite"],"rT8e1f":["Ruta"],"rZdp61":["Tx finalización"],"sSiLKx":["Red a recibir"],"sb9Y58":["Billetera"],"sbwbC0":["Método de pago"],"uPo3PQ":["Ver menos"],"vrnnn9":["Procesando"],"w-2VR9":["Retiro en curso…"],"wdxz7K":["Origen"],"xDAtGP":["Message"],"xGVfLh":["Continuar"],"yH9V_J":["Ingresa el monto"],"yrvWai":["Tx origen"],"yxnt3y":["Estado de ejecución"],"yy2rkt":["0x…"],"yz7wBu":["Cerrar"],"zYD5xm":["Acreditando"],"zbtijb":["Depositar ",["0"]," a ",["1"]],"znqB4T":["Saldo insuficiente"],"{hours} hr":[["hours"]," h"],"{minutes} min":[["minutes"]," min"],"{n}h":[["n"],"h"],"{n}m":[["n"],"m"],"{n}s":[["n"],"s"]}`);export{e as messages};
|
|
@@ -7,6 +7,6 @@
|
|
|
7
7
|
* as the typed contract for {@link defineMessages}: callers get autocomplete on every key the
|
|
8
8
|
* kit translates, and unknown keys fail at compile time via excess-property checks.
|
|
9
9
|
*/
|
|
10
|
-
type KitTranslatableKey = "0x…" | "< 1 min" | "Account" | "Amount" | "Assets" | "Auto · {value}" | "Back" | "Balance: {0} {1}" | "By clicking Confirm Deposit, you agree to our <0>terms</0>." | "Chains" | "Close" | "Close this dialog and try again in a moment. If the problem persists, double-check the gateway key on your integration." | "
|
|
10
|
+
type KitTranslatableKey = "0x…" | "< 1 min" | "Account" | "Amount" | "Assets" | "Auto · {value}" | "Back" | "Balance: {0} {1}" | "By clicking Confirm Deposit, you agree to our <0>terms</0>." | "Chains" | "Close" | "Close this dialog and try again in a moment. If the problem persists, double-check the gateway key on your integration." | "Completion tx" | "Confirm Deposit" | "Confirm transaction in your wallet" | "Connect a wallet to continue" | "Continue" | "Copied!" | "Copy" | "Copy deposit address" | "Couldn't load deposit options" | "Credited to {captionSuffix}" | "Crediting" | "Deposit" | "Deposit completed" | "Deposit didn't complete" | "Deposit failed" | "Deposit max balance" | "Deposit received" | "Deposit received and processing…" | "Deposit successful" | "Deposit to {0}" | "Deposit tx" | "Deposit {0}" | "Deposit {0} to {1}" | "Deposit {symbol}" | "Destination" | "Detected" | "Difference between the route's expected output and the underlying market mid-price." | "Dismiss pending deposit notice" | "Done" | "Enter Amount" | "Enter Recipient Address" | "Enter Valid Recipient Address" | "Error" | "Estimated time" | "Estimating gas…" | "Estimating quote" | "Experiencing problems?" | "Failed" | "Failed to submit deposit." | "Failed to submit withdrawal." | "Fill status" | "Funds are safe on the source chain — contact support to recover." | "Get help" | "Have questions?" | "Hide technical details" | "In transit" | "Instant" | "Insufficient Balance" | "Insufficient balance" | "Low Balance" | "Max" | "Max slippage" | "Message" | "Min {0}" | "Min {minDeposit}" | "More about {0}" | "More details" | "More information" | "Network cost" | "No limit" | "Order failed" | "Order filled" | "Order submitted" | "Payment Method" | "Please try again or contact us if the issue persists." | "Powered by" | "Price impact" | "Processing" | "Processing time: {resolvedProcessingTime}" | "Receive chain" | "Receive token" | "Recipient address" | "Regenerating quote…" | "Route" | "See less" | "See more" | "Send the selected token on the selected chain to this address. Funds appear in your account once the network confirms the transfer." | "Settlement tx" | "Show technical details" | "Signature declined. Please try again." | "Something went wrong" | "Something went wrong. Please try again." | "Source" | "Source tx" | "Stack" | "Successful" | "Swap displayed amount" | "Technical details" | "Terms apply" | "The bridge could not fund the destination transaction (gas budget exhausted)." | "The deposit driver failed to load gateway configuration." | "The destination-leg transaction reverted on-chain." | "The estimated cost to broadcast this transaction on the destination chain." | "The kit hit an unexpected error and could not finish rendering. Try again, or close this dialog and retry from the host." | "The minimum amount required for this chain to cover network fees and routing." | "The route's expected output drifted while your transaction was pending." | "The selected liquidity route used to settle this withdrawal." | "Toggle technical details" | "Tokens" | "Total time" | "Transaction breakdown" | "Transfer Crypto" | "Try again" | "T…" | "Update order" | "Use suggested recipient address" | "View details" | "View on Explorer" | "View progress" | "View receipt" | "Wallet" | "We can't reach the gateway right now" | "Withdraw" | "Withdrawal complete" | "Withdrawal failed" | "Withdrawal failed." | "Withdrawal in progress…" | "Withdrawal successful" | "Withdrawal tx" | "You receive" | "You send" | "You will receive" | "Your deposit address" | "Your deposit has been credited to your account." | "Your deposit has been credited to {brand}." | "Your deposit will be credited to your account." | "Your deposit will be credited to {brand}." | "Your funds were successfully deposited." | "Your funds were successfully withdrawn." | "{0, plural, one {# second} other {# seconds}} left on quote" | "{formattedMin} minimum deposit" | "{hours} hr" | "{minutes} min" | "{n}h" | "{n}m" | "{n}s" | "~ 2 min";
|
|
11
11
|
//#endregion
|
|
12
12
|
export { KitTranslatableKey };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { TxRef } from "./shared/driver/types.js";
|
|
2
2
|
import { DepositSnapshot } from "./flows/deposit/driver/types.js";
|
|
3
3
|
import { useDepositSnapshot } from "./flows/deposit/driver/context.js";
|
|
4
|
-
import {
|
|
4
|
+
import { ChainType, isValidAddressForChainType, isValidEvmAddress, isValidTronAddress, toChainType } from "./shared/chains/index.js";
|
|
5
5
|
import { WithdrawSnapshot } from "./flows/withdraw/driver/types.js";
|
|
6
6
|
import { useWithdrawSnapshot } from "./flows/withdraw/driver/context.js";
|
|
7
7
|
import { useKitConfig } from "./scope/context.js";
|
|
@@ -26,4 +26,4 @@ import { useWithdrawState } from "./flows/withdraw/orchestrator/controller.js";
|
|
|
26
26
|
import { useWithdraw } from "./flows/withdraw/orchestrator/useWithdraw.js";
|
|
27
27
|
import { useOptionalStridge, useStridge } from "./stridge/StridgeContext.js";
|
|
28
28
|
import { StridgeAppearance, StridgeAsset, StridgeDepositDestination, StridgeDepositFlowConfig, StridgeFlowOwner, StridgeProvider, StridgeStorageConfig, StridgeWithdrawFlowConfig } from "./stridge/StridgeProvider.js";
|
|
29
|
-
export { type BannerAckBucket, type
|
|
29
|
+
export { type BannerAckBucket, type ChainLogoInput, type ChainLogoMeta, type ChainType, DEFAULT_KIT_STORAGE_NAMESPACE, type DepositActions, type DepositController, type DepositMethod, type OpenInput as DepositOpenInput, type DepositSnapshot, type DepositState, type DepositStateName, type FailureInfo, type IntercomMerchantContext, KitPortalScope, KitStorageProvider, type LogosNamespace, type StridgeAppearance, type StridgeAsset, type StridgeDepositDestination, type StridgeDepositFlowConfig, type StridgeEnvironment, type StridgeFlowOwner, StridgeProvider, type StridgeStorageConfig, type StridgeWithdrawFlowConfig, type SupportConfig, type SupportOpenContext, type TokenLogoInput, type TxRef, type WithdrawActions, type WithdrawBalanceInput, type WithdrawBindings, type WithdrawController, type WithdrawSnapshot, type WithdrawState, type WithdrawStateName, type WithdrawSubmitActions, type WithdrawSubmitCallback, type WithdrawSubmitInput, type WithdrawSuggestedRecipient, type WithdrawalFormSnapshot, bannerAckStorageKey, bucketFromSettlement, createKitStorage, createLocalStorageAdapter, createMemoryStorageAdapter, createSessionStorageAdapter, isValidAddressForChainType, isValidEvmAddress, isValidTronAddress, logos, resolveStorageAdapter, toChainType, useBannerAck, useBannerAckForSettlement, useDeposit, useDepositSnapshot, useDepositState, useKitConfig, useKitStorage, useKitStorageValue, useOptionalStridge, useStridge, useWithdraw, useWithdrawBindings, useWithdrawSnapshot, useWithdrawState };
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{isValidAddressForChainType as e,isValidEvmAddress as t,isValidTronAddress as n,toChainType as r}from"./shared/chains/index.js";import{logos as i}from"./shared/utils/logos/api.js";import"./shared/utils/logos/index.js";import{createLocalStorageAdapter as a,createMemoryStorageAdapter as o,createSessionStorageAdapter as s,resolveStorageAdapter as c}from"./storage/adapters.js";import{createKitStorage as l}from"./storage/createKitStorage.js";import{DEFAULT_KIT_STORAGE_NAMESPACE as u,KitStorageProvider as d,useKitStorage as f,useKitStorageValue as p}from"./storage/context.js";import"./storage/index.js";import{bannerAckStorageKey as m,bucketFromSettlement as h,useBannerAck as g,useBannerAckForSettlement as _}from"./banners/useBannerAck.js";import"./banners/index.js";import{useDepositSnapshot as v}from"./flows/deposit/driver/context.js";import{useDepositState as y}from"./flows/deposit/orchestrator/controller.js";import{useDeposit as b}from"./flows/deposit/orchestrator/useDeposit.js";import{useWithdrawBindings as x}from"./flows/withdraw/bindings/WithdrawBindings.js";import"./flows/withdraw/bindings/index.js";import{useWithdrawSnapshot as S}from"./flows/withdraw/driver/context.js";import{useWithdrawState as C}from"./flows/withdraw/orchestrator/controller.js";import{useWithdraw as w}from"./flows/withdraw/orchestrator/useWithdraw.js";import"./flows/withdraw/orchestrator/index.js";import{useKitConfig as T}from"./scope/context.js";import{KitPortalScope as E}from"./scope/KitPortalScope.js";import{useOptionalStridge as D,useStridge as O}from"./stridge/StridgeContext.js";import{StridgeProvider as k}from"./stridge/StridgeProvider.js";export{u as DEFAULT_KIT_STORAGE_NAMESPACE,E as KitPortalScope,d as KitStorageProvider,k as StridgeProvider,m as bannerAckStorageKey,h as bucketFromSettlement,l as createKitStorage,a as createLocalStorageAdapter,o as createMemoryStorageAdapter,s as createSessionStorageAdapter,e as isValidAddressForChainType,t as isValidEvmAddress,n as isValidTronAddress,i as logos,c as resolveStorageAdapter,r as toChainType,g as useBannerAck,_ as useBannerAckForSettlement,b as useDeposit,v as useDepositSnapshot,y as useDepositState,T as useKitConfig,f as useKitStorage,p as useKitStorageValue,D as useOptionalStridge,O as useStridge,w as useWithdraw,x as useWithdrawBindings,S as useWithdrawSnapshot,C as useWithdrawState};
|
package/dist/package.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var e=`0.1.0-alpha.
|
|
1
|
+
var e=`0.1.0-alpha.26`;export{e as version};
|
|
@@ -1,41 +1,13 @@
|
|
|
1
1
|
//#region src/shared/chains/index.d.ts
|
|
2
2
|
/**
|
|
3
|
-
* Chain
|
|
4
|
-
* slug, suitable for IDE autocomplete) and a normalizer that converts any accepted form
|
|
5
|
-
* (slug, EIP-155 number, Stridge networkId) into the wire-shape `network_id` string the gateway
|
|
6
|
-
* expects.
|
|
3
|
+
* Chain-family types and recipient-address validators for `@stridge/kit`.
|
|
7
4
|
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
* <StridgeProvider asset={{ chain: 56, symbol: "USDC" }} ... />; // also valid
|
|
14
|
-
* <StridgeProvider asset={{ chain: "bsc", symbol: "USDC" }} ... />; // also valid
|
|
15
|
-
* <StridgeProvider asset={{ chain: "9006", symbol: "USDC" }} ... />; // also valid
|
|
16
|
-
* ```
|
|
17
|
-
*/
|
|
18
|
-
/**
|
|
19
|
-
* EIP-155 chain ids for the chains Stridge's gateway routes to. Keyed by lowercase slug for
|
|
20
|
-
* IDE autocomplete; the value is a plain number so consumers can pass `chains.bsc` directly to
|
|
21
|
-
* any prop that accepts a chain id.
|
|
22
|
-
*/
|
|
23
|
-
declare const chains: {
|
|
24
|
-
readonly ethereum: 1;
|
|
25
|
-
readonly bsc: 56;
|
|
26
|
-
readonly polygon: 137;
|
|
27
|
-
readonly arbitrum: 42161;
|
|
28
|
-
readonly base: 8453;
|
|
29
|
-
};
|
|
30
|
-
type ChainSlug = keyof typeof chains;
|
|
31
|
-
/**
|
|
32
|
-
* The accepted shape of a `chain` field on kit configuration props. Any of:
|
|
33
|
-
*
|
|
34
|
-
* - `number` — EIP-155 chain id (`56`, `137`).
|
|
35
|
-
* - `string` — chain slug (`"bsc"`), the matching EIP-155 id as text (`"56"`), or a Stridge
|
|
36
|
-
* `network_id` (`"9006"`). The kit normalizes via {@link normalizeChainToNetworkId}.
|
|
5
|
+
* The kit does not ship a static chain catalog — the gateway is the single source of truth for
|
|
6
|
+
* which networks exist. Consumers pass the Stridge network id (read straight off
|
|
7
|
+
* `Uda.supportedAssets()`) as `StridgeAsset.networkId`, and the kit forwards it to
|
|
8
|
+
* `gateway/start` verbatim. This module only carries the chain-*family* tag (`ChainType`) and
|
|
9
|
+
* the address-shape validators that depend on it.
|
|
37
10
|
*/
|
|
38
|
-
type ChainInput = string | number;
|
|
39
11
|
/**
|
|
40
12
|
* Chain family a network belongs to. The kit-internal, case-stable mirror of the gateway's
|
|
41
13
|
* `chain_type` wire tag (`SupportedAssetDto.chain_type`):
|
|
@@ -84,4 +56,4 @@ declare function isValidTronAddress(value: string): boolean;
|
|
|
84
56
|
*/
|
|
85
57
|
declare function isValidAddressForChainType(value: string, chainType: ChainType): boolean;
|
|
86
58
|
//#endregion
|
|
87
|
-
export {
|
|
59
|
+
export { ChainType, isValidAddressForChainType, isValidEvmAddress, isValidTronAddress, toChainType };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function e(e){switch(e?.trim().toUpperCase()){case`EVM`:return`evm`;case`TVM`:return`tron`;default:return`unknown`}}const t=/^0x[0-9a-fA-F]{40}$/,n=/^T[1-9A-HJ-NP-Za-km-z]{33}$/;function r(e){return t.test(e.trim())}function i(e){return n.test(e.trim())}function a(e,r){let i=e.trim();if(i.length===0)return!1;switch(r){case`evm`:return t.test(i);case`tron`:return n.test(i);default:return/^\S{8,}$/.test(i)}}export{a as isValidAddressForChainType,r as isValidEvmAddress,i as isValidTronAddress,e as toChainType};
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { TxHashValueProps } from "../../../primitives/TxHashValue/types.js";
|
|
2
2
|
import { TxHashValue } from "../../../primitives/TxHashValue/TxHashValue.js";
|
|
3
3
|
import { WalletValue, WalletValueProps } from "../../../primitives/WalletValue/WalletValue.js";
|
|
4
|
-
import {
|
|
5
|
-
import { ProcessingStateActions } from "./components/Actions.js";
|
|
4
|
+
import { ProcessingStateBodyProps, ProcessingStateDetailProps, ProcessingStateDetailsProps, ProcessingStateDialogProps, ProcessingStateHeaderProps, ProcessingStateHeroProps, ProcessingStateProps, ProcessingStateRowProps, ProcessingStateStatusPillProps } from "./types.js";
|
|
6
5
|
import { ProcessingStateDetail } from "./components/Detail.js";
|
|
7
6
|
import { ProcessingStateDetails } from "./components/Details.js";
|
|
8
7
|
import { ProcessingStateHeader } from "./components/Header.js";
|
|
@@ -24,7 +23,6 @@ import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
|
24
23
|
* - {@link ProcessingState.StatusPill}
|
|
25
24
|
* - {@link ProcessingState.Details}
|
|
26
25
|
* - {@link ProcessingState.Detail}
|
|
27
|
-
* - {@link ProcessingState.Actions}
|
|
28
26
|
*
|
|
29
27
|
* Helpers:
|
|
30
28
|
* - {@link ProcessingState.WalletValue} — wallet icon + name + truncated address + explorer link
|
|
@@ -53,7 +51,6 @@ declare namespace ProcessingState {
|
|
|
53
51
|
type StatusPillProps = ProcessingStateStatusPillProps;
|
|
54
52
|
type DetailsProps = ProcessingStateDetailsProps;
|
|
55
53
|
type DetailProps = ProcessingStateDetailProps;
|
|
56
|
-
type ActionsProps = ProcessingStateActionsProps;
|
|
57
54
|
type RowProps = ProcessingStateRowProps;
|
|
58
55
|
type WalletValueProps = WalletValueProps;
|
|
59
56
|
type TxHashValueProps = TxHashValueProps;
|
|
@@ -64,7 +61,6 @@ declare namespace ProcessingState {
|
|
|
64
61
|
const StatusPill: typeof ProcessingStateStatusPill;
|
|
65
62
|
const Details: typeof ProcessingStateDetails;
|
|
66
63
|
const Detail: typeof ProcessingStateDetail;
|
|
67
|
-
const Actions: typeof ProcessingStateActions;
|
|
68
64
|
const SourceRow: typeof ProcessingStateSourceRow;
|
|
69
65
|
const SourceTxRow: typeof ProcessingStateSourceTxRow;
|
|
70
66
|
const SubmittedAtRow: typeof ProcessingStateSubmittedAtRow;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{DialogShell as e}from"../../../dialog/DialogShell.js";import{Card as t}from"../../../ui/Card/Card.js";import"../../../../ui/index.js";import{Frame as n}from"../../../dialog/Frame.js";import{TxHashValue as r}from"../../../primitives/TxHashValue/TxHashValue.js";import"../../../primitives/TxHashValue/index.js";import{WalletValue as i}from"../../../primitives/WalletValue/WalletValue.js";import"../../../primitives/WalletValue/index.js";import{
|
|
1
|
+
"use client";import{DialogShell as e}from"../../../dialog/DialogShell.js";import{Card as t}from"../../../ui/Card/Card.js";import"../../../../ui/index.js";import{Frame as n}from"../../../dialog/Frame.js";import{TxHashValue as r}from"../../../primitives/TxHashValue/TxHashValue.js";import"../../../primitives/TxHashValue/index.js";import{WalletValue as i}from"../../../primitives/WalletValue/WalletValue.js";import"../../../primitives/WalletValue/index.js";import{PROCESSING_STATE_SLOTS as a}from"./ProcessingState.slots.js";import{ProcessingStateDetail as o}from"./components/Detail.js";import{ProcessingStateContext as s}from"./context.js";import{styles as c}from"./ProcessingState.styles.js";import{ProcessingStateDetails as l}from"./components/Details.js";import{ProcessingStateHeader as u}from"./components/Header.js";import{ProcessingStateHero as d}from"./components/Hero.js";import{ProcessingStateDetectedAtRow as f,ProcessingStateSourceRow as p,ProcessingStateSourceTxRow as m,ProcessingStateSubmittedAtRow as h}from"./components/Rows.js";import{ProcessingStateStatusPill as g}from"./components/StatusPill.js";import{useMemo as _}from"react";import{jsx as v}from"react/jsx-runtime";import*as y from"@stylexjs/stylex";function b(e){let{amount:t,amountUsd:r,creditedAsset:i,creditedTo:o,loading:l,headerTitle:u,onBack:d,statusPillLabel:f,sourceWallet:p,sourceTx:m,submittedAt:h,detectedAt:g,children:b}=e,x=_(()=>({amount:t,...r?{amountUsd:r}:{},creditedAsset:i,creditedTo:o,...l?{loading:!0}:{},headerTitle:u,onBack:d,statusPillLabel:f,sourceWallet:p,sourceTx:m,submittedAt:h,detectedAt:g}),[t,r,i,o,l,u,d,f,p,m,h,g]);return v(s.Provider,{value:x,children:v(n,{"data-stridge-slot":a.root,...y.props(c.root),children:b})})}function x(e){return v(t.Body,{"data-stridge-slot":a.body,...e})}function S({open:t,defaultOpen:n,onOpenChange:r,trigger:i,children:a,...o}){return v(e,{open:t,defaultOpen:n,onOpenChange:r,trigger:i,children:v(b,{...o,children:a})})}(function(e){e.Header=u,e.Body=x,e.Hero=d,e.StatusPill=g,e.Details=l,e.Detail=o,e.SourceRow=p,e.SourceTxRow=m,e.SubmittedAtRow=h,e.DetectedAtRow=f,e.WalletValue=i,e.TxHashValue=r,e.Dialog=S})(b||={});export{b as ProcessingState};
|
|
@@ -6,7 +6,6 @@ declare const PROCESSING_STATE_SLOTS: {
|
|
|
6
6
|
readonly hero: "processing-state-hero";
|
|
7
7
|
readonly statusPill: "processing-state-status-pill";
|
|
8
8
|
readonly statusPillWrap: "processing-state-status-pill-wrap";
|
|
9
|
-
readonly actions: "processing-state-actions";
|
|
10
9
|
readonly details: "processing-state-details";
|
|
11
10
|
readonly detail: "processing-state-detail";
|
|
12
11
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e={root:`processing-state`,header:`processing-state-header`,body:`processing-state-body`,hero:`processing-state-hero`,statusPill:`processing-state-status-pill`,statusPillWrap:`processing-state-status-pill-wrap`,
|
|
1
|
+
const e={root:`processing-state`,header:`processing-state-header`,body:`processing-state-body`,hero:`processing-state-hero`,statusPill:`processing-state-status-pill`,statusPillWrap:`processing-state-status-pill-wrap`,details:`processing-state-details`,detail:`processing-state-detail`};export{e as PROCESSING_STATE_SLOTS};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e={root:{"ProcessingState__styles.root":`ProcessingState__styles.root`,"position-kVAEAm":`x1n2onr6`,"width-kzqmXN":`xh8yej3`,"maxWidth-ks0D6T":`x17fpy1y`,$$css:`@stridge/kit:src/shared/widgets/processing-state/compound/ProcessingState.styles.ts:26`},header:{"ProcessingState__styles.header":`ProcessingState__styles.header`,"justifyContent-kjj79g":`x1qughib`,$$css:`@stridge/kit:src/shared/widgets/processing-state/compound/ProcessingState.styles.ts:34`},headerLeft:{"ProcessingState__styles.headerLeft":`ProcessingState__styles.headerLeft`,"display-k1xSpc":`x78zum5`,"flexDirection-kXwgrk":`x1q0g3np`,"alignItems-kGNEyG":`x6s0dn4`,"gap-kOIVth":`x1v2ro7d`,"minWidth-k7Eaqz":`xeuugli`,$$css:`@stridge/kit:src/shared/widgets/processing-state/compound/ProcessingState.styles.ts:37`},
|
|
1
|
+
const e={root:{"ProcessingState__styles.root":`ProcessingState__styles.root`,"position-kVAEAm":`x1n2onr6`,"width-kzqmXN":`xh8yej3`,"maxWidth-ks0D6T":`x17fpy1y`,$$css:`@stridge/kit:src/shared/widgets/processing-state/compound/ProcessingState.styles.ts:26`},header:{"ProcessingState__styles.header":`ProcessingState__styles.header`,"justifyContent-kjj79g":`x1qughib`,$$css:`@stridge/kit:src/shared/widgets/processing-state/compound/ProcessingState.styles.ts:34`},headerLeft:{"ProcessingState__styles.headerLeft":`ProcessingState__styles.headerLeft`,"display-k1xSpc":`x78zum5`,"flexDirection-kXwgrk":`x1q0g3np`,"alignItems-kGNEyG":`x6s0dn4`,"gap-kOIVth":`x1v2ro7d`,"minWidth-k7Eaqz":`xeuugli`,$$css:`@stridge/kit:src/shared/widgets/processing-state/compound/ProcessingState.styles.ts:37`},backIcon:{"ProcessingState__styles.backIcon":`ProcessingState__styles.backIcon`,"width-kzqmXN":`x6jxa94`,"height-kZKoxP":`x1v9usgg`,"flexShrink-kmuXW":`x2lah0s`,"color-kMwMTN":`xdksllq`,"strokeWidth-kfJifR":`xhxwl1`,$$css:`@stridge/kit:src/shared/widgets/processing-state/compound/ProcessingState.styles.ts:44`},hero:{"ProcessingState__styles.hero":`ProcessingState__styles.hero`,"display-k1xSpc":`x78zum5`,"flexDirection-kXwgrk":`xdt5ytf`,"alignItems-kGNEyG":`x6s0dn4`,"gap-kOIVth":`x1v2ro7d`,"paddingTop-kLKAdn":`x1miatn0`,"paddingInlineEnd-kwRFfy":`x1o5r3ls`,"paddingBottom-kGO01o":`xwib8y2`,"paddingInlineStart-kZCmMZ":`xz7312c`,"animationName-kKVMdj":`xv305lp`,"animationDuration-k44tkh":`xmprevt x1s1fvk8`,"animationTimingFunction-kyAemX":`xa3vuyk`,"animationFillMode-kWV6AL":`x1u6ievf`,$$css:`@stridge/kit:src/shared/widgets/processing-state/compound/ProcessingState.styles.ts:52`},heroAmountRow:{"ProcessingState__styles.heroAmountRow":`ProcessingState__styles.heroAmountRow`,"display-k1xSpc":`x3nfvp2`,"alignItems-kGNEyG":`x1pha0wt`,"justifyContent-kjj79g":`xl56j7k`,"gap-kOIVth":`x883omv`,"marginTop-keoZOQ":`xdj266r`,$$css:`@stridge/kit:src/shared/widgets/processing-state/compound/ProcessingState.styles.ts:69`},heroAmountIcon:{"ProcessingState__styles.heroAmountIcon":`ProcessingState__styles.heroAmountIcon`,"alignSelf-kSGwAc":`xamitd3`,$$css:`@stridge/kit:src/shared/widgets/processing-state/compound/ProcessingState.styles.ts:76`},heroSubLine:{"ProcessingState__styles.heroSubLine":`ProcessingState__styles.heroSubLine`,"display-k1xSpc":`x3nfvp2`,"flexDirection-kXwgrk":`x1q0g3np`,"alignItems-kGNEyG":`x6s0dn4`,"justifyContent-kjj79g":`xl56j7k`,"gap-kOIVth":`x17d4w8g`,"marginTop-keoZOQ":`xr9ek0c`,$$css:`@stridge/kit:src/shared/widgets/processing-state/compound/ProcessingState.styles.ts:80`},heroSubLineIcon:{"ProcessingState__styles.heroSubLineIcon":`ProcessingState__styles.heroSubLineIcon`,"flexShrink-kmuXW":`x2lah0s`,$$css:`@stridge/kit:src/shared/widgets/processing-state/compound/ProcessingState.styles.ts:88`},statusPillWrap:{"ProcessingState__styles.statusPillWrap":`ProcessingState__styles.statusPillWrap`,"display-k1xSpc":`x78zum5`,"justifyContent-kjj79g":`xl56j7k`,"paddingTop-kLKAdn":`xyinxu5`,"paddingInlineEnd-kwRFfy":`x1o5r3ls`,"paddingBottom-kGO01o":`x1t4gjm`,"paddingInlineStart-kZCmMZ":`xz7312c`,$$css:`@stridge/kit:src/shared/widgets/processing-state/compound/ProcessingState.styles.ts:92`},statusPill:{"ProcessingState__styles.statusPill":`ProcessingState__styles.statusPill`,"display-k1xSpc":`x3nfvp2`,"flexDirection-kXwgrk":`x1q0g3np`,"alignItems-kGNEyG":`x6s0dn4`,"gap-kOIVth":`x883omv`,"paddingBlock-k8WAf4":`x1vvogim`,"paddingInlineStart-kZCmMZ":`x1g0dm76`,"paddingInlineEnd-kwRFfy":`x1pic42t`,"borderRadius-kaIpWk":`x1npxkrn`,"backgroundColor-kWkggS":`x407w7c`,"borderWidth-kMzoRj":`xmkeg23`,"borderStyle-ksu8eU":`x1y0btm7`,"borderColor-kVAM5u":`x1bue7yx`,$$css:`@stridge/kit:src/shared/widgets/processing-state/compound/ProcessingState.styles.ts:100`},statusPillIcon:{"ProcessingState__styles.statusPillIcon":`ProcessingState__styles.statusPillIcon`,"display-k1xSpc":`x1lliihq`,"width-kzqmXN":`x6jxa94`,"height-kZKoxP":`xmix8c7`,"flexShrink-kmuXW":`x2lah0s`,"color-kMwMTN":`x1me39qh`,$$css:`@stridge/kit:src/shared/widgets/processing-state/compound/ProcessingState.styles.ts:114`},statusPillDot:{"ProcessingState__styles.statusPillDot":`ProcessingState__styles.statusPillDot`,"animationName-kKVMdj":`x194e4vk x1aquc0h`,"animationDuration-k44tkh":`x1m9vv7p`,"animationIterationCount-ko0y90":`xa4qsjk`,"animationTimingFunction-kyAemX":`x4hg4is`,"opacity-kSiTet":`x197sbye`,$$css:`@stridge/kit:src/shared/widgets/processing-state/compound/ProcessingState.styles.ts:121`},statusPillDotDelay0:{"ProcessingState__styles.statusPillDotDelay0":`ProcessingState__styles.statusPillDotDelay0`,"animationDelay-kKxzle":`x1uzojwf`,$$css:`@stridge/kit:src/shared/widgets/processing-state/compound/ProcessingState.styles.ts:131`},statusPillDotDelay1:{"ProcessingState__styles.statusPillDotDelay1":`ProcessingState__styles.statusPillDotDelay1`,"animationDelay-kKxzle":`x1k0bccz`,$$css:`@stridge/kit:src/shared/widgets/processing-state/compound/ProcessingState.styles.ts:134`},statusPillDotDelay2:{"ProcessingState__styles.statusPillDotDelay2":`ProcessingState__styles.statusPillDotDelay2`,"animationDelay-kKxzle":`x1t83zlg`,$$css:`@stridge/kit:src/shared/widgets/processing-state/compound/ProcessingState.styles.ts:137`},statusPillDotDelay3:{"ProcessingState__styles.statusPillDotDelay3":`ProcessingState__styles.statusPillDotDelay3`,"animationDelay-kKxzle":`x1x1c4bx`,$$css:`@stridge/kit:src/shared/widgets/processing-state/compound/ProcessingState.styles.ts:140`},statusPillDotDelay4:{"ProcessingState__styles.statusPillDotDelay4":`ProcessingState__styles.statusPillDotDelay4`,"animationDelay-kKxzle":`x1xwhvez`,$$css:`@stridge/kit:src/shared/widgets/processing-state/compound/ProcessingState.styles.ts:143`},statusPillDotDelay5:{"ProcessingState__styles.statusPillDotDelay5":`ProcessingState__styles.statusPillDotDelay5`,"animationDelay-kKxzle":`xfjzax6`,$$css:`@stridge/kit:src/shared/widgets/processing-state/compound/ProcessingState.styles.ts:146`},detailsSection:{"ProcessingState__styles.detailsSection":`ProcessingState__styles.detailsSection`,"marginInlineStart-keTefX":`xnzr9dm`,"marginInlineEnd-k71WvV":`xnqxrjt`,"marginBottom-k1K539":`x91k8ka`,$$css:`@stridge/kit:src/shared/widgets/processing-state/compound/ProcessingState.styles.ts:158`}};export{e as styles};
|
|
@@ -4,9 +4,14 @@ import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
|
4
4
|
//#region src/shared/widgets/processing-state/compound/components/Details.d.ts
|
|
5
5
|
/**
|
|
6
6
|
* Bordered card containing `ProcessingState.Detail` children.
|
|
7
|
+
*
|
|
8
|
+
* Every predefined row ({@link ProcessingState.SourceRow} etc.) gates itself out when its
|
|
9
|
+
* backing payload is absent, so a frame with no detail data would otherwise paint an empty
|
|
10
|
+
* bordered card. The container mirrors those gating conditions and renders nothing when none
|
|
11
|
+
* of the predefined rows can produce content.
|
|
7
12
|
*/
|
|
8
13
|
declare function ProcessingStateDetails({
|
|
9
14
|
children
|
|
10
|
-
}: ProcessingStateDetailsProps): _$react_jsx_runtime0.JSX.Element;
|
|
15
|
+
}: ProcessingStateDetailsProps): _$react_jsx_runtime0.JSX.Element | null;
|
|
11
16
|
//#endregion
|
|
12
17
|
export { ProcessingStateDetails };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{Details as e}from"../../../../ui/Details/Details.js";import"../../../../ui/Details/index.js";import{PROCESSING_STATE_SLOTS as t}from"../ProcessingState.slots.js";import{
|
|
1
|
+
"use client";import{Details as e}from"../../../../ui/Details/Details.js";import"../../../../ui/Details/index.js";import{PROCESSING_STATE_SLOTS as t}from"../ProcessingState.slots.js";import{useProcessingStateContext as n}from"../context.js";import{styles as r}from"../ProcessingState.styles.js";import{jsx as i}from"react/jsx-runtime";import*as a from"@stylexjs/stylex";function o({children:o}){let s=n(`ProcessingState.Details`),c=a.props(r.detailsSection);return s.sourceWallet||s.sourceTx?.hash||s.submittedAt!==void 0||s.detectedAt!==void 0?i(e,{"data-stridge-slot":t.details,className:c.className,style:c.style,children:o}):null}export{o as ProcessingStateDetails};
|
|
@@ -3,9 +3,10 @@ import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
|
3
3
|
|
|
4
4
|
//#region src/shared/widgets/processing-state/compound/components/Header.d.ts
|
|
5
5
|
/**
|
|
6
|
-
* Header row with optional back button and
|
|
7
|
-
* renders only when `onBack` is provided.
|
|
8
|
-
*
|
|
6
|
+
* Header row with optional back button, title, and dialog close affordance.
|
|
7
|
+
* The back button renders only when `onBack` is provided. `Dialog.CloseButton`
|
|
8
|
+
* renders as the trailing flex child only when the widget is mounted inside
|
|
9
|
+
* `Dialog.Content`; card-mode renders no close affordance.
|
|
9
10
|
*/
|
|
10
11
|
declare function ProcessingStateHeader({
|
|
11
12
|
title,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{useLingui as e}from"../../../../i18n/useLingui.js";import"../../../../../i18n/index.js";import{ChevronLeftIcon as t}from"../../../../icons/ChevronLeftIcon.js";import"../../../../../icons/index.js";import{IconButton as n}from"../../../../ui/IconButton/IconButton.js";import{
|
|
1
|
+
"use client";import{useLingui as e}from"../../../../i18n/useLingui.js";import"../../../../../i18n/index.js";import{ChevronLeftIcon as t}from"../../../../icons/ChevronLeftIcon.js";import"../../../../../icons/index.js";import{IconButton as n}from"../../../../ui/IconButton/IconButton.js";import{Dialog as r}from"../../../../ui/Dialog/Dialog.js";import"../../../../ui/Dialog/index.js";import{Card as i}from"../../../../ui/Card/Card.js";import{text as a}from"../../../../ui/Text/Text.js";import"../../../../../ui/index.js";import{PROCESSING_STATE_SLOTS as o}from"../ProcessingState.slots.js";import{useProcessingStateContext as s}from"../context.js";import{styles as c}from"../ProcessingState.styles.js";import{jsx as l,jsxs as u}from"react/jsx-runtime";import*as d from"@stylexjs/stylex";function f({title:f,onBack:p}={}){let m=s(`ProcessingState.Header`),{_:h}=e(),g=f??m.headerTitle??h({id:`vrnnn9`,message:`Processing`}),_=p===null?void 0:p??m.onBack;return u(i.Header,{"data-stridge-slot":o.header,...d.props(c.header),children:[u(`div`,{...d.props(c.headerLeft),children:[typeof _==`function`?l(n,{"aria-label":h({id:`iH8pgl`,message:`Back`}),onClick:_,children:l(t,{"aria-hidden":!0,...d.props(c.backIcon)})}):null,l(a.span,{size:`base`,fontWeight:`semibold`,leading:`tight`,tracking:`tight`,style:{margin:0},children:g})]}),l(r.CloseButton,{})]})}export{f as ProcessingStateHeader};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{useLingui as e}from"../../../../i18n/useLingui.js";import"../../../../../i18n/index.js";import{text as t}from"../../../../ui/Text/Text.js";import{TokenLogo as n}from"../../../../ui/TokenLogo/TokenLogo.js";import"../../../../ui/TokenLogo/index.js";import"../../../../../ui/index.js";import{
|
|
1
|
+
"use client";import{useLingui as e}from"../../../../i18n/useLingui.js";import"../../../../../i18n/index.js";import{text as t}from"../../../../ui/Text/Text.js";import{TokenLogo as n}from"../../../../ui/TokenLogo/TokenLogo.js";import"../../../../ui/TokenLogo/index.js";import"../../../../../ui/index.js";import{PROCESSING_STATE_SLOTS as r}from"../ProcessingState.slots.js";import{useProcessingStateContext as i}from"../context.js";import{styles as a}from"../ProcessingState.styles.js";import{splitAmount as o}from"./splitAmount.js";import{Fragment as s,jsx as c,jsxs as l}from"react/jsx-runtime";import*as u from"@stylexjs/stylex";function d(){let d=i(`ProcessingState.Hero`),{_:f}=e(),p=d.creditedTo??d.creditedAsset.symbol,m={symbol:d.creditedAsset.symbol,...d.creditedAsset.chainId===void 0?{}:{chainId:d.creditedAsset.chainId},...d.creditedAsset.address===void 0?{}:{address:d.creditedAsset.address},...d.creditedAsset.isNative===void 0?{}:{isNative:d.creditedAsset.isNative},...d.creditedAsset.logoUrl===void 0?{}:{logoUrl:d.creditedAsset.logoUrl}},h=d.amountUsd?o(d.amountUsd):void 0;return l(`div`,{"data-stridge-slot":r.hero,...u.props(a.hero),children:[c(t.span,{size:`caption`,fontWeight:`semibold`,leading:`tight`,tracking:`widest`,transform:`uppercase`,align:`center`,color:`tertiary`,children:f({id:`zYD5xm`,message:`Crediting`})}),h?l(s,{children:[l(`div`,{dir:`ltr`,...u.props(a.heroAmountRow),children:[h.glyph?c(t.span,{size:`2xl`,fontWeight:`semibold`,leading:`none`,tracking:`tight`,children:h.glyph}):null,c(t.span,{size:`4xl`,fontWeight:`semibold`,leading:`none`,tracking:`tight`,children:h.digits})]}),l(`div`,{dir:`ltr`,...u.props(a.heroSubLine),children:[c(n,{size:18,...m,hideChainBadge:!0,...u.props(a.heroSubLineIcon)}),l(t.span,{size:`sm`,fontWeight:`medium`,leading:`tight`,tracking:`tight`,color:`subdued`,children:[d.amount,` `,d.creditedAsset.symbol]})]})]}):l(`div`,{dir:`ltr`,...u.props(a.heroAmountRow),children:[c(n,{size:30,...m,hideChainBadge:!0,...u.props(a.heroAmountIcon)}),d.loading?null:c(t.span,{size:`4xl`,fontWeight:`semibold`,leading:`none`,tracking:`tight`,children:d.amount}),c(t.span,{size:d.loading?`4xl`:`xl`,fontWeight:`semibold`,leading:`none`,tracking:`tight`,children:d.creditedAsset.symbol})]}),c(t.span,{size:`meta`,fontWeight:`medium`,leading:`tight`,align:`center`,color:`subdued`,children:p})]})}export{d as ProcessingStateHero};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{useLingui as e}from"../../../../i18n/useLingui.js";import"../../../../../i18n/index.js";import{TxHashValue as t}from"../../../../primitives/TxHashValue/TxHashValue.js";import"../../../../primitives/TxHashValue/index.js";import{WalletValue as n}from"../../../../primitives/WalletValue/WalletValue.js";import"../../../../primitives/WalletValue/index.js";import{
|
|
1
|
+
"use client";import{useLingui as e}from"../../../../i18n/useLingui.js";import"../../../../../i18n/index.js";import{TxHashValue as t}from"../../../../primitives/TxHashValue/TxHashValue.js";import"../../../../primitives/TxHashValue/index.js";import{WalletValue as n}from"../../../../primitives/WalletValue/WalletValue.js";import"../../../../primitives/WalletValue/index.js";import{ProcessingStateDetail as r}from"./Detail.js";import{useProcessingStateContext as i}from"../context.js";import{jsx as a}from"react/jsx-runtime";function o({label:t}={}){let o=i(`ProcessingState.SourceRow`),{_:s}=e();if(!o.sourceWallet)return null;let{name:c,address:l,explorerUrl:u}=o.sourceWallet;return a(r,{label:t??s({id:`wdxz7K`,message:`Source`}),value:a(n,{name:c??s({id:`sb9Y58`,message:`Wallet`}),address:l,...u?{explorerUrl:u}:{},density:`compact`,hideIcon:!0})})}function s({label:n}={}){let o=i(`ProcessingState.SourceTxRow`),{_:s}=e();return o.sourceTx?.hash?a(r,{label:n??s({id:`yrvWai`,message:`Source tx`}),value:a(t,{hash:o.sourceTx.hash,...o.sourceTx.explorerUrl?{explorerUrl:o.sourceTx.explorerUrl}:{}})}):null}function c({label:t}={}){let n=i(`ProcessingState.SubmittedAtRow`),{_:o}=e();return n.submittedAt===void 0?null:a(r,{label:t??o({id:`TT0aVH`,message:`Order submitted`}),value:n.submittedAt})}function l({label:t}={}){let n=i(`ProcessingState.DetectedAtRow`),{_:o}=e();return n.detectedAt===void 0?null:a(r,{label:t??o({id:`mvYQx_`,message:`Detected`}),value:n.detectedAt})}export{l as ProcessingStateDetectedAtRow,o as ProcessingStateSourceRow,s as ProcessingStateSourceTxRow,c as ProcessingStateSubmittedAtRow};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{useLingui as e}from"../../../../i18n/useLingui.js";import"../../../../../i18n/index.js";import{text as t}from"../../../../ui/Text/Text.js";import"../../../../../ui/index.js";import{
|
|
1
|
+
"use client";import{useLingui as e}from"../../../../i18n/useLingui.js";import"../../../../../i18n/index.js";import{text as t}from"../../../../ui/Text/Text.js";import"../../../../../ui/index.js";import{PROCESSING_STATE_SLOTS as n}from"../ProcessingState.slots.js";import{useProcessingStateContext as r}from"../context.js";import{styles as i}from"../ProcessingState.styles.js";import{jsx as a,jsxs as o}from"react/jsx-runtime";import*as s from"@stylexjs/stylex";const c=[i.statusPillDotDelay0,i.statusPillDotDelay1,i.statusPillDotDelay2,i.statusPillDotDelay3,i.statusPillDotDelay4,i.statusPillDotDelay5],l=[{cx:3,cy:3},{cx:11,cy:3},{cx:3,cy:9},{cx:11,cy:9},{cx:3,cy:15},{cx:11,cy:15}];function u({label:u}={}){let d=r(`ProcessingState.StatusPill`),{_:f}=e(),p=u??d.statusPillLabel??f({id:`0lHlRj`,message:`In transit`});return a(`div`,{"data-stridge-slot":n.statusPillWrap,...s.props(i.statusPillWrap),children:o(`div`,{"data-stridge-slot":n.statusPill,...s.props(i.statusPill),children:[a(`svg`,{"aria-hidden":!0,viewBox:`0 0 14 18`,xmlns:`http://www.w3.org/2000/svg`,fill:`currentColor`,...s.props(i.statusPillIcon),children:l.map((e,t)=>a(`circle`,{cx:e.cx,cy:e.cy,r:`1.6`,...s.props(i.statusPillDot,c[t])},`dot-${e.cx}-${e.cy}`))}),a(t.span,{size:`sm`,fontWeight:`medium`,leading:`tight`,children:p})]})})}export{u as ProcessingStateStatusPill};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ProcessingStateAsset, ProcessingStateBodyProps, ProcessingStateDetailProps, ProcessingStateDetailsProps, ProcessingStateDialogProps, ProcessingStateHeaderProps, ProcessingStateHeroProps, ProcessingStateProps, ProcessingStateRowProps, ProcessingStateSourceWallet, ProcessingStateStatusPillProps, ProcessingStateTxRef } from "./types.js";
|
|
2
2
|
import { ProcessingState } from "./ProcessingState.js";
|
|
3
3
|
import { PROCESSING_STATE_SLOTS, ProcessingStateSlot } from "./ProcessingState.slots.js";
|
|
@@ -113,15 +113,6 @@ interface ProcessingStateProps {
|
|
|
113
113
|
* inside `<ProcessingState.DetectedAtRow />`.
|
|
114
114
|
*/
|
|
115
115
|
detectedAt?: string;
|
|
116
|
-
/**
|
|
117
|
-
* Click handler routed to {@link ProcessingState.Actions}.
|
|
118
|
-
*/
|
|
119
|
-
onClose?: () => void;
|
|
120
|
-
/**
|
|
121
|
-
* Optional override for the Actions CTA label. Defaults to
|
|
122
|
-
* `"Close — we'll notify you"`.
|
|
123
|
-
*/
|
|
124
|
-
closeLabel?: string;
|
|
125
116
|
/**
|
|
126
117
|
* Compound parts; see `ProcessingState.Header`, `ProcessingState.Hero`, etc.
|
|
127
118
|
*/
|
|
@@ -202,21 +193,5 @@ interface ProcessingStateRowProps {
|
|
|
202
193
|
/** Override the row label. */
|
|
203
194
|
label?: string;
|
|
204
195
|
}
|
|
205
|
-
/**
|
|
206
|
-
* Props for `ProcessingState.Actions`.
|
|
207
|
-
*/
|
|
208
|
-
interface ProcessingStateActionsProps {
|
|
209
|
-
/**
|
|
210
|
-
* Optional override for the CTA click handler. Defaults to the
|
|
211
|
-
* `onClose` set on the {@link ProcessingState} root.
|
|
212
|
-
*/
|
|
213
|
-
onClose?: () => void;
|
|
214
|
-
/**
|
|
215
|
-
* Optional override for the CTA label. Defaults to the `closeLabel`
|
|
216
|
-
* set on the {@link ProcessingState} root, falling back to
|
|
217
|
-
* `"Close — we'll notify you"`.
|
|
218
|
-
*/
|
|
219
|
-
closeLabel?: string;
|
|
220
|
-
}
|
|
221
196
|
//#endregion
|
|
222
|
-
export {
|
|
197
|
+
export { ProcessingStateAsset, ProcessingStateBodyProps, ProcessingStateDetailProps, ProcessingStateDetailsProps, ProcessingStateDialogProps, ProcessingStateHeaderProps, ProcessingStateHeroProps, ProcessingStateProps, ProcessingStateRowProps, ProcessingStateSourceWallet, ProcessingStateStatusPillProps, ProcessingStateTxRef };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { ChainInput } from "../shared/chains/index.js";
|
|
2
1
|
import { KitI18nConfig } from "../shared/i18n/createKitI18n.js";
|
|
3
2
|
import { SupportConfig } from "../shared/support/types.js";
|
|
4
3
|
import { StridgeEnvironment } from "../drivers/stridge/types.js";
|
|
@@ -8,18 +7,19 @@ import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
|
8
7
|
|
|
9
8
|
//#region src/stridge/StridgeProvider.d.ts
|
|
10
9
|
/**
|
|
11
|
-
* Settlement-asset tuple. `
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
10
|
+
* Settlement-asset tuple. `networkId` is the Stridge network id — the wire value the gateway
|
|
11
|
+
* routes against, read straight off `Uda.supportedAssets()` (`"9006"` for BSC, `"195"` for
|
|
12
|
+
* Tron, …). The kit forwards it to `gateway/start` verbatim; it does not ship a chain catalog,
|
|
13
|
+
* so any network the backend lists works without a kit release. `symbol` is the asset symbol
|
|
14
|
+
* on that network (e.g. `"USDC"`).
|
|
15
15
|
*
|
|
16
16
|
* The same `asset` drives both flows:
|
|
17
17
|
*
|
|
18
|
-
* - **Deposit** settles to this `(
|
|
19
|
-
* - **Withdraw** sources from this `(
|
|
18
|
+
* - **Deposit** settles to this `(networkId, symbol)` at the connected wallet (same-owner pattern).
|
|
19
|
+
* - **Withdraw** sources from this `(networkId, symbol)` of the user's on-chain balance.
|
|
20
20
|
*/
|
|
21
21
|
interface StridgeAsset {
|
|
22
|
-
|
|
22
|
+
networkId: string;
|
|
23
23
|
symbol: string;
|
|
24
24
|
}
|
|
25
25
|
/**
|
|
@@ -164,8 +164,8 @@ declare namespace StridgeProvider {
|
|
|
164
164
|
*/
|
|
165
165
|
environment?: StridgeEnvironment;
|
|
166
166
|
/**
|
|
167
|
-
* Settlement asset — the single source of truth for which `(
|
|
168
|
-
* operates in. Deposit settles to this asset; withdraw sources from this asset.
|
|
167
|
+
* Settlement asset — the single source of truth for which `(networkId, symbol)` the
|
|
168
|
+
* gateway operates in. Deposit settles to this asset; withdraw sources from this asset.
|
|
169
169
|
*/
|
|
170
170
|
asset: StridgeAsset;
|
|
171
171
|
/**
|
|
@@ -211,12 +211,12 @@ declare namespace StridgeProvider {
|
|
|
211
211
|
*
|
|
212
212
|
* @example
|
|
213
213
|
* ```tsx
|
|
214
|
-
* import { StridgeProvider
|
|
214
|
+
* import { StridgeProvider } from "@stridge/kit";
|
|
215
215
|
* import { DepositDialog } from "@stridge/kit/deposit/dialog";
|
|
216
216
|
*
|
|
217
217
|
* <StridgeProvider
|
|
218
218
|
* gatewayKey={process.env.NEXT_PUBLIC_STRIDGE_GATEWAY_KEY!}
|
|
219
|
-
* asset={{
|
|
219
|
+
* asset={{ networkId: "9006", symbol: "USDC" }}
|
|
220
220
|
* flows={{ deposit: {} }}
|
|
221
221
|
* appearance={{ theme: "dark", accent: "oklch(78% 0.15 240)", radius: "rounded" }}
|
|
222
222
|
* >
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{
|
|
1
|
+
"use client";import{createKitI18n as e}from"../shared/i18n/createKitI18n.js";import"../i18n/index.js";import{StridgeContext as t}from"./StridgeContext.js";import{createStridgeDepositDriver as n}from"../drivers/stridge/createStridgeDepositDriver.js";import{createStridgeWithdrawDriver as r}from"../drivers/stridge/createStridgeWithdrawDriver.js";import"../_internal/drivers/stridge/index.js";import{KitProvider as i}from"../KitProvider.js";import{resolveSupport as a}from"../shared/support/resolveSupport.js";import{useIntercomMerchantContext as o}from"../shared/support/useIntercomMerchantContext.js";import{useMerchantContext as s}from"../shared/support/useMerchantContext.js";import"../shared/support/index.js";import{useOptionalWagmi as c}from"./optionalWagmi.js";import{createStubDepositDriver as l,createStubWithdrawDriver as u}from"./stubs.js";import{useMemo as d,useRef as f,useSyncExternalStore as p}from"react";import{jsx as m}from"react/jsx-runtime";function h({gatewayKey:h,environment:g,asset:_,flows:v,appearance:y,i18n:b,storage:x,dev:S,support:C,className:w,children:T}){if(!v.deposit&&!v.withdraw)throw Error("<StridgeProvider /> requires at least one of `flows.deposit` or `flows.withdraw`.");if(!_)throw Error("<StridgeProvider /> requires `asset: { networkId, symbol }`.");let{config:E,address:D}=c(),O=d(()=>e(b??{}),[b?.locale,b?.messages]),k=f(O);k.current=O;let A=_.networkId,j=_.symbol,M=v.deposit,N=v.withdraw,P=M?.owner?.address??D??S?.userAddressOverride,F=N?.owner.address,I=d(()=>{if(!(!M||!P))return n({userAddress:P,projectKey:h,destination:{network_id:A,asset_symbol:j,to_address:M.destination.address},wagmiConfig:E,getI18n:()=>k.current,...g?{environment:g}:{},...M.minDepositUsd===void 0?{}:{minDepositUsd:M.minDepositUsd},...M.metadata?{metadata:M.metadata}:{}})},[M,P,h,g,A,j,E]),L=d(()=>l(),[]),R=M?I??L:void 0,z=d(()=>{if(!(!N||!F))return r({userAddress:F,projectKey:h,currency:{networkId:A,assetSymbol:j},wagmiConfig:E,getI18n:()=>k.current,...g?{environment:g}:{},...N.metadata?{metadata:N.metadata}:{}})},[N,F,h,g,A,j,E]),B=d(()=>u(),[]),V=N?z??B:void 0,H=I??z,U=p(e=>H?.subscribe(e)??(()=>{}),()=>{if(I){let e=I.getSnapshot();return e.brand.status===`ready`&&e.target.status===`ready`}return z?z.getSnapshot().receiveOptions.status===`ready`:!1},()=>!1),W=P??F,G=s({gatewayKey:h,environment:g??`production`,assetChain:A,assetSymbol:j,...W?{userAddress:W}:{},...I?{depositDriver:I}:{}});return o(a(C).kind===`stridge`?G:null),m(t,{value:d(()=>({isReady:U,driver:I}),[U,I]),children:m(i,{theme:y?.theme,accent:y?.accent,radius:y?.radius,direction:y?.direction,attribution:y?.attribution,i18n:b,storage:x?.driver,storageNamespace:x?.namespace,className:w,support:C,merchantContext:G,...R?{deposit:R}:{},...V?{withdraw:V}:{},children:T})})}export{h as StridgeProvider};
|
|
@@ -10,7 +10,7 @@ import { ASSET_PICKER_SLOTS, AssetPickerSlot } from "../../shared/widgets/asset-
|
|
|
10
10
|
import { ErrorStateActionsProps, ErrorStateAsset, ErrorStateAssetValueProps, ErrorStateBodyProps, ErrorStateDestination, ErrorStateDetailProps, ErrorStateDetailsProps, ErrorStateDialogProps, ErrorStateDisclosureChevronProps, ErrorStateHeaderProps, ErrorStateHelp, ErrorStateHelpInfoProps, ErrorStateHeroProps, ErrorStateMoreDetailsProps, ErrorStateProps, ErrorStateRowProps, ErrorStateSourceWallet, ErrorStateStatusValueProps, ErrorStateTxRef } from "../../shared/widgets/error-state/compound/types.js";
|
|
11
11
|
import { ErrorState } from "../../shared/widgets/error-state/compound/ErrorState.js";
|
|
12
12
|
import { ERROR_STATE_SLOTS, ErrorStateSlot } from "../../shared/widgets/error-state/compound/ErrorState.slots.js";
|
|
13
|
-
import {
|
|
13
|
+
import { ProcessingStateAsset, ProcessingStateBodyProps, ProcessingStateDetailProps, ProcessingStateDetailsProps, ProcessingStateDialogProps, ProcessingStateHeaderProps, ProcessingStateHeroProps, ProcessingStateProps, ProcessingStateRowProps, ProcessingStateSourceWallet, ProcessingStateStatusPillProps, ProcessingStateTxRef } from "../../shared/widgets/processing-state/compound/types.js";
|
|
14
14
|
import { ProcessingState } from "../../shared/widgets/processing-state/compound/ProcessingState.js";
|
|
15
15
|
import { PROCESSING_STATE_SLOTS, ProcessingStateSlot } from "../../shared/widgets/processing-state/compound/ProcessingState.slots.js";
|
|
16
16
|
import { SuccessStateActionsProps, SuccessStateAsset, SuccessStateAssetValueProps, SuccessStateBodyProps, SuccessStateDetailProps, SuccessStateDetailsProps, SuccessStateDialogProps, SuccessStateExplorer, SuccessStateHeaderProps, SuccessStateHeadlineProps, SuccessStateMoreDetailsProps, SuccessStateProps, SuccessStateRouteValueProps, SuccessStateRowProps, SuccessStateSourceWallet, SuccessStateStatusPillProps, SuccessStateTxRef } from "../../shared/widgets/success-state/compound/types.js";
|
|
@@ -19,4 +19,4 @@ import { SUCCESS_STATE_SLOTS, SuccessStateSlot } from "../../shared/widgets/succ
|
|
|
19
19
|
import { WithdrawFormAsset, WithdrawFormBalance, WithdrawFormBodyProps, WithdrawFormBreakdown, WithdrawFormDialogProps, WithdrawFormHeaderProps, WithdrawFormProps } from "../../flows/withdraw/widgets/withdraw-form/compound/types.js";
|
|
20
20
|
import { WithdrawForm } from "../../flows/withdraw/widgets/withdraw-form/compound/WithdrawForm.js";
|
|
21
21
|
import { WITHDRAW_FORM_SLOTS, WithdrawFormSlot } from "../../flows/withdraw/widgets/withdraw-form/compound/WithdrawForm.slots.js";
|
|
22
|
-
export { AMOUNT_ENTRY_SLOTS, ASSET_PICKER_SLOTS, AmountEntry, AmountEntryBodyProps, AmountEntryDialogProps, AmountEntryFlowProps, AmountEntryFooterProps, AmountEntryHeaderProps, AmountEntryHeroProps, AmountEntryPercentPreset, AmountEntryPillsProps, AmountEntryProps, AmountEntrySlot, AmountEntryToken, AssetOption, AssetPicker, AssetPickerAssetProps, AssetPickerBodyProps, AssetPickerDialogProps, AssetPickerFooterProps, AssetPickerHeaderProps, AssetPickerListProps, AssetPickerProps, AssetPickerSlot, AssetPickerToken, CONFIRM_TRANSFER_SLOTS, ConfirmTransfer, ConfirmTransferAmountsProps, ConfirmTransferBodyProps, ConfirmTransferBreakdown, ConfirmTransferBreakdownPercentRow, ConfirmTransferBreakdownProps, ConfirmTransferBreakdownTextRow, ConfirmTransferBreakdownUsdRow, ConfirmTransferDialogProps, ConfirmTransferDisclaimerProps, ConfirmTransferFooterProps, ConfirmTransferHeaderProps, ConfirmTransferHeroProps, ConfirmTransferMetaProps, ConfirmTransferProps, ConfirmTransferSlot, ConfirmTransferToken, ConfirmTransferTransfer, ERROR_STATE_SLOTS, ErrorState, ErrorStateActionsProps, ErrorStateAsset, ErrorStateAssetValueProps, ErrorStateBodyProps, ErrorStateDestination, ErrorStateDetailProps, ErrorStateDetailsProps, ErrorStateDialogProps, ErrorStateDisclosureChevronProps, ErrorStateHeaderProps, ErrorStateHelp, ErrorStateHelpInfoProps, ErrorStateHeroProps, ErrorStateMoreDetailsProps, ErrorStateProps, ErrorStateRowProps, ErrorStateSlot, ErrorStateSourceWallet, ErrorStateStatusValueProps, ErrorStateTxRef, PROCESSING_STATE_SLOTS, ProcessingState,
|
|
22
|
+
export { AMOUNT_ENTRY_SLOTS, ASSET_PICKER_SLOTS, AmountEntry, AmountEntryBodyProps, AmountEntryDialogProps, AmountEntryFlowProps, AmountEntryFooterProps, AmountEntryHeaderProps, AmountEntryHeroProps, AmountEntryPercentPreset, AmountEntryPillsProps, AmountEntryProps, AmountEntrySlot, AmountEntryToken, AssetOption, AssetPicker, AssetPickerAssetProps, AssetPickerBodyProps, AssetPickerDialogProps, AssetPickerFooterProps, AssetPickerHeaderProps, AssetPickerListProps, AssetPickerProps, AssetPickerSlot, AssetPickerToken, CONFIRM_TRANSFER_SLOTS, ConfirmTransfer, ConfirmTransferAmountsProps, ConfirmTransferBodyProps, ConfirmTransferBreakdown, ConfirmTransferBreakdownPercentRow, ConfirmTransferBreakdownProps, ConfirmTransferBreakdownTextRow, ConfirmTransferBreakdownUsdRow, ConfirmTransferDialogProps, ConfirmTransferDisclaimerProps, ConfirmTransferFooterProps, ConfirmTransferHeaderProps, ConfirmTransferHeroProps, ConfirmTransferMetaProps, ConfirmTransferProps, ConfirmTransferSlot, ConfirmTransferToken, ConfirmTransferTransfer, ERROR_STATE_SLOTS, ErrorState, ErrorStateActionsProps, ErrorStateAsset, ErrorStateAssetValueProps, ErrorStateBodyProps, ErrorStateDestination, ErrorStateDetailProps, ErrorStateDetailsProps, ErrorStateDialogProps, ErrorStateDisclosureChevronProps, ErrorStateHeaderProps, ErrorStateHelp, ErrorStateHelpInfoProps, ErrorStateHeroProps, ErrorStateMoreDetailsProps, ErrorStateProps, ErrorStateRowProps, ErrorStateSlot, ErrorStateSourceWallet, ErrorStateStatusValueProps, ErrorStateTxRef, PROCESSING_STATE_SLOTS, ProcessingState, ProcessingStateAsset, ProcessingStateBodyProps, ProcessingStateDetailProps, ProcessingStateDetailsProps, ProcessingStateDialogProps, ProcessingStateHeaderProps, ProcessingStateHeroProps, ProcessingStateProps, ProcessingStateRowProps, ProcessingStateSlot, ProcessingStateSourceWallet, ProcessingStateStatusPillProps, ProcessingStateTxRef, SUCCESS_STATE_SLOTS, SuccessState, SuccessStateActionsProps, SuccessStateAsset, SuccessStateAssetValueProps, SuccessStateBodyProps, SuccessStateDetailProps, SuccessStateDetailsProps, SuccessStateDialogProps, SuccessStateExplorer, SuccessStateHeaderProps, SuccessStateHeadlineProps, SuccessStateMoreDetailsProps, SuccessStateProps, SuccessStateRouteValueProps, SuccessStateRowProps, SuccessStateSlot, SuccessStateSourceWallet, SuccessStateStatusPillProps, SuccessStateTxRef, WITHDRAW_FORM_SLOTS, WithdrawForm, WithdrawFormAsset, WithdrawFormBalance, WithdrawFormBodyProps, WithdrawFormBreakdown, WithdrawFormDialogProps, WithdrawFormHeaderProps, WithdrawFormProps, WithdrawFormSlot };
|
package/package.json
CHANGED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { ProcessingStateActionsProps } from "../types.js";
|
|
2
|
-
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
|
-
|
|
4
|
-
//#region src/shared/widgets/processing-state/compound/components/Actions.d.ts
|
|
5
|
-
/**
|
|
6
|
-
* Action row with the primary "Close — we'll notify you" CTA. Rendered as a quiet/subdued button rather than the
|
|
7
|
-
* accent fill, since dismiss during an in-flight credit is a soft action.
|
|
8
|
-
*
|
|
9
|
-
* Reads `onClose` and `closeLabel` from the {@link ProcessingState} root
|
|
10
|
-
* by default; pass props to override per-instance.
|
|
11
|
-
*/
|
|
12
|
-
declare function ProcessingStateActions({
|
|
13
|
-
onClose,
|
|
14
|
-
closeLabel
|
|
15
|
-
}?: ProcessingStateActionsProps): _$react_jsx_runtime0.JSX.Element;
|
|
16
|
-
//#endregion
|
|
17
|
-
export { ProcessingStateActions };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use client";import{useLingui as e}from"../../../../i18n/useLingui.js";import"../../../../../i18n/index.js";import{MailIcon as t}from"../../../../icons/MailIcon.js";import"../../../../../icons/index.js";import{Button as n}from"../../../../ui/Button/Button.js";import"../../../../ui/Button/index.js";import{text as r}from"../../../../ui/Text/Text.js";import"../../../../../ui/index.js";import{useProcessingStateContext as i}from"../context.js";import{PROCESSING_STATE_SLOTS as a}from"../ProcessingState.slots.js";import{styles as o}from"../ProcessingState.styles.js";import{jsx as s}from"react/jsx-runtime";import*as c from"@stylexjs/stylex";function l({onClose:l,closeLabel:u}={}){let d=i(`ProcessingState.Actions`),{_:f}=e(),p=l??d.onClose,m=u??d.closeLabel??f({id:`HfPDJV`,message:`Close — we'll notify you`}),h=typeof p==`function`;return s(`div`,{"data-stridge-slot":a.actions,...c.props(o.actions),children:s(n,{size:`cta`,variant:`secondary`,prefix:s(t,{"aria-hidden":!0}),onClick:h?p:void 0,...c.props(o.closeCta,h?o.closeCtaInteractive:o.closeCtaInert),children:s(r.span,{size:`callout`,fontWeight:`semibold`,leading:`tight`,tracking:`tight`,color:`inherit`,children:m})})})}export{l as ProcessingStateActions};
|