@stridge/kit 0.1.0-alpha.49 → 0.1.0-alpha.50
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_internal/deposit/widgets/index.d.ts +3 -1
- package/dist/_internal/deposit/widgets/index.js +1 -1
- package/dist/_internal/withdraw/widgets/index.d.ts +3 -1
- package/dist/_internal/withdraw/widgets/index.js +1 -1
- package/dist/activity-history/compound/index.d.ts +9 -0
- package/dist/activity-history/compound/index.js +1 -0
- package/dist/drivers/stridge/createStridgeDepositDriver.js +1 -1
- package/dist/drivers/stridge/createStridgeWithdrawDriver.js +1 -1
- package/dist/drivers/stridge/internal/pollOnce.js +1 -1
- package/dist/drivers/stridge-mock/createStridgeMockDriver.d.ts +2 -0
- package/dist/drivers/stridge-mock/createStridgeMockDriver.js +1 -1
- package/dist/drivers/stridge-mock/createStridgeMockWithdrawDriver.d.ts +2 -1
- package/dist/drivers/stridge-mock/createStridgeMockWithdrawDriver.js +1 -1
- package/dist/drivers/stridge-mock/fixtures.d.ts +1 -1
- package/dist/drivers/stridge-mock/fixtures.js +1 -1
- package/dist/flows/deposit/dialog/DepositDialog.js +1 -1
- package/dist/flows/deposit/driver/transformers/balanceToBalancesPayload.d.ts +2 -0
- package/dist/flows/deposit/driver/transformers/index.d.ts +1 -0
- package/dist/flows/deposit/driver/transformers/quoteToPayload.d.ts +2 -0
- package/dist/flows/deposit/driver/transformers/settlementToPayload.d.ts +25 -0
- package/dist/flows/deposit/driver/transformers/startToAddressesPayload.d.ts +2 -0
- package/dist/flows/deposit/driver/transformers/startToBrandPayload.d.ts +1 -0
- package/dist/flows/deposit/driver/transformers/startToTargetPayload.d.ts +2 -0
- package/dist/flows/deposit/driver/transformers/walletAddressToWalletPayload.d.ts +1 -0
- package/dist/flows/deposit/driver/types.d.ts +38 -1
- package/dist/flows/deposit/orchestrator/controller.js +1 -1
- package/dist/flows/deposit/orchestrator/reducer.js +1 -1
- package/dist/flows/deposit/orchestrator/types.d.ts +73 -0
- package/dist/flows/deposit/widgets/activity-history/DepositHistoryDetail.d.ts +40 -0
- package/dist/flows/deposit/widgets/activity-history/DepositHistoryDetail.js +1 -0
- package/dist/flows/deposit/widgets/activity-history/DepositHistoryList.d.ts +38 -0
- package/dist/flows/deposit/widgets/activity-history/DepositHistoryList.js +1 -0
- package/dist/flows/deposit/widgets/activity-history/index.d.ts +2 -0
- package/dist/flows/deposit/widgets/activity-history/index.js +1 -0
- package/dist/flows/deposit/widgets/activity-history/useDepositActivityHistorySource.js +1 -0
- package/dist/flows/deposit/widgets/amount-entry/AmountEntry.js +1 -1
- package/dist/flows/deposit/widgets/asset-picker/AssetPicker.js +1 -1
- package/dist/flows/deposit/widgets/deposit/compound/Deposit.styles.js +1 -1
- package/dist/flows/deposit/widgets/deposit/compound/components/Header.d.ts +10 -0
- package/dist/flows/deposit/widgets/deposit/compound/components/Header.js +1 -1
- package/dist/flows/deposit/widgets/transfer-crypto/compound/TransferCrypto.styles.js +1 -1
- package/dist/flows/deposit/widgets/transfer-crypto/compound/components/Header.d.ts +5 -0
- package/dist/flows/deposit/widgets/transfer-crypto/compound/components/Header.js +1 -1
- package/dist/flows/shared/transformers/computeQuoteAttrs.d.ts +1 -0
- package/dist/flows/shared/transformers/index.d.ts +1 -0
- package/dist/flows/shared/transformers/pickRelevantSettlement.d.ts +1 -0
- package/dist/flows/withdraw/dialog/WithdrawDialog.js +1 -1
- package/dist/flows/withdraw/driver/types.d.ts +34 -0
- package/dist/flows/withdraw/orchestrator/controller.js +1 -1
- package/dist/flows/withdraw/orchestrator/reducer.js +1 -1
- package/dist/flows/withdraw/orchestrator/types.d.ts +70 -0
- package/dist/flows/withdraw/widgets/activity-history/WithdrawHistoryDetail.d.ts +39 -0
- package/dist/flows/withdraw/widgets/activity-history/WithdrawHistoryDetail.js +1 -0
- package/dist/flows/withdraw/widgets/activity-history/WithdrawHistoryList.d.ts +36 -0
- package/dist/flows/withdraw/widgets/activity-history/WithdrawHistoryList.js +1 -0
- package/dist/flows/withdraw/widgets/activity-history/index.d.ts +2 -0
- package/dist/flows/withdraw/widgets/activity-history/index.js +1 -0
- package/dist/flows/withdraw/widgets/activity-history/useWithdrawActivityHistorySource.js +1 -0
- package/dist/flows/withdraw/widgets/withdraw-form/compound/components/Header.d.ts +6 -1
- package/dist/flows/withdraw/widgets/withdraw-form/compound/components/Header.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/icons/index.d.ts +2 -1
- package/dist/icons/index.js +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/package.js +1 -1
- package/dist/shared/icons/HistoryIcon.d.ts +12 -0
- package/dist/shared/icons/HistoryIcon.js +1 -0
- package/dist/shared/ui/SelectableTile/SelectableTile.d.ts +21 -8
- package/dist/shared/ui/SelectableTile/SelectableTile.js +1 -1
- package/dist/shared/widgets/activity-history/ActivityTrigger.js +1 -0
- package/dist/shared/widgets/activity-history/ActivityTrigger.styles.js +1 -0
- package/dist/shared/widgets/activity-history/adapters/settlementToWidgetProps.js +1 -0
- package/dist/shared/widgets/activity-history/compound/ActivityHistory.d.ts +95 -0
- package/dist/shared/widgets/activity-history/compound/ActivityHistory.js +1 -0
- package/dist/shared/widgets/activity-history/compound/ActivityHistory.slots.d.ts +22 -0
- package/dist/shared/widgets/activity-history/compound/ActivityHistory.slots.js +1 -0
- package/dist/shared/widgets/activity-history/compound/ActivityHistory.styles.js +1 -0
- package/dist/shared/widgets/activity-history/compound/ActivityHistoryDetail.d.ts +75 -0
- package/dist/shared/widgets/activity-history/compound/ActivityHistoryDetail.js +1 -0
- package/dist/shared/widgets/activity-history/compound/Row.slots.d.ts +21 -0
- package/dist/shared/widgets/activity-history/compound/Row.slots.js +1 -0
- package/dist/shared/widgets/activity-history/compound/Row.styles.js +1 -0
- package/dist/shared/widgets/activity-history/compound/components/Empty.d.ts +15 -0
- package/dist/shared/widgets/activity-history/compound/components/Empty.js +1 -0
- package/dist/shared/widgets/activity-history/compound/components/ErrorView.d.ts +26 -0
- package/dist/shared/widgets/activity-history/compound/components/ErrorView.js +1 -0
- package/dist/shared/widgets/activity-history/compound/components/HistoryHeader.d.ts +39 -0
- package/dist/shared/widgets/activity-history/compound/components/HistoryHeader.js +1 -0
- package/dist/shared/widgets/activity-history/compound/components/List.d.ts +23 -0
- package/dist/shared/widgets/activity-history/compound/components/List.js +1 -0
- package/dist/shared/widgets/activity-history/compound/components/Row.d.ts +54 -0
- package/dist/shared/widgets/activity-history/compound/components/Row.js +1 -0
- package/dist/shared/widgets/activity-history/compound/components/StatusPip.js +1 -0
- package/dist/shared/widgets/activity-history/compound/context.d.ts +79 -0
- package/dist/shared/widgets/activity-history/compound/context.js +1 -0
- package/dist/shared/widgets/activity-history/index.js +1 -0
- package/dist/shared/widgets/activity-history/payloads.d.ts +81 -0
- package/dist/shared/widgets/activity-history/transformers/historyResponseToPayload.js +1 -0
- package/dist/shared/widgets/activity-history/transformers/resolveDirection.js +1 -0
- package/dist/shared/widgets/amount-entry/compound/AmountEntry.js +1 -1
- package/dist/shared/widgets/amount-entry/compound/AmountEntry.styles.js +1 -1
- package/dist/shared/widgets/amount-entry/compound/components/Header.d.ts +6 -1
- package/dist/shared/widgets/amount-entry/compound/components/Header.js +1 -1
- package/dist/shared/widgets/amount-entry/compound/types.d.ts +14 -0
- package/dist/shared/widgets/asset-picker/compound/AssetPicker.js +1 -1
- package/dist/shared/widgets/asset-picker/compound/AssetPicker.styles.js +1 -1
- package/dist/shared/widgets/asset-picker/compound/components/Header.d.ts +6 -1
- package/dist/shared/widgets/asset-picker/compound/components/Header.js +1 -1
- package/dist/shared/widgets/asset-picker/compound/types.d.ts +14 -0
- package/dist/stridge/stubs.js +1 -1
- package/dist/styles/index.css +86 -0
- package/package.json +7 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
const e={name:`closed`};function t(e,t){if(t.type===`RESUME_TO_PROCESSING`)return e.name===`closed`?e:{name:`processing`,ctx:{method:t.method,tx:t.tx,retryTargetForFailure:{kind:`fresh`}}};if(t.type===`RESUME_TO_SUCCESS`)return e.name===`closed`?e:{name:`success`,ctx:{method:t.method,tx:t.tx}};if(t.type===`RESUME_TO_ERROR`)return e.name===`closed`?e:{name:`error`,ctx:{retryTarget:{kind:`fresh`},...t.tx?{tx:t.tx}:{}}};switch(e.name){case`closed`:return n(t);case`deposit`:return r(e,t);case`assetPicker`:return i(e,t);case`amountEntry`:return a(e,t);case`confirmDeposit`:return o(e,t);case`transferCrypto`:return s(e,t);case`processing`:return c(e,t);case`success`:return l(e,t);case`error`:return u(e,t);default:return
|
|
1
|
+
const e={name:`closed`};function t(e,t){if(t.type===`RESUME_TO_PROCESSING`)return e.name===`closed`?e:{name:`processing`,ctx:{method:t.method,tx:t.tx,retryTargetForFailure:{kind:`fresh`}}};if(t.type===`RESUME_TO_SUCCESS`)return e.name===`closed`?e:{name:`success`,ctx:{method:t.method,tx:t.tx}};if(t.type===`RESUME_TO_ERROR`)return e.name===`closed`?e:{name:`error`,ctx:{retryTarget:{kind:`fresh`},...t.tx?{tx:t.tx}:{}}};switch(e.name){case`closed`:return n(t);case`deposit`:return r(e,t);case`assetPicker`:return i(e,t);case`amountEntry`:return a(e,t);case`confirmDeposit`:return o(e,t);case`transferCrypto`:return s(e,t);case`processing`:return c(e,t);case`success`:return l(e,t);case`error`:return u(e,t);case`historyList`:return d(e,t);case`historyDetail`:return f(e,t);default:return h(e)}}function n(e){if(e.type!==`OPEN`)return{name:`closed`};let t=e.input;return t?t.method===`transfer`?{name:`transferCrypto`,ctx:{method:`transfer`,backTarget:`closed`}}:t.asset?{name:`amountEntry`,ctx:{method:`wallet`,asset:t.asset,backTarget:`closed`}}:{name:`assetPicker`,ctx:{method:`wallet`,backTarget:`closed`}}:{name:`deposit`,ctx:{backTarget:`closed`}}}function r(e,t){switch(t.type){case`DEPOSIT_METHOD_SELECTED`:return t.method===`wallet`?{name:`assetPicker`,ctx:{method:`wallet`,backTarget:`deposit`}}:{name:`transferCrypto`,ctx:{method:`transfer`,backTarget:`deposit`}};case`OPEN_HISTORY`:return{name:`historyList`,ctx:{backTarget:{kind:`deposit`,backTarget:`closed`}}};case`BACK`:case`CLOSE`:return{name:`closed`};default:return e}}function i(e,t){switch(t.type){case`ASSET_CONFIRMED`:return{name:`amountEntry`,ctx:{method:`wallet`,asset:t.asset,backTarget:`assetPicker`}};case`OPEN_HISTORY`:return{name:`historyList`,ctx:{backTarget:{kind:`assetPicker`,method:`wallet`,backTarget:e.ctx.backTarget}}};case`BACK`:return e.ctx.backTarget===`deposit`?{name:`deposit`,ctx:{backTarget:`closed`}}:{name:`closed`};case`CLOSE`:return{name:`closed`};default:return e}}function a(e,t){switch(t.type){case`AMOUNT_CONFIRMED`:return{name:`confirmDeposit`,ctx:{method:`wallet`,asset:e.ctx.asset,amount:t.amount,phase:{kind:`loading`},backTarget:`amountEntry`}};case`OPEN_HISTORY`:return{name:`historyList`,ctx:{backTarget:{kind:`amountEntry`,method:`wallet`,asset:e.ctx.asset,backTarget:e.ctx.backTarget}}};case`BACK`:return e.ctx.backTarget===`assetPicker`?{name:`assetPicker`,ctx:{method:`wallet`,backTarget:`deposit`}}:{name:`closed`};case`CLOSE`:return{name:`closed`};default:return e}}function o(e,t){let n=e.ctx.phase;switch(t.type){case`QUOTE_RESOLVED`:return n.kind===`loading`||n.kind===`regenerating`?{...e,ctx:{...e.ctx,phase:{kind:`ready`,quoteExpiresAt:t.expiresAt}}}:e;case`QUOTE_FAILED`:return n.kind===`loading`||n.kind===`regenerating`?{...e,ctx:{...e.ctx,phase:{kind:`failed`,failure:t.failure,recoverFrom:`quote`}}}:e;case`QUOTE_RETRY`:return n.kind===`failed`?{...e,ctx:{...e.ctx,phase:{kind:`loading`}}}:e;case`QUOTE_EXPIRED`:return n.kind===`ready`?{...e,ctx:{...e.ctx,phase:{kind:`regenerating`}}}:e;case`DEPOSIT_CONFIRMED`:return n.kind===`ready`?{...e,ctx:{...e.ctx,phase:{kind:`submitting`}}}:e;case`DEPOSIT_SUBMITTED`:if(n.kind===`submitting`){let n={kind:`confirmDepositReady`,method:`wallet`,asset:e.ctx.asset,amount:e.ctx.amount};return{name:`processing`,ctx:{method:`wallet`,tx:t.tx,retryTargetForFailure:n}}}return e;case`DEPOSIT_SUBMISSION_FAILED`:return n.kind===`submitting`?{...e,ctx:{...e.ctx,phase:{kind:`failed`,failure:t.failure,recoverFrom:`submission`}}}:e;case`DEPOSIT_SIGNATURE_DECLINED`:return n.kind===`submitting`?{...e,ctx:{...e.ctx,phase:{kind:`regenerating`,...t.notice?{notice:t.notice}:{}}}}:e;case`BACK`:return{name:`amountEntry`,ctx:{method:`wallet`,asset:e.ctx.asset,backTarget:`assetPicker`}};case`CLOSE`:return{name:`closed`};default:return e}}function s(e,t){switch(t.type){case`OPEN_HISTORY`:return{name:`historyList`,ctx:{backTarget:{kind:`transferCrypto`,method:`transfer`,backTarget:e.ctx.backTarget}}};case`BACK`:return e.ctx.backTarget===`deposit`?{name:`deposit`,ctx:{backTarget:`closed`}}:{name:`closed`};case`CLOSE`:return{name:`closed`};default:return e}}function c(e,t){switch(t.type){case`PROCESSING_SUCCEEDED`:return{name:`success`,ctx:{method:e.ctx.method,tx:e.ctx.tx}};case`PROCESSING_FAILED`:return{name:`error`,ctx:{retryTarget:e.ctx.retryTargetForFailure,tx:e.ctx.tx}};case`CLOSE`:return{name:`closed`};default:return e}}function l(e,t){return t.type===`SUCCESS_DONE`||t.type===`CLOSE`?{name:`closed`}:e}function u(e,t){return t.type===`ERROR_TRY_AGAIN`?m(e.ctx.retryTarget):t.type===`CLOSE`?{name:`closed`}:e}function d(e,t){switch(t.type){case`SELECT_SETTLEMENT`:return{name:`historyDetail`,ctx:{settlementId:t.settlementId,backTarget:e.ctx.backTarget}};case`BACK`:return p(e.ctx.backTarget);case`CLOSE`:return{name:`closed`};default:return e}}function f(e,t){switch(t.type){case`BACK`:return{name:`historyList`,ctx:{backTarget:e.ctx.backTarget}};case`CLOSE`:return{name:`closed`};default:return e}}function p(e){return e.kind===`deposit`?{name:`deposit`,ctx:{backTarget:`closed`}}:e.kind===`assetPicker`?{name:`assetPicker`,ctx:{method:`wallet`,backTarget:e.backTarget}}:e.kind===`amountEntry`?{name:`amountEntry`,ctx:{method:`wallet`,asset:e.asset,backTarget:e.backTarget}}:{name:`transferCrypto`,ctx:{method:`transfer`,backTarget:e.backTarget}}}function m(e){return e.kind===`fresh`?{name:`deposit`,ctx:{backTarget:`closed`}}:e.kind===`transferCrypto`?{name:`transferCrypto`,ctx:{method:`transfer`,backTarget:e.backTarget}}:{name:`confirmDeposit`,ctx:{method:`wallet`,asset:e.asset,amount:e.amount,phase:{kind:`loading`},backTarget:`amountEntry`}}}function h(e){throw Error(`Unhandled state: ${JSON.stringify(e)}`)}export{e as initialState,t as reducer};
|
|
@@ -76,6 +76,31 @@ type RetryTargetSpec = {
|
|
|
76
76
|
*/
|
|
77
77
|
kind: "fresh";
|
|
78
78
|
};
|
|
79
|
+
/**
|
|
80
|
+
* Where `BACK` lands when the user exits the activity surface. Encoded once at `OPEN_HISTORY`
|
|
81
|
+
* time so the back chevron can restore each pre-commit source state lossless — same precedent
|
|
82
|
+
* as {@link RetryTargetSpec}, just for the history-exit path instead of the error-retry path.
|
|
83
|
+
*
|
|
84
|
+
* The discriminant `kind` mirrors the source-state name. The remaining fields carry exactly the
|
|
85
|
+
* ctx slots needed to rebuild that state (method, asset, inner backTarget).
|
|
86
|
+
*/
|
|
87
|
+
type HistoryBackTarget = {
|
|
88
|
+
kind: "deposit";
|
|
89
|
+
backTarget: "closed";
|
|
90
|
+
} | {
|
|
91
|
+
kind: "assetPicker";
|
|
92
|
+
method: "wallet";
|
|
93
|
+
backTarget: "closed" | "deposit";
|
|
94
|
+
} | {
|
|
95
|
+
kind: "amountEntry";
|
|
96
|
+
method: "wallet";
|
|
97
|
+
asset: BalanceItemPayload;
|
|
98
|
+
backTarget: "closed" | "assetPicker";
|
|
99
|
+
} | {
|
|
100
|
+
kind: "transferCrypto";
|
|
101
|
+
method: "transfer";
|
|
102
|
+
backTarget: "closed" | "deposit";
|
|
103
|
+
};
|
|
79
104
|
/**
|
|
80
105
|
* State machine state nodes. Per-state discriminated ctx narrows what is available — illegal
|
|
81
106
|
* states (e.g. `confirmDeposit` without an asset) are unrepresentable.
|
|
@@ -144,6 +169,27 @@ type DepositState = {
|
|
|
144
169
|
failure?: FailureInfo; /** Source-chain tx hash when the error followed a successful broadcast. */
|
|
145
170
|
tx?: TxRef;
|
|
146
171
|
};
|
|
172
|
+
} | {
|
|
173
|
+
/**
|
|
174
|
+
* Activity history list — reachable from any pre-commit state via the header icon.
|
|
175
|
+
* `backTarget` snapshots the source state at `OPEN_HISTORY` time so the back chevron
|
|
176
|
+
* can restore it lossless.
|
|
177
|
+
*/
|
|
178
|
+
name: "historyList";
|
|
179
|
+
ctx: {
|
|
180
|
+
backTarget: HistoryBackTarget;
|
|
181
|
+
};
|
|
182
|
+
} | {
|
|
183
|
+
/**
|
|
184
|
+
* Activity history per-settlement detail — reached from `historyList` via
|
|
185
|
+
* `SELECT_SETTLEMENT`. Carries the selected row's id and the same `backTarget` so
|
|
186
|
+
* `BACK` collapses to `historyList` first, then to the original source step.
|
|
187
|
+
*/
|
|
188
|
+
name: "historyDetail";
|
|
189
|
+
ctx: {
|
|
190
|
+
settlementId: string;
|
|
191
|
+
backTarget: HistoryBackTarget;
|
|
192
|
+
};
|
|
147
193
|
};
|
|
148
194
|
type DepositStateName = DepositState["name"];
|
|
149
195
|
/**
|
|
@@ -234,6 +280,22 @@ type GatewayEvent = {
|
|
|
234
280
|
*/
|
|
235
281
|
type: "RESUME_TO_ERROR";
|
|
236
282
|
tx?: TxRef;
|
|
283
|
+
} | {
|
|
284
|
+
/**
|
|
285
|
+
* User tapped the header history icon. Legal from every pre-commit state
|
|
286
|
+
* (`deposit | assetPicker | amountEntry | transferCrypto`); ignored elsewhere. The
|
|
287
|
+
* reducer snapshots the source state into a {@link HistoryBackTarget} so the back
|
|
288
|
+
* chevron can restore it lossless.
|
|
289
|
+
*/
|
|
290
|
+
type: "OPEN_HISTORY";
|
|
291
|
+
} | {
|
|
292
|
+
/**
|
|
293
|
+
* User tapped a row in the activity list. Legal only from `historyList`; transitions
|
|
294
|
+
* to `historyDetail` carrying the selected `settlementId` and the same `backTarget`,
|
|
295
|
+
* so a later `BACK` from the list step restores the original source state.
|
|
296
|
+
*/
|
|
297
|
+
type: "SELECT_SETTLEMENT";
|
|
298
|
+
settlementId: string;
|
|
237
299
|
};
|
|
238
300
|
/**
|
|
239
301
|
* Public open-input variant accepted by `useDeposit().open()`. Hosts pass the small ID-based
|
|
@@ -290,6 +352,17 @@ interface DepositActions {
|
|
|
290
352
|
resumeToSuccess(method: DepositMethod, tx: TxRef): void;
|
|
291
353
|
/** Banner-driven jump into the error widget. */
|
|
292
354
|
resumeToError(tx?: TxRef): void;
|
|
355
|
+
/**
|
|
356
|
+
* Header-icon entry into the activity surface. Legal from every pre-commit state; ignored
|
|
357
|
+
* elsewhere. Snapshots the current state into a {@link HistoryBackTarget} so `back()` can
|
|
358
|
+
* restore it lossless.
|
|
359
|
+
*/
|
|
360
|
+
openHistory(): void;
|
|
361
|
+
/**
|
|
362
|
+
* Open the detail view for a settlement listed on the activity surface. Legal only from
|
|
363
|
+
* `historyList`; transitions the FSM to `historyDetail`.
|
|
364
|
+
*/
|
|
365
|
+
selectSettlement(settlementId: string): void;
|
|
293
366
|
}
|
|
294
367
|
//#endregion
|
|
295
368
|
export { ConfirmDepositPhase, DepositActions, DepositController, DepositMethod, DepositMethodConfig, DepositMethodsConfig, DepositState, DepositStateName, GatewayEvent, OpenInput, ResolvedOpenInput, RetryTargetSpec };
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
|
+
|
|
4
|
+
//#region src/flows/deposit/widgets/activity-history/DepositHistoryDetail.d.ts
|
|
5
|
+
interface DepositHistoryDetailOwnProps {
|
|
6
|
+
/**
|
|
7
|
+
* Optional custom composition forwarded to the underlying `<ActivityHistoryDetail>`
|
|
8
|
+
* compound. Defaults to mounting all three per-kind parts; each gates internally on the
|
|
9
|
+
* resolved payload's `kind`.
|
|
10
|
+
*/
|
|
11
|
+
children?: ReactNode;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Orchestrated activity-history detail wrapper for the deposit dialog. Mounts the cross-flow
|
|
15
|
+
* `<ActivityHistoryDetail>` compound and exposes per-kind parts (`Processing`, `Succeeded`,
|
|
16
|
+
* `Failed`) as namespace members. Renders `null` while the FSM is not on `historyDetail`.
|
|
17
|
+
*/
|
|
18
|
+
declare function DepositHistoryDetail({
|
|
19
|
+
children
|
|
20
|
+
}: DepositHistoryDetailOwnProps): _$react_jsx_runtime0.JSX.Element | null;
|
|
21
|
+
declare namespace DepositHistoryDetail {
|
|
22
|
+
type Props = DepositHistoryDetailOwnProps;
|
|
23
|
+
const Processing: ({
|
|
24
|
+
children
|
|
25
|
+
}: {
|
|
26
|
+
children?: ReactNode;
|
|
27
|
+
}) => _$react_jsx_runtime0.JSX.Element | null;
|
|
28
|
+
const Succeeded: ({
|
|
29
|
+
children
|
|
30
|
+
}: {
|
|
31
|
+
children?: ReactNode;
|
|
32
|
+
}) => _$react_jsx_runtime0.JSX.Element | null;
|
|
33
|
+
const Failed: ({
|
|
34
|
+
children
|
|
35
|
+
}: {
|
|
36
|
+
children?: ReactNode;
|
|
37
|
+
}) => _$react_jsx_runtime0.JSX.Element | null;
|
|
38
|
+
}
|
|
39
|
+
//#endregion
|
|
40
|
+
export { DepositHistoryDetail };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{ActivityHistorySourceProvider as e}from"../../../../shared/widgets/activity-history/compound/context.js";import{ActivityHistoryDetail as t}from"../../../../shared/widgets/activity-history/compound/ActivityHistoryDetail.js";import"../../../../activity-history/compound/index.js";import{useDepositActivityHistorySource as n}from"./useDepositActivityHistorySource.js";import{jsx as r}from"react/jsx-runtime";function i({children:i}){let{sourceValue:a,step:o}=n();return o!==`historyDetail`||!a?null:r(e,{value:a,children:r(t,{children:i})})}(function(e){e.Processing=t.Processing,e.Succeeded=t.Succeeded,e.Failed=t.Failed})(i||={});export{i as DepositHistoryDetail};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { ActivityHistoryEmpty } from "../../../../shared/widgets/activity-history/compound/components/Empty.js";
|
|
2
|
+
import { ActivityHistoryErrorView } from "../../../../shared/widgets/activity-history/compound/components/ErrorView.js";
|
|
3
|
+
import { ActivityHistoryHeader, ActivityHistoryListHeader } from "../../../../shared/widgets/activity-history/compound/components/HistoryHeader.js";
|
|
4
|
+
import { ActivityHistoryList } from "../../../../shared/widgets/activity-history/compound/components/List.js";
|
|
5
|
+
import { ActivityHistoryRow } from "../../../../shared/widgets/activity-history/compound/components/Row.js";
|
|
6
|
+
import { ComponentProps, ReactNode } from "react";
|
|
7
|
+
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
8
|
+
|
|
9
|
+
//#region src/flows/deposit/widgets/activity-history/DepositHistoryList.d.ts
|
|
10
|
+
interface DepositHistoryListOwnProps {
|
|
11
|
+
/**
|
|
12
|
+
* Optional custom composition forwarded to the underlying `<ActivityHistory>` compound.
|
|
13
|
+
* Defaults to the compound's `<Header /> + <List />` shape.
|
|
14
|
+
*/
|
|
15
|
+
children?: ReactNode;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Orchestrated activity-history list wrapper for the deposit dialog. Bridges the deposit
|
|
19
|
+
* flow's snapshot + actions + FSM state into the cross-flow `<ActivityHistory>` compound's
|
|
20
|
+
* source value. Renders `null` while the FSM is not on `historyList` — the dialog's step
|
|
21
|
+
* router only matches the active step, but the no-op guard keeps the component safe to mount
|
|
22
|
+
* in custom dialog compositions that skip the step router.
|
|
23
|
+
*/
|
|
24
|
+
declare function DepositHistoryList({
|
|
25
|
+
children,
|
|
26
|
+
...props
|
|
27
|
+
}: ComponentProps<"div"> & DepositHistoryListOwnProps): _$react_jsx_runtime0.JSX.Element | null;
|
|
28
|
+
declare namespace DepositHistoryList {
|
|
29
|
+
type Props = ComponentProps<"div"> & DepositHistoryListOwnProps;
|
|
30
|
+
const Header: typeof ActivityHistoryHeader;
|
|
31
|
+
const ListHeader: typeof ActivityHistoryListHeader;
|
|
32
|
+
const List: typeof ActivityHistoryList;
|
|
33
|
+
const Row: typeof ActivityHistoryRow;
|
|
34
|
+
const Empty: typeof ActivityHistoryEmpty;
|
|
35
|
+
const ErrorView: typeof ActivityHistoryErrorView;
|
|
36
|
+
}
|
|
37
|
+
//#endregion
|
|
38
|
+
export { DepositHistoryList };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{ActivityHistorySourceProvider as e}from"../../../../shared/widgets/activity-history/compound/context.js";import{ActivityHistory as t}from"../../../../shared/widgets/activity-history/compound/ActivityHistory.js";import"../../../../activity-history/compound/index.js";import{useDepositActivityHistorySource as n}from"./useDepositActivityHistorySource.js";import{jsx as r}from"react/jsx-runtime";function i({children:i,...a}){let{sourceValue:o,step:s}=n();return s!==`historyList`||!o?null:r(e,{value:o,children:r(t,{...a,children:i})})}(function(e){e.Header=t.Header,e.ListHeader=t.ListHeader,e.List=t.List,e.Row=t.Row,e.Empty=t.Empty,e.ErrorView=t.ErrorView})(i||={});export{i as DepositHistoryList};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./DepositHistoryDetail.js";import"./DepositHistoryList.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{useDepositDriverInstance as e,useDepositSnapshot as t}from"../../driver/context.js";import{useLingui as n}from"../../../../shared/i18n/useLingui.js";import"../../../../i18n/index.js";import{useDepositActions as r,useDepositEffectiveState as i}from"../../orchestrator/controller.js";import{defaultBlockExplorers as a}from"../../../../shared/utils/explorers.js";import{useCallback as o,useMemo as s}from"react";function c(){let c=t(),l=r(),u=e(),d=i(),{i18n:f}=n(),p=o(e=>{u.refreshHistory?.(e)},[u]),m=d.name===`historyList`||d.name===`historyDetail`,h=d.name===`historyDetail`?d.ctx.settlementId:void 0;return{sourceValue:s(()=>{if(!m)return null;let e=c.wallet,t=e.status===`ready`||e.status===`stale`?e.payload.address.value:`0x0000000000000000000000000000000000000000`,n=c.brand,r=n.status===`ready`||n.status===`stale`?n.payload.name:void 0,i={i18n:f,sourceWallet:{name:`Wallet`,address:t},explorers:a(),...r?{brandName:r}:{}};return{entity:c.history,refresh:p,selectSettlement:l.selectSettlement,back:l.back,...h===void 0?{}:{settlementId:h},settlementContext:i}},[c,l,m,h,f,p]),settlementId:h,step:d.name===`historyList`?`historyList`:d.name===`historyDetail`?`historyDetail`:`other`}}export{c as useDepositActivityHistorySource};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{useDepositSnapshot as
|
|
1
|
+
"use client";import{useDepositDriverInstance as e,useDepositSnapshot as t}from"../../driver/context.js";import{useKitI18n as n}from"../../../../shared/i18n/useKitI18n.js";import{Trans as r}from"../../../../shared/i18n/Trans.js";import{useLingui as i}from"../../../../shared/i18n/useLingui.js";import"../../../../i18n/index.js";import{useDepositActions as a,useDepositEffectiveState as o}from"../../orchestrator/controller.js";import{formatTokenAmount as ee}from"../../../../shared/format/formatTokenAmount.js";import{useKitEmitter as te}from"../../../../events/emit/useKitEmitter.js";import"../../../../events/emit/index.js";import{DialogShell as s}from"../../../../shared/dialog/DialogShell.js";import{ActivityTrigger as c}from"../../../../shared/widgets/activity-history/ActivityTrigger.js";import"../../../../shared/widgets/activity-history/index.js";import{AmountEntry as l}from"../../../../shared/widgets/amount-entry/compound/AmountEntry.js";import"../../../../shared/widgets/amount-entry/compound/index.js";import{toAssetDescriptor as u}from"../../../../shared/widgets/asset-descriptor.js";import{effectiveMaxUsd as d,resolveFooterIntent as f}from"./footerIntent.js";import{useEffect as p,useRef as m,useState as h}from"react";import{Fragment as g,jsx as _,jsxs as v}from"react/jsx-runtime";const y=[{value:`25`,label:`25%`},{value:`50`,label:`50%`},{value:`75`,label:`75%`},{value:`max`,label:`Max`}];function b({children:r,...s}){let b=t(),C=o(),{confirmAmount:w,back:T,openHistory:E}=a(),D=typeof e().refreshHistory==`function`,{_:O}=i(),k=n(),A=b.target,j=A.status===`ready`||A.status===`stale`?A.payload:void 0,M=C.name===`amountEntry`?C.ctx.asset:void 0,N=M?.amountUsd?.value??0,P=j?.minAmountUsd?.value,F=j?.minAmountUsd?.formatted,I=j?.maxAmountUsd?.value,L=j?.maxAmountUsd?.formatted,R=d(N,I),z=M?.priceUsd,[B,V]=h(P??null),[H,U]=h(),W=te(),G=e=>{W({type:`deposit.amount.changed`,flow:`deposit`,tier:`ui`,payload:{raw:e===null?``:String(e),numeric:e}})},K=m(void 0),q=M?`${M.eip155Id??``}:${M.address??``}`:void 0;p(()=>{q&&K.current!==q&&(K.current=q,typeof P==`number`&&(V(P),U(void 0)))},[q,P]);let J=e=>{U(e);let t=e===`max`?1:Number.parseInt(e,10)/100;if(Number.isFinite(t)){let n=R*t;V(n),G(n),e===`max`&&W({type:`deposit.max.clicked`,flow:`deposit`,tier:`ui`,payload:{}})}},Y=e=>{V(e),U(void 0),G(e)},X=f({amount:B,...P===void 0?{}:{minAmountUsd:P},...I===void 0?{}:{maxAmountUsd:I},walletBalanceUsd:N}),Z=()=>{if(X===`aboveBalance`||X===`aboveCap`){V(R),U(`max`);return}if(X===`belowMin`&&typeof P==`number`){V(P),U(void 0);return}B!==null&&w(z&&z>0?B/z:B)};if(C.name!==`amountEntry`||!M||!j)return null;let Q=C.ctx.backTarget===`closed`?void 0:T,ne=u(M)??{symbol:M.symbol},re=u(j)??{symbol:j.symbol},ie=`${ee((B??0)/1,k,{maxDecimals:5})} ${j.symbol}`,$=x(X,{updateOrder:O({id:`bOZXx5`,message:`Update order`}),depositMax:O({id:`9cCjMJ`,message:`Deposit max balance`})}),ae=S(X,L,F);return _(l,{...s,amount:B,sendToken:ne,receiveToken:re,max:R,...P===void 0?{}:{min:P},onAmountChange:Y,...Q?{onBack:Q}:{},subLineAmount:ie,presets:y,...H===void 0?{}:{activePreset:H},onPresetSelect:J,...$===void 0?{}:{footerLabel:$},onContinue:Z,notice:ae,...D?{headerTrailing:_(c,{onOpen:E})}:{},children:r??v(g,{children:[_(l.Header,{}),v(l.Body,{children:[_(l.Hero,{}),_(l.Pills,{}),_(l.Flow,{}),_(l.Notice,{})]}),_(l.Footer,{})]})})}function x(e,t){if(e===`aboveCap`||e===`belowMin`)return t.updateOrder;if(e===`aboveBalance`)return t.depositMax}function S(e,t,n){if(e===`aboveCap`&&t)return _(r,{id:`-I_tc5`,message:`Max {formattedCap}`,values:{formattedCap:t}});if(e===`aboveBalance`)return _(r,{id:`znqB4T`,message:`Insufficient balance`});if(e===`belowMin`&&n)return _(r,{id:`3eKjkO`,message:`{formattedMin} minimum deposit`,values:{formattedMin:n}})}function C({open:e,defaultOpen:t,onOpenChange:n,trigger:r,...i}){return _(s,{open:e,defaultOpen:t,onOpenChange:n,trigger:r,children:_(b,{...i})})}(function(e){e.Dialog=C,e.Header=l.Header,e.Body=l.Body,e.Hero=l.Hero,e.Pills=l.Pills,e.Flow=l.Flow,e.Footer=l.Footer,e.Notice=l.Notice})(b||={});export{b as AmountEntry};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{useDepositSnapshot as
|
|
1
|
+
"use client";import{useDepositDriverInstance as e,useDepositSnapshot as t}from"../../driver/context.js";import{useDepositActions as n,useDepositEffectiveState as r}from"../../orchestrator/controller.js";import{DialogShell as i}from"../../../../shared/dialog/DialogShell.js";import{ActivityTrigger as a}from"../../../../shared/widgets/activity-history/ActivityTrigger.js";import"../../../../shared/widgets/activity-history/index.js";import{AssetPicker as o}from"../../../../shared/widgets/asset-picker/compound/AssetPicker.js";import"../../../../shared/widgets/asset-picker/compound/index.js";import{useMemo as s,useState as c}from"react";import{Fragment as l,jsx as u,jsxs as d}from"react/jsx-runtime";const f=d(l,{children:[u(o.Header,{}),u(o.Body,{children:u(o.List,{})}),u(o.Footer,{})]});function p({children:i,...l}){let d=t(),p=r(),{confirmAsset:g,back:_,openHistory:v}=n(),y=typeof e().refreshHistory==`function`,[b,x]=c(void 0),S=d.balances,C=S.status===`ready`||S.status===`stale`?S.payload:[],w=s(()=>C.map(m),[C]),T=s(()=>(e=>e!==void 0&&w.some(t=>t.id===e&&!t.disabled))(b)?b:w.find(e=>!e.disabled)?.id,[b,w]),E=d.target,D=E.status===`ready`||E.status===`stale`?E.payload:void 0;if(p.name!==`assetPicker`)return null;let O=p.ctx.backTarget===`closed`?void 0:_,k=()=>{if(!T)return;let e=C.find(e=>h(e)===T);e&&g(e)};return u(o,{...l,...D?{token:{symbol:D.symbol}}:{},...T?{selectedId:T}:{},onSelect:x,assets:w,...O?{onBack:O}:{},onContinue:k,...y?{headerTrailing:u(a,{onOpen:v})}:{},children:i??f})}function m(e){let t=h(e),n=`${e.amount.formatted} ${e.symbol}`,r=e.amountUsd?.formatted??`—`;return{id:t,symbol:e.symbol,chain:e.networkName,balance:e.amount.value,balanceFormatted:n,fiatFormatted:r,...e.eip155Id?{chainId:Number(e.eip155Id)}:{},...e.address?{contractAddress:e.address}:{},isNative:e.isNative,...e.assetLogoUrl?{logoUrl:e.assetLogoUrl}:{},...e.chainLogoUrl?{chainLogoUrl:e.chainLogoUrl}:{},decimals:e.decimals,...e.priceUsd===void 0?{}:{priceUsd:e.priceUsd},...e.lowBalance?{lowBalance:!0}:{},...e.disabled?{disabled:!0}:{}}}function h(e){return e.eip155Id?`${e.eip155Id}:${e.address||`native`}`:e.symbol.toLowerCase()}function g({open:e,defaultOpen:t,onOpenChange:n,trigger:r,...a}){return u(i,{open:e,defaultOpen:t,onOpenChange:n,trigger:r,children:u(p,{...a})})}(function(e){e.Dialog=g,e.Header=o.Header,e.Body=o.Body,e.List=o.List,e.Footer=o.Footer})(p||={});export{p as AssetPicker};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e={root:{"Deposit__styles.root":`Deposit__styles.root`,"position-kVAEAm":`x1n2onr6`,"width-kzqmXN":`xh8yej3`,"maxWidth-ks0D6T":`x17fpy1y`,$$css:`@stridge/kit:src/flows/deposit/widgets/deposit/compound/Deposit.styles.ts:17`},header:{"Deposit__styles.header":`Deposit__styles.header`,"justifyContent-kjj79g":`x1qughib`,$$css:`@stridge/kit:src/flows/deposit/widgets/deposit/compound/Deposit.styles.ts:25`},closeIcon:{"Deposit__styles.closeIcon":`Deposit__styles.closeIcon`,"color-kMwMTN":`xdksllq`,"strokeWidth-kfJifR":`x1k315e8`,$$css:`@stridge/kit:src/flows/deposit/widgets/deposit/compound/Deposit.styles.ts:
|
|
1
|
+
const e={root:{"Deposit__styles.root":`Deposit__styles.root`,"position-kVAEAm":`x1n2onr6`,"width-kzqmXN":`xh8yej3`,"maxWidth-ks0D6T":`x17fpy1y`,$$css:`@stridge/kit:src/flows/deposit/widgets/deposit/compound/Deposit.styles.ts:17`},header:{"Deposit__styles.header":`Deposit__styles.header`,"justifyContent-kjj79g":`x1qughib`,$$css:`@stridge/kit:src/flows/deposit/widgets/deposit/compound/Deposit.styles.ts:25`},headerTrailing:{"Deposit__styles.headerTrailing":`Deposit__styles.headerTrailing`,"display-k1xSpc":`x78zum5`,"alignItems-kGNEyG":`x6s0dn4`,"gap-kOIVth":`x1a6yh9e`,$$css:`@stridge/kit:src/flows/deposit/widgets/deposit/compound/Deposit.styles.ts:30`},closeIcon:{"Deposit__styles.closeIcon":`Deposit__styles.closeIcon`,"color-kMwMTN":`xdksllq`,"strokeWidth-kfJifR":`x1k315e8`,$$css:`@stridge/kit:src/flows/deposit/widgets/deposit/compound/Deposit.styles.ts:35`},section:{"Deposit__styles.section":`Deposit__styles.section`,"display-k1xSpc":`x78zum5`,"flexDirection-kXwgrk":`xdt5ytf`,"gap-kOIVth":`x883omv`,"paddingInlineEnd-kwRFfy":`x1o5r3ls`,"paddingInlineStart-kZCmMZ":`xz7312c`,$$css:`@stridge/kit:src/flows/deposit/widgets/deposit/compound/Deposit.styles.ts:40`},sectionMethods:{"Deposit__styles.sectionMethods":`Deposit__styles.sectionMethods`,"paddingTop-kLKAdn":`x1cnzs8`,"paddingBottom-kGO01o":`x1t4gjm`,$$css:`@stridge/kit:src/flows/deposit/widgets/deposit/compound/Deposit.styles.ts:47`},methodsList:{"Deposit__styles.methodsList":`Deposit__styles.methodsList`,"display-k1xSpc":`x78zum5`,"flexDirection-kXwgrk":`xdt5ytf`,"gap-kOIVth":`x167g77z`,$$css:`@stridge/kit:src/flows/deposit/widgets/deposit/compound/Deposit.styles.ts:52`},methodRow:{"Deposit__styles.methodRow":`Deposit__styles.methodRow`,"gap-kOIVth":`x1af02g3`,"paddingInlineStart-kZCmMZ":`xwn43p0`,$$css:`@stridge/kit:src/flows/deposit/widgets/deposit/compound/Deposit.styles.ts:63`},methodIconSlot:{"Deposit__styles.methodIconSlot":`Deposit__styles.methodIconSlot`,"display-k1xSpc":`x78zum5`,"alignItems-kGNEyG":`x6s0dn4`,"justifyContent-kjj79g":`xl56j7k`,"width-kzqmXN":`x14qfxbe`,"height-kZKoxP":`xc9qbxq`,"flexShrink-kmuXW":`x2lah0s`,"borderRadius-kaIpWk":`xi9trdq`,"backgroundColor-kWkggS":`xp5aqsh`,"borderWidth-kMzoRj":`xmkeg23`,"borderStyle-ksu8eU":`x1y0btm7`,"borderColor-kVAM5u":`x1bue7yx`,"color-kMwMTN":`xzn0pkc`,$$css:`@stridge/kit:src/flows/deposit/widgets/deposit/compound/Deposit.styles.ts:67`},methodText:{"Deposit__styles.methodText":`Deposit__styles.methodText`,"display-k1xSpc":`x78zum5`,"flexDirection-kXwgrk":`xdt5ytf`,"flexBasis-kCS8Yb":`x1r8uery`,"flexGrow-kzQI83":`x1iyjqo2`,"flexShrink-kmuXW":`xs83m0k`,"gap-kOIVth":`x1ed6fcf`,"minWidth-k7Eaqz":`xeuugli`,$$css:`@stridge/kit:src/flows/deposit/widgets/deposit/compound/Deposit.styles.ts:81`},methodTitleRow:{"Deposit__styles.methodTitleRow":`Deposit__styles.methodTitleRow`,"display-k1xSpc":`x78zum5`,"alignItems-kGNEyG":`x6s0dn4`,"gap-kOIVth":`x167g77z`,"minWidth-k7Eaqz":`xeuugli`,$$css:`@stridge/kit:src/flows/deposit/widgets/deposit/compound/Deposit.styles.ts:90`},methodMeta:{"Deposit__styles.methodMeta":`Deposit__styles.methodMeta`,"display-k1xSpc":`x78zum5`,"flexDirection-kXwgrk":`x1q0g3np`,"alignItems-kGNEyG":`x6s0dn4`,"gap-kOIVth":`x17d4w8g`,$$css:`@stridge/kit:src/flows/deposit/widgets/deposit/compound/Deposit.styles.ts:96`},methodMetaItem:{"Deposit__styles.methodMetaItem":`Deposit__styles.methodMetaItem`,"display-k1xSpc":`x3nfvp2`,"alignItems-kGNEyG":`x6s0dn4`,"whiteSpace-khDVqt":`xuxw1ft`,$$css:`@stridge/kit:src/flows/deposit/widgets/deposit/compound/Deposit.styles.ts:102`},methodTrailing:{"Deposit__styles.methodTrailing":`Deposit__styles.methodTrailing`,"display-k1xSpc":`x78zum5`,"alignItems-kGNEyG":`x6s0dn4`,"flexShrink-kmuXW":`x2lah0s`,$$css:`@stridge/kit:src/flows/deposit/widgets/deposit/compound/Deposit.styles.ts:107`},methodChevron:{"Deposit__styles.methodChevron":`Deposit__styles.methodChevron`,"width-kzqmXN":`x6jxa94`,"height-kZKoxP":`x1v9usgg`,"flexShrink-kmuXW":`x2lah0s`,"color-kMwMTN":`xdksllq`,"strokeWidth-kfJifR":`x1k315e8`,$$css:`@stridge/kit:src/flows/deposit/widgets/deposit/compound/Deposit.styles.ts:112`},methodRecommendedBar:{"Deposit__styles.methodRecommendedBar":`Deposit__styles.methodRecommendedBar`,"position-kVAEAm":`x10l6tqk`,"top-k87sOh":`xuivejd`,"bottom-krVfgx":`xmbx2d0`,"insetInlineStart-kLqNvP":`x1o0tod`,"width-kzqmXN":`xfo62xy`,"borderStartEndRadius-kfmiAY":`x1e4oeot`,"borderEndEndRadius-kT0f0o":`x1ui04y5`,"backgroundColor-kWkggS":`xdmxa9o`,$$css:`@stridge/kit:src/flows/deposit/widgets/deposit/compound/Deposit.styles.ts:119`}};export{e as styles};
|
|
@@ -7,6 +7,16 @@ import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
|
7
7
|
* and the hairline divider. `Dialog.CloseButton` renders as the trailing
|
|
8
8
|
* flex child only when the widget is mounted inside `Dialog.Content`;
|
|
9
9
|
* card-mode renders no close affordance.
|
|
10
|
+
*
|
|
11
|
+
* Two trailing affordances flank the close X:
|
|
12
|
+
*
|
|
13
|
+
* 1. **Activity history trigger** — `<ActivityTrigger>` button. Gated on the host driver
|
|
14
|
+
* implementing `refreshHistory` (BYO drivers that don't expose history get the icon hidden
|
|
15
|
+
* gracefully). FSM-state gating is handled upstream by the steps router — this header only
|
|
16
|
+
* mounts on the `deposit` (method-picker) state, so a separate state allow-list would be
|
|
17
|
+
* redundant. Tap fires `actions.openHistory()` which transitions the FSM into
|
|
18
|
+
* `historyList` with the source step snapshotted into `ctx.backTarget`.
|
|
19
|
+
* 2. `<Dialog.CloseButton>` — kit's canonical close affordance.
|
|
10
20
|
*/
|
|
11
21
|
declare function DepositHeader({
|
|
12
22
|
title
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{
|
|
1
|
+
"use client";import{useDepositDriverInstance as e}from"../../../../driver/context.js";import{useLingui as t}from"../../../../../../shared/i18n/useLingui.js";import"../../../../../../i18n/index.js";import{useDepositActions as n}from"../../../../orchestrator/controller.js";import{Dialog as r}from"../../../../../../shared/ui/Dialog/Dialog.js";import"../../../../../../shared/ui/Dialog/index.js";import{Card as i}from"../../../../../../shared/ui/Card/Card.js";import{text as a}from"../../../../../../shared/ui/Text/Text.js";import"../../../../../../ui/index.js";import{ActivityTrigger as o}from"../../../../../../shared/widgets/activity-history/ActivityTrigger.js";import"../../../../../../shared/widgets/activity-history/index.js";import{useDepositContext as s}from"../context.js";import{DEPOSIT_SLOTS as c}from"../Deposit.slots.js";import{styles as l}from"../Deposit.styles.js";import{jsx as u,jsxs as d}from"react/jsx-runtime";import*as f from"@stylexjs/stylex";function p({title:p}={}){let m=s(`Deposit.Header`),{_:h}=t(),{openHistory:g}=n(),_=typeof e().refreshHistory==`function`,v=p??m.title??h({id:`kj3M8S`,message:`Deposit`});return d(i.Header,{"data-stridge-slot":c.header,...f.props(l.header),children:[u(a.span,{size:`base`,fontWeight:`semibold`,leading:`tight`,tracking:`tight`,children:v}),d(`div`,{...f.props(l.headerTrailing),children:[_?u(o,{onOpen:g}):null,u(r.CloseButton,{})]})]})}export{p as DepositHeader};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e={root:{"TransferCrypto__styles.root":`TransferCrypto__styles.root`,"position-kVAEAm":`x1n2onr6`,"width-kzqmXN":`xh8yej3`,"maxWidth-ks0D6T":`x17fpy1y`,"containerType-k9g6sI":`x12h1iku`,"containerName-kanfag":`x1tehvyw`,$$css:`@stridge/kit:src/flows/deposit/widgets/transfer-crypto/compound/TransferCrypto.styles.ts:10`},header:{"TransferCrypto__styles.header":`TransferCrypto__styles.header`,"justifyContent-kjj79g":`x1qughib`,"paddingTop-kLKAdn":`x109j2v6 x19raiq2`,"paddingInlineEnd-kwRFfy":`x1pic42t x1511ct0`,"paddingBottom-kGO01o":`x1l90r2v x1qngw98`,"paddingInlineStart-kZCmMZ":`x1onr9mi x12owy3a`,$$css:`@stridge/kit:src/flows/deposit/widgets/transfer-crypto/compound/TransferCrypto.styles.ts:20`},headerLeft:{"TransferCrypto__styles.headerLeft":`TransferCrypto__styles.headerLeft`,"display-k1xSpc":`x78zum5`,"alignItems-kGNEyG":`x6s0dn4`,"gap-kOIVth":`x1v2ro7d`,$$css:`@stridge/kit:src/flows/deposit/widgets/transfer-crypto/compound/TransferCrypto.styles.ts:39`},backIcon:{"TransferCrypto__styles.backIcon":`TransferCrypto__styles.backIcon`,"color-kMwMTN":`x15rks2t`,"strokeWidth-kfJifR":`xhxwl1`,$$css:`@stridge/kit:src/flows/deposit/widgets/transfer-crypto/compound/TransferCrypto.styles.ts:44`},closeIcon:{"TransferCrypto__styles.closeIcon":`TransferCrypto__styles.closeIcon`,"color-kMwMTN":`xdksllq`,"strokeWidth-kfJifR":`x1k315e8`,$$css:`@stridge/kit:src/flows/deposit/widgets/transfer-crypto/compound/TransferCrypto.styles.ts:48`},selectors:{"TransferCrypto__styles.selectors":`TransferCrypto__styles.selectors`,"display-k1xSpc":`x78zum5`,"flexDirection-kXwgrk":`x1q0g3np`,"paddingTop-kLKAdn":`xyamay9 x1evf9ll`,"paddingInlineEnd-kwRFfy":`x1x5flf6 x1511ct0`,"paddingBottom-kGO01o":`x18d9i69 x1hf6i2e`,"paddingInlineStart-kZCmMZ":`xwn43p0 x12owy3a`,"gap-kOIVth":`x883omv x1935yeb`,$$css:`@stridge/kit:src/flows/deposit/widgets/transfer-crypto/compound/TransferCrypto.styles.ts:53`},selectorColumn:{"TransferCrypto__styles.selectorColumn":`TransferCrypto__styles.selectorColumn`,"display-k1xSpc":`x78zum5`,"flexDirection-kXwgrk":`xdt5ytf`,"flexGrow-kzQI83":`x1iyjqo2`,"flexShrink-kmuXW":`xs83m0k`,"flexBasis-kCS8Yb":`x1r8uery`,"gap-kOIVth":`x167g77z`,"minWidth-k7Eaqz":`xeuugli`,$$css:`@stridge/kit:src/flows/deposit/widgets/transfer-crypto/compound/TransferCrypto.styles.ts:77`},selectorLabelRow:{"TransferCrypto__styles.selectorLabelRow":`TransferCrypto__styles.selectorLabelRow`,"display-k1xSpc":`x78zum5`,"alignItems-kGNEyG":`x6s0dn4`,"height-kZKoxP":`x1v9usgg`,"justifyContent-kjj79g":`x1qughib`,$$css:`@stridge/kit:src/flows/deposit/widgets/transfer-crypto/compound/TransferCrypto.styles.ts:86`},minDepositRow:{"TransferCrypto__styles.minDepositRow":`TransferCrypto__styles.minDepositRow`,"display-k1xSpc":`x78zum5`,"alignItems-kGNEyG":`x6s0dn4`,"gap-kOIVth":`x1jnr06f`,$$css:`@stridge/kit:src/flows/deposit/widgets/transfer-crypto/compound/TransferCrypto.styles.ts:92`},minDepositIcon:{"TransferCrypto__styles.minDepositIcon":`TransferCrypto__styles.minDepositIcon`,"width-kzqmXN":`x10vfzb2`,"height-kZKoxP":`x6w4g8m`,"flexShrink-kmuXW":`x2lah0s`,"color-kMwMTN":`x137ha3m`,$$css:`@stridge/kit:src/flows/deposit/widgets/transfer-crypto/compound/TransferCrypto.styles.ts:97`},qrFrame:{"TransferCrypto__styles.qrFrame":`TransferCrypto__styles.qrFrame`,"position-kVAEAm":`x1n2onr6`,"alignSelf-kSGwAc":`xamitd3`,"width-kzqmXN":`x16grhtn xsxf1mu`,"height-kZKoxP":`x1m3v4wt xpkk1xi`,"marginTop-keoZOQ":`xw7yly9 x12r3qzf`,"borderRadius-kaIpWk":`x2u8bby x1vfxggr`,"paddingBlock-k8WAf4":`x12ulsxz xpib278`,"paddingInline-kg3NbH":`xqin4a2 xigttff`,"borderWidth-kMzoRj":`xc342km xqv1bf0`,"borderStyle-ksu8eU":`x1y0btm7`,"borderColor-kVAM5u":`x1bue7yx`,"backgroundColor-kWkggS":`xjbqb8w x1005t9t`,"flexShrink-kmuXW":`x2lah0s`,$$css:`@stridge/kit:src/flows/deposit/widgets/transfer-crypto/compound/TransferCrypto.styles.ts:109`},qrSvg:{"TransferCrypto__styles.qrSvg":`TransferCrypto__styles.qrSvg`,"display-k1xSpc":`x1lliihq`,"width-kzqmXN":`x1so1ns2 x2ytoob`,"height-kZKoxP":`xb2rc7v x885qvc`,"color-kMwMTN":`xzn0pkc`,$$css:`@stridge/kit:src/flows/deposit/widgets/transfer-crypto/compound/TransferCrypto.styles.ts:148`},flowPill:{"TransferCrypto__styles.flowPill":`TransferCrypto__styles.flowPill`,"display-k1xSpc":`x78zum5`,"flexDirection-kXwgrk":`x1q0g3np`,"alignItems-kGNEyG":`x6s0dn4`,"justifyContent-kjj79g":`xl56j7k`,"alignSelf-kSGwAc":`xamitd3`,"marginTop-keoZOQ":`xw7yly9 x1pnypo2`,"backgroundColor-kWkggS":`xsdq91f`,"borderColor-kVAM5u":`x1bue7yx`,"borderRadius-kaIpWk":`x1npxkrn`,"borderStyle-ksu8eU":`x1y0btm7`,"borderWidth-kMzoRj":`xmkeg23`,"paddingBlock-k8WAf4":`xknfcqp xzc4l6o`,"paddingInline-kg3NbH":`xqin4a2 xy8emu7`,"gap-kOIVth":`x1v2ro7d x9czr6x`,$$css:`@stridge/kit:src/flows/deposit/widgets/transfer-crypto/compound/TransferCrypto.styles.ts:167`},flowSide:{"TransferCrypto__styles.flowSide":`TransferCrypto__styles.flowSide`,"display-k1xSpc":`x78zum5`,"alignItems-kGNEyG":`x6s0dn4`,"gap-kOIVth":`x167g77z`,$$css:`@stridge/kit:src/flows/deposit/widgets/transfer-crypto/compound/TransferCrypto.styles.ts:195`},flowText:{"TransferCrypto__styles.flowText":`TransferCrypto__styles.flowText`,"display-k1xSpc":`x78zum5`,"flexDirection-kXwgrk":`xdt5ytf`,"gap-kOIVth":`x12mrbbr`,$$css:`@stridge/kit:src/flows/deposit/widgets/transfer-crypto/compound/TransferCrypto.styles.ts:200`},flowArrow:{"TransferCrypto__styles.flowArrow":`TransferCrypto__styles.flowArrow`,"width-kzqmXN":`x6jxa94`,"height-kZKoxP":`x170jfvy`,"flexShrink-kmuXW":`x2lah0s`,"color-kMwMTN":`x137ha3m`,$$css:`@stridge/kit:src/flows/deposit/widgets/transfer-crypto/compound/TransferCrypto.styles.ts:205`},addressSection:{"TransferCrypto__styles.addressSection":`TransferCrypto__styles.addressSection`,"display-k1xSpc":`x78zum5`,"flexDirection-kXwgrk":`xdt5ytf`,"gap-kOIVth":`x167g77z x19decax`,"marginTop-keoZOQ":`xw7yly9 x1pnypo2`,"marginInlineStart-keTefX":`xnkmj2t xwwmoof`,"marginInlineEnd-k71WvV":`x14iifvp x1kfralx`,$$css:`@stridge/kit:src/flows/deposit/widgets/transfer-crypto/compound/TransferCrypto.styles.ts:212`},addressLabelRow:{"TransferCrypto__styles.addressLabelRow":`TransferCrypto__styles.addressLabelRow`,"display-k1xSpc":`x78zum5`,"alignItems-kGNEyG":`x6s0dn4`,"justifyContent-kjj79g":`x1qughib`,$$css:`@stridge/kit:src/flows/deposit/widgets/transfer-crypto/compound/TransferCrypto.styles.ts:232`},addressLabel:{"TransferCrypto__styles.addressLabel":`TransferCrypto__styles.addressLabel`,"display-k1xSpc":`x78zum5`,"alignItems-kGNEyG":`x6s0dn4`,"gap-kOIVth":`x17d4w8g`,$$css:`@stridge/kit:src/flows/deposit/widgets/transfer-crypto/compound/TransferCrypto.styles.ts:237`},addressLabelInfo:{"TransferCrypto__styles.addressLabelInfo":`TransferCrypto__styles.addressLabelInfo`,"width-kzqmXN":`xsmyaan`,"height-kZKoxP":`x1kpxq89`,"color-kMwMTN":`x137ha3m`,"flexShrink-kmuXW":`x2lah0s`,$$css:`@stridge/kit:src/flows/deposit/widgets/transfer-crypto/compound/TransferCrypto.styles.ts:242`},termsLink:{"TransferCrypto__styles.termsLink":`TransferCrypto__styles.termsLink`,"color-kMwMTN":`x1me39qh`,"textDecorationLine-kMnn75":`xujl8zx`,"textDecorationThickness-kNySMw":`xyi4chj`,$$css:`@stridge/kit:src/flows/deposit/widgets/transfer-crypto/compound/TransferCrypto.styles.ts:248`},addressPill:{"TransferCrypto__styles.addressPill":`TransferCrypto__styles.addressPill`,"flexDirection-kXwgrk":`x1q0g3np`,"alignItems-kGNEyG":`x6s0dn4`,"justifyContent-kjj79g":`x1qughib`,"paddingTop-kLKAdn":`x1y1aw1k`,"paddingInlineEnd-kwRFfy":`xf159sx`,"paddingBottom-kGO01o":`xwib8y2`,"paddingInlineStart-kZCmMZ":`xf7dkkf`,"gap-kOIVth":`x1v2ro7d`,$$css:`@stridge/kit:src/flows/deposit/widgets/transfer-crypto/compound/TransferCrypto.styles.ts:260`},addressText:{"TransferCrypto__styles.addressText":`TransferCrypto__styles.addressText`,"flexBasis-kCS8Yb":`x1r8uery`,"flexGrow-kzQI83":`x1iyjqo2`,"flexShrink-kmuXW":`xs83m0k`,"overflow-kVQacm":`xb3r6kr`,"textOverflow-kg5iWk":`xlyipyv`,"whiteSpace-khDVqt":`xuxw1ft`,"minWidth-k7Eaqz":`xeuugli`,$$css:`@stridge/kit:src/flows/deposit/widgets/transfer-crypto/compound/TransferCrypto.styles.ts:270`},copyButton:{"TransferCrypto__styles.copyButton":`TransferCrypto__styles.copyButton`,"height-kZKoxP":`xt7dq6l`,"gap-kOIVth":`x17d4w8g`,"paddingTop-kLKAdn":`x1y1aw1k`,"paddingBottom-kGO01o":`xwib8y2`,"paddingInline-kg3NbH":`xaope02`,"cursor-kkrTdU":`x1ypdohk`,":focus-visible_boxShadow-kEtg5x":`xhatipn`,$$css:`@stridge/kit:src/flows/deposit/widgets/transfer-crypto/compound/TransferCrypto.styles.ts:286`},copyIcon:{"TransferCrypto__styles.copyIcon":`TransferCrypto__styles.copyIcon`,"width-kzqmXN":`x1fxhmyf`,"height-kZKoxP":`x18gnavp`,"flexShrink-kmuXW":`x2lah0s`,"strokeWidth-kfJifR":`xupzf07`,$$css:`@stridge/kit:src/flows/deposit/widgets/transfer-crypto/compound/TransferCrypto.styles.ts:297`},disclosure:{"TransferCrypto__styles.disclosure":`TransferCrypto__styles.disclosure`,"paddingBlock-k8WAf4":`x10dr8xq xwv64x0`,"paddingInline-kg3NbH":`xqin4a2 xigttff`,"marginTop-keoZOQ":`xw7yly9 x1pnypo2`,"marginInlineStart-keTefX":`xnkmj2t xwwmoof`,"marginInlineEnd-k71WvV":`x14iifvp x1kfralx`,"marginBottom-k1K539":`x1c436fg x37ks8j`,$$css:`@stridge/kit:src/flows/deposit/widgets/transfer-crypto/compound/TransferCrypto.styles.ts:309`},disclosureHeader:{"TransferCrypto__styles.disclosureHeader":`TransferCrypto__styles.disclosureHeader`,"display-k1xSpc":`x78zum5`,"alignItems-kGNEyG":`x6s0dn4`,"gap-kOIVth":`x883omv`,"width-kzqmXN":`xh8yej3`,"cursor-kkrTdU":`x1ypdohk`,"outline-kI3sdo":`x1a2a7pz`,"borderRadius-kaIpWk":`x1s7mj9v`,":focus-visible_boxShadow-kEtg5x":`xhatipn`,$$css:`@stridge/kit:src/flows/deposit/widgets/transfer-crypto/compound/TransferCrypto.styles.ts:335`},disclosureHeaderChevron:{"TransferCrypto__styles.disclosureHeaderChevron":`TransferCrypto__styles.disclosureHeaderChevron`,"marginInlineStart-keTefX":`xvc5jky`,$$css:`@stridge/kit:src/flows/deposit/widgets/transfer-crypto/compound/TransferCrypto.styles.ts:347`},disclosurePanelInner:{"TransferCrypto__styles.disclosurePanelInner":`TransferCrypto__styles.disclosurePanelInner`,"display-k1xSpc":`x78zum5`,"flexDirection-kXwgrk":`xdt5ytf`,"gap-kOIVth":`xmmi0ta x19decax`,"paddingTop-kLKAdn":`x96k8nx xskglhc`,$$css:`@stridge/kit:src/flows/deposit/widgets/transfer-crypto/compound/TransferCrypto.styles.ts:350`},disclosureRow:{"TransferCrypto__styles.disclosureRow":`TransferCrypto__styles.disclosureRow`,"display-k1xSpc":`x78zum5`,"alignItems-kGNEyG":`x6s0dn4`,"gap-kOIVth":`x883omv`,$$css:`@stridge/kit:src/flows/deposit/widgets/transfer-crypto/compound/TransferCrypto.styles.ts:365`},disclosureRowTextWithInfo:{"TransferCrypto__styles.disclosureRowTextWithInfo":`TransferCrypto__styles.disclosureRowTextWithInfo`,"display-k1xSpc":`x78zum5`,"alignItems-kGNEyG":`x6s0dn4`,"flexWrap-kwnvtZ":`x1a02dak`,"gap-kOIVth":`x17d4w8g`,$$css:`@stridge/kit:src/flows/deposit/widgets/transfer-crypto/compound/TransferCrypto.styles.ts:370`},disclosureRowIcon:{"TransferCrypto__styles.disclosureRowIcon":`TransferCrypto__styles.disclosureRowIcon`,"width-kzqmXN":`x6jxa94`,"height-kZKoxP":`x1v9usgg`,"flexShrink-kmuXW":`x2lah0s`,"color-kMwMTN":`xdksllq`,$$css:`@stridge/kit:src/flows/deposit/widgets/transfer-crypto/compound/TransferCrypto.styles.ts:376`},infoTrigger:{"TransferCrypto__styles.infoTrigger":`TransferCrypto__styles.infoTrigger`,"display-k1xSpc":`x3nfvp2`,"alignItems-kGNEyG":`x6s0dn4`,"justifyContent-kjj79g":`xl56j7k`,"padding-kmVPX3":`x1717udv`,"backgroundColor-kWkggS":`xjbqb8w`,"borderWidth-kMzoRj":`xc342km`,"borderStyle-ksu8eU":`x1y0btm7`,"outline-kI3sdo":`x1a2a7pz`,"cursor-kkrTdU":`x1146j2`,"color-kMwMTN":`x137ha3m`,"borderRadius-kaIpWk":`x1npxkrn`,":focus-visible_boxShadow-kEtg5x":`xhatipn`,$$css:`@stridge/kit:src/flows/deposit/widgets/transfer-crypto/compound/TransferCrypto.styles.ts:382`},disclosureRowInfo:{"TransferCrypto__styles.disclosureRowInfo":`TransferCrypto__styles.disclosureRowInfo`,"width-kzqmXN":`x10vfzb2`,"height-kZKoxP":`x6w4g8m`,"flexShrink-kmuXW":`x2lah0s`,"color-kMwMTN":`x15rks2t`,$$css:`@stridge/kit:src/flows/deposit/widgets/transfer-crypto/compound/TransferCrypto.styles.ts:398`},disclosureChevron:{"TransferCrypto__styles.disclosureChevron":`TransferCrypto__styles.disclosureChevron`,"width-kzqmXN":`xsmyaan`,"height-kZKoxP":`x1kpxq89`,"flexShrink-kmuXW":`x2lah0s`,"color-kMwMTN":`xdksllq`,"strokeWidth-kfJifR":`xhr4kjn`,"transitionProperty-k1ekBW":`x11xpdln`,"transitionDuration-kIyJzY":`xx6bhzk`,"transitionTimingFunction-kAMwcw":`x4ognrn`,"[data-panel-open] &_transform-kSnp38":`xtqhfa`,$$css:`@stridge/kit:src/flows/deposit/widgets/transfer-crypto/compound/TransferCrypto.styles.ts:404`},helpQuestion:{"TransferCrypto__styles.helpQuestion":`TransferCrypto__styles.helpQuestion`,"marginInlineEnd-k71WvV":`xf6vk7d`,$$css:`@stridge/kit:src/flows/deposit/widgets/transfer-crypto/compound/TransferCrypto.styles.ts:417`},helpLink:{"TransferCrypto__styles.helpLink":`TransferCrypto__styles.helpLink`,"color-kMwMTN":`x1me39qh`,"textDecorationLine-kMnn75":`xujl8zx`,"textDecorationThickness-kNySMw":`xyi4chj`,$$css:`@stridge/kit:src/flows/deposit/widgets/transfer-crypto/compound/TransferCrypto.styles.ts:420`}};export{e as styles};
|
|
1
|
+
const e={root:{"TransferCrypto__styles.root":`TransferCrypto__styles.root`,"position-kVAEAm":`x1n2onr6`,"width-kzqmXN":`xh8yej3`,"maxWidth-ks0D6T":`x17fpy1y`,"containerType-k9g6sI":`x12h1iku`,"containerName-kanfag":`x1tehvyw`,$$css:`@stridge/kit:src/flows/deposit/widgets/transfer-crypto/compound/TransferCrypto.styles.ts:10`},header:{"TransferCrypto__styles.header":`TransferCrypto__styles.header`,"justifyContent-kjj79g":`x1qughib`,"paddingTop-kLKAdn":`x109j2v6 x19raiq2`,"paddingInlineEnd-kwRFfy":`x1pic42t x1511ct0`,"paddingBottom-kGO01o":`x1l90r2v x1qngw98`,"paddingInlineStart-kZCmMZ":`x1onr9mi x12owy3a`,$$css:`@stridge/kit:src/flows/deposit/widgets/transfer-crypto/compound/TransferCrypto.styles.ts:20`},headerLeft:{"TransferCrypto__styles.headerLeft":`TransferCrypto__styles.headerLeft`,"display-k1xSpc":`x78zum5`,"alignItems-kGNEyG":`x6s0dn4`,"gap-kOIVth":`x1v2ro7d`,$$css:`@stridge/kit:src/flows/deposit/widgets/transfer-crypto/compound/TransferCrypto.styles.ts:39`},headerTrailing:{"TransferCrypto__styles.headerTrailing":`TransferCrypto__styles.headerTrailing`,"display-k1xSpc":`x78zum5`,"alignItems-kGNEyG":`x6s0dn4`,"gap-kOIVth":`x1a6yh9e`,$$css:`@stridge/kit:src/flows/deposit/widgets/transfer-crypto/compound/TransferCrypto.styles.ts:47`},backIcon:{"TransferCrypto__styles.backIcon":`TransferCrypto__styles.backIcon`,"color-kMwMTN":`x15rks2t`,"strokeWidth-kfJifR":`xhxwl1`,$$css:`@stridge/kit:src/flows/deposit/widgets/transfer-crypto/compound/TransferCrypto.styles.ts:52`},closeIcon:{"TransferCrypto__styles.closeIcon":`TransferCrypto__styles.closeIcon`,"color-kMwMTN":`xdksllq`,"strokeWidth-kfJifR":`x1k315e8`,$$css:`@stridge/kit:src/flows/deposit/widgets/transfer-crypto/compound/TransferCrypto.styles.ts:56`},selectors:{"TransferCrypto__styles.selectors":`TransferCrypto__styles.selectors`,"display-k1xSpc":`x78zum5`,"flexDirection-kXwgrk":`x1q0g3np`,"paddingTop-kLKAdn":`xyamay9 x1evf9ll`,"paddingInlineEnd-kwRFfy":`x1x5flf6 x1511ct0`,"paddingBottom-kGO01o":`x18d9i69 x1hf6i2e`,"paddingInlineStart-kZCmMZ":`xwn43p0 x12owy3a`,"gap-kOIVth":`x883omv x1935yeb`,$$css:`@stridge/kit:src/flows/deposit/widgets/transfer-crypto/compound/TransferCrypto.styles.ts:61`},selectorColumn:{"TransferCrypto__styles.selectorColumn":`TransferCrypto__styles.selectorColumn`,"display-k1xSpc":`x78zum5`,"flexDirection-kXwgrk":`xdt5ytf`,"flexGrow-kzQI83":`x1iyjqo2`,"flexShrink-kmuXW":`xs83m0k`,"flexBasis-kCS8Yb":`x1r8uery`,"gap-kOIVth":`x167g77z`,"minWidth-k7Eaqz":`xeuugli`,$$css:`@stridge/kit:src/flows/deposit/widgets/transfer-crypto/compound/TransferCrypto.styles.ts:85`},selectorLabelRow:{"TransferCrypto__styles.selectorLabelRow":`TransferCrypto__styles.selectorLabelRow`,"display-k1xSpc":`x78zum5`,"alignItems-kGNEyG":`x6s0dn4`,"height-kZKoxP":`x1v9usgg`,"justifyContent-kjj79g":`x1qughib`,$$css:`@stridge/kit:src/flows/deposit/widgets/transfer-crypto/compound/TransferCrypto.styles.ts:94`},minDepositRow:{"TransferCrypto__styles.minDepositRow":`TransferCrypto__styles.minDepositRow`,"display-k1xSpc":`x78zum5`,"alignItems-kGNEyG":`x6s0dn4`,"gap-kOIVth":`x1jnr06f`,$$css:`@stridge/kit:src/flows/deposit/widgets/transfer-crypto/compound/TransferCrypto.styles.ts:100`},minDepositIcon:{"TransferCrypto__styles.minDepositIcon":`TransferCrypto__styles.minDepositIcon`,"width-kzqmXN":`x10vfzb2`,"height-kZKoxP":`x6w4g8m`,"flexShrink-kmuXW":`x2lah0s`,"color-kMwMTN":`x137ha3m`,$$css:`@stridge/kit:src/flows/deposit/widgets/transfer-crypto/compound/TransferCrypto.styles.ts:105`},qrFrame:{"TransferCrypto__styles.qrFrame":`TransferCrypto__styles.qrFrame`,"position-kVAEAm":`x1n2onr6`,"alignSelf-kSGwAc":`xamitd3`,"width-kzqmXN":`x16grhtn xsxf1mu`,"height-kZKoxP":`x1m3v4wt xpkk1xi`,"marginTop-keoZOQ":`xw7yly9 x12r3qzf`,"borderRadius-kaIpWk":`x2u8bby x1vfxggr`,"paddingBlock-k8WAf4":`x12ulsxz xpib278`,"paddingInline-kg3NbH":`xqin4a2 xigttff`,"borderWidth-kMzoRj":`xc342km xqv1bf0`,"borderStyle-ksu8eU":`x1y0btm7`,"borderColor-kVAM5u":`x1bue7yx`,"backgroundColor-kWkggS":`xjbqb8w x1005t9t`,"flexShrink-kmuXW":`x2lah0s`,$$css:`@stridge/kit:src/flows/deposit/widgets/transfer-crypto/compound/TransferCrypto.styles.ts:117`},qrSvg:{"TransferCrypto__styles.qrSvg":`TransferCrypto__styles.qrSvg`,"display-k1xSpc":`x1lliihq`,"width-kzqmXN":`x1so1ns2 x2ytoob`,"height-kZKoxP":`xb2rc7v x885qvc`,"color-kMwMTN":`xzn0pkc`,$$css:`@stridge/kit:src/flows/deposit/widgets/transfer-crypto/compound/TransferCrypto.styles.ts:156`},flowPill:{"TransferCrypto__styles.flowPill":`TransferCrypto__styles.flowPill`,"display-k1xSpc":`x78zum5`,"flexDirection-kXwgrk":`x1q0g3np`,"alignItems-kGNEyG":`x6s0dn4`,"justifyContent-kjj79g":`xl56j7k`,"alignSelf-kSGwAc":`xamitd3`,"marginTop-keoZOQ":`xw7yly9 x1pnypo2`,"backgroundColor-kWkggS":`xsdq91f`,"borderColor-kVAM5u":`x1bue7yx`,"borderRadius-kaIpWk":`x1npxkrn`,"borderStyle-ksu8eU":`x1y0btm7`,"borderWidth-kMzoRj":`xmkeg23`,"paddingBlock-k8WAf4":`xknfcqp xzc4l6o`,"paddingInline-kg3NbH":`xqin4a2 xy8emu7`,"gap-kOIVth":`x1v2ro7d x9czr6x`,$$css:`@stridge/kit:src/flows/deposit/widgets/transfer-crypto/compound/TransferCrypto.styles.ts:175`},flowSide:{"TransferCrypto__styles.flowSide":`TransferCrypto__styles.flowSide`,"display-k1xSpc":`x78zum5`,"alignItems-kGNEyG":`x6s0dn4`,"gap-kOIVth":`x167g77z`,$$css:`@stridge/kit:src/flows/deposit/widgets/transfer-crypto/compound/TransferCrypto.styles.ts:203`},flowText:{"TransferCrypto__styles.flowText":`TransferCrypto__styles.flowText`,"display-k1xSpc":`x78zum5`,"flexDirection-kXwgrk":`xdt5ytf`,"gap-kOIVth":`x12mrbbr`,$$css:`@stridge/kit:src/flows/deposit/widgets/transfer-crypto/compound/TransferCrypto.styles.ts:208`},flowArrow:{"TransferCrypto__styles.flowArrow":`TransferCrypto__styles.flowArrow`,"width-kzqmXN":`x6jxa94`,"height-kZKoxP":`x170jfvy`,"flexShrink-kmuXW":`x2lah0s`,"color-kMwMTN":`x137ha3m`,$$css:`@stridge/kit:src/flows/deposit/widgets/transfer-crypto/compound/TransferCrypto.styles.ts:213`},addressSection:{"TransferCrypto__styles.addressSection":`TransferCrypto__styles.addressSection`,"display-k1xSpc":`x78zum5`,"flexDirection-kXwgrk":`xdt5ytf`,"gap-kOIVth":`x167g77z x19decax`,"marginTop-keoZOQ":`xw7yly9 x1pnypo2`,"marginInlineStart-keTefX":`xnkmj2t xwwmoof`,"marginInlineEnd-k71WvV":`x14iifvp x1kfralx`,$$css:`@stridge/kit:src/flows/deposit/widgets/transfer-crypto/compound/TransferCrypto.styles.ts:220`},addressLabelRow:{"TransferCrypto__styles.addressLabelRow":`TransferCrypto__styles.addressLabelRow`,"display-k1xSpc":`x78zum5`,"alignItems-kGNEyG":`x6s0dn4`,"justifyContent-kjj79g":`x1qughib`,$$css:`@stridge/kit:src/flows/deposit/widgets/transfer-crypto/compound/TransferCrypto.styles.ts:240`},addressLabel:{"TransferCrypto__styles.addressLabel":`TransferCrypto__styles.addressLabel`,"display-k1xSpc":`x78zum5`,"alignItems-kGNEyG":`x6s0dn4`,"gap-kOIVth":`x17d4w8g`,$$css:`@stridge/kit:src/flows/deposit/widgets/transfer-crypto/compound/TransferCrypto.styles.ts:245`},addressLabelInfo:{"TransferCrypto__styles.addressLabelInfo":`TransferCrypto__styles.addressLabelInfo`,"width-kzqmXN":`xsmyaan`,"height-kZKoxP":`x1kpxq89`,"color-kMwMTN":`x137ha3m`,"flexShrink-kmuXW":`x2lah0s`,$$css:`@stridge/kit:src/flows/deposit/widgets/transfer-crypto/compound/TransferCrypto.styles.ts:250`},termsLink:{"TransferCrypto__styles.termsLink":`TransferCrypto__styles.termsLink`,"color-kMwMTN":`x1me39qh`,"textDecorationLine-kMnn75":`xujl8zx`,"textDecorationThickness-kNySMw":`xyi4chj`,$$css:`@stridge/kit:src/flows/deposit/widgets/transfer-crypto/compound/TransferCrypto.styles.ts:256`},addressPill:{"TransferCrypto__styles.addressPill":`TransferCrypto__styles.addressPill`,"flexDirection-kXwgrk":`x1q0g3np`,"alignItems-kGNEyG":`x6s0dn4`,"justifyContent-kjj79g":`x1qughib`,"paddingTop-kLKAdn":`x1y1aw1k`,"paddingInlineEnd-kwRFfy":`xf159sx`,"paddingBottom-kGO01o":`xwib8y2`,"paddingInlineStart-kZCmMZ":`xf7dkkf`,"gap-kOIVth":`x1v2ro7d`,$$css:`@stridge/kit:src/flows/deposit/widgets/transfer-crypto/compound/TransferCrypto.styles.ts:268`},addressText:{"TransferCrypto__styles.addressText":`TransferCrypto__styles.addressText`,"flexBasis-kCS8Yb":`x1r8uery`,"flexGrow-kzQI83":`x1iyjqo2`,"flexShrink-kmuXW":`xs83m0k`,"overflow-kVQacm":`xb3r6kr`,"textOverflow-kg5iWk":`xlyipyv`,"whiteSpace-khDVqt":`xuxw1ft`,"minWidth-k7Eaqz":`xeuugli`,$$css:`@stridge/kit:src/flows/deposit/widgets/transfer-crypto/compound/TransferCrypto.styles.ts:278`},copyButton:{"TransferCrypto__styles.copyButton":`TransferCrypto__styles.copyButton`,"height-kZKoxP":`xt7dq6l`,"gap-kOIVth":`x17d4w8g`,"paddingTop-kLKAdn":`x1y1aw1k`,"paddingBottom-kGO01o":`xwib8y2`,"paddingInline-kg3NbH":`xaope02`,"cursor-kkrTdU":`x1ypdohk`,":focus-visible_boxShadow-kEtg5x":`xhatipn`,$$css:`@stridge/kit:src/flows/deposit/widgets/transfer-crypto/compound/TransferCrypto.styles.ts:294`},copyIcon:{"TransferCrypto__styles.copyIcon":`TransferCrypto__styles.copyIcon`,"width-kzqmXN":`x1fxhmyf`,"height-kZKoxP":`x18gnavp`,"flexShrink-kmuXW":`x2lah0s`,"strokeWidth-kfJifR":`xupzf07`,$$css:`@stridge/kit:src/flows/deposit/widgets/transfer-crypto/compound/TransferCrypto.styles.ts:305`},disclosure:{"TransferCrypto__styles.disclosure":`TransferCrypto__styles.disclosure`,"paddingBlock-k8WAf4":`x10dr8xq xwv64x0`,"paddingInline-kg3NbH":`xqin4a2 xigttff`,"marginTop-keoZOQ":`xw7yly9 x1pnypo2`,"marginInlineStart-keTefX":`xnkmj2t xwwmoof`,"marginInlineEnd-k71WvV":`x14iifvp x1kfralx`,"marginBottom-k1K539":`x1c436fg x37ks8j`,$$css:`@stridge/kit:src/flows/deposit/widgets/transfer-crypto/compound/TransferCrypto.styles.ts:317`},disclosureHeader:{"TransferCrypto__styles.disclosureHeader":`TransferCrypto__styles.disclosureHeader`,"display-k1xSpc":`x78zum5`,"alignItems-kGNEyG":`x6s0dn4`,"gap-kOIVth":`x883omv`,"width-kzqmXN":`xh8yej3`,"cursor-kkrTdU":`x1ypdohk`,"outline-kI3sdo":`x1a2a7pz`,"borderRadius-kaIpWk":`x1s7mj9v`,":focus-visible_boxShadow-kEtg5x":`xhatipn`,$$css:`@stridge/kit:src/flows/deposit/widgets/transfer-crypto/compound/TransferCrypto.styles.ts:343`},disclosureHeaderChevron:{"TransferCrypto__styles.disclosureHeaderChevron":`TransferCrypto__styles.disclosureHeaderChevron`,"marginInlineStart-keTefX":`xvc5jky`,$$css:`@stridge/kit:src/flows/deposit/widgets/transfer-crypto/compound/TransferCrypto.styles.ts:355`},disclosurePanelInner:{"TransferCrypto__styles.disclosurePanelInner":`TransferCrypto__styles.disclosurePanelInner`,"display-k1xSpc":`x78zum5`,"flexDirection-kXwgrk":`xdt5ytf`,"gap-kOIVth":`xmmi0ta x19decax`,"paddingTop-kLKAdn":`x96k8nx xskglhc`,$$css:`@stridge/kit:src/flows/deposit/widgets/transfer-crypto/compound/TransferCrypto.styles.ts:358`},disclosureRow:{"TransferCrypto__styles.disclosureRow":`TransferCrypto__styles.disclosureRow`,"display-k1xSpc":`x78zum5`,"alignItems-kGNEyG":`x6s0dn4`,"gap-kOIVth":`x883omv`,$$css:`@stridge/kit:src/flows/deposit/widgets/transfer-crypto/compound/TransferCrypto.styles.ts:373`},disclosureRowTextWithInfo:{"TransferCrypto__styles.disclosureRowTextWithInfo":`TransferCrypto__styles.disclosureRowTextWithInfo`,"display-k1xSpc":`x78zum5`,"alignItems-kGNEyG":`x6s0dn4`,"flexWrap-kwnvtZ":`x1a02dak`,"gap-kOIVth":`x17d4w8g`,$$css:`@stridge/kit:src/flows/deposit/widgets/transfer-crypto/compound/TransferCrypto.styles.ts:378`},disclosureRowIcon:{"TransferCrypto__styles.disclosureRowIcon":`TransferCrypto__styles.disclosureRowIcon`,"width-kzqmXN":`x6jxa94`,"height-kZKoxP":`x1v9usgg`,"flexShrink-kmuXW":`x2lah0s`,"color-kMwMTN":`xdksllq`,$$css:`@stridge/kit:src/flows/deposit/widgets/transfer-crypto/compound/TransferCrypto.styles.ts:384`},infoTrigger:{"TransferCrypto__styles.infoTrigger":`TransferCrypto__styles.infoTrigger`,"display-k1xSpc":`x3nfvp2`,"alignItems-kGNEyG":`x6s0dn4`,"justifyContent-kjj79g":`xl56j7k`,"padding-kmVPX3":`x1717udv`,"backgroundColor-kWkggS":`xjbqb8w`,"borderWidth-kMzoRj":`xc342km`,"borderStyle-ksu8eU":`x1y0btm7`,"outline-kI3sdo":`x1a2a7pz`,"cursor-kkrTdU":`x1146j2`,"color-kMwMTN":`x137ha3m`,"borderRadius-kaIpWk":`x1npxkrn`,":focus-visible_boxShadow-kEtg5x":`xhatipn`,$$css:`@stridge/kit:src/flows/deposit/widgets/transfer-crypto/compound/TransferCrypto.styles.ts:390`},disclosureRowInfo:{"TransferCrypto__styles.disclosureRowInfo":`TransferCrypto__styles.disclosureRowInfo`,"width-kzqmXN":`x10vfzb2`,"height-kZKoxP":`x6w4g8m`,"flexShrink-kmuXW":`x2lah0s`,"color-kMwMTN":`x15rks2t`,$$css:`@stridge/kit:src/flows/deposit/widgets/transfer-crypto/compound/TransferCrypto.styles.ts:406`},disclosureChevron:{"TransferCrypto__styles.disclosureChevron":`TransferCrypto__styles.disclosureChevron`,"width-kzqmXN":`xsmyaan`,"height-kZKoxP":`x1kpxq89`,"flexShrink-kmuXW":`x2lah0s`,"color-kMwMTN":`xdksllq`,"strokeWidth-kfJifR":`xhr4kjn`,"transitionProperty-k1ekBW":`x11xpdln`,"transitionDuration-kIyJzY":`xx6bhzk`,"transitionTimingFunction-kAMwcw":`x4ognrn`,"[data-panel-open] &_transform-kSnp38":`xtqhfa`,$$css:`@stridge/kit:src/flows/deposit/widgets/transfer-crypto/compound/TransferCrypto.styles.ts:412`},helpQuestion:{"TransferCrypto__styles.helpQuestion":`TransferCrypto__styles.helpQuestion`,"marginInlineEnd-k71WvV":`xf6vk7d`,$$css:`@stridge/kit:src/flows/deposit/widgets/transfer-crypto/compound/TransferCrypto.styles.ts:425`},helpLink:{"TransferCrypto__styles.helpLink":`TransferCrypto__styles.helpLink`,"color-kMwMTN":`x1me39qh`,"textDecorationLine-kMnn75":`xujl8zx`,"textDecorationThickness-kNySMw":`xyi4chj`,$$css:`@stridge/kit:src/flows/deposit/widgets/transfer-crypto/compound/TransferCrypto.styles.ts:428`}};export{e as styles};
|
|
@@ -6,6 +6,11 @@ import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
|
6
6
|
* Header part — back button and title. `Dialog.CloseButton` renders as
|
|
7
7
|
* the trailing flex child only when the widget is mounted inside
|
|
8
8
|
* `Dialog.Content`.
|
|
9
|
+
*
|
|
10
|
+
* Activity-history trigger — when the host driver implements `refreshHistory`, an
|
|
11
|
+
* `<ActivityTrigger>` button renders next to the close X and opens the cross-flow activity
|
|
12
|
+
* surface. The steps router only mounts this header on `transferCrypto`, so no additional
|
|
13
|
+
* FSM-state gating is needed.
|
|
9
14
|
*/
|
|
10
15
|
declare function TransferCryptoHeader({
|
|
11
16
|
onBack,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{
|
|
1
|
+
"use client";import{useDepositDriverInstance as e}from"../../../../driver/context.js";import{useLingui as t}from"../../../../../../shared/i18n/useLingui.js";import"../../../../../../i18n/index.js";import{useDepositActions as n}from"../../../../orchestrator/controller.js";import{ChevronLeftIcon as r}from"../../../../../../shared/icons/ChevronLeftIcon.js";import"../../../../../../icons/index.js";import{IconButton as i}from"../../../../../../shared/ui/IconButton/IconButton.js";import{Dialog as a}from"../../../../../../shared/ui/Dialog/Dialog.js";import"../../../../../../shared/ui/Dialog/index.js";import{Card as o}from"../../../../../../shared/ui/Card/Card.js";import{text as s}from"../../../../../../shared/ui/Text/Text.js";import"../../../../../../ui/index.js";import{ActivityTrigger as c}from"../../../../../../shared/widgets/activity-history/ActivityTrigger.js";import"../../../../../../shared/widgets/activity-history/index.js";import{TRANSFER_CRYPTO_SLOTS as l}from"../TransferCrypto.slots.js";import{styles as u}from"../TransferCrypto.styles.js";import{jsx as d,jsxs as f}from"react/jsx-runtime";import*as p from"@stylexjs/stylex";function m({onBack:m,title:h}){let{_:g}=t(),{openHistory:_}=n(),v=typeof e().refreshHistory==`function`,y=h??g({id:`3dqPLT`,message:`Transfer Crypto`});return f(o.Header,{"data-stridge-slot":l.header,...p.props(u.header),children:[f(`div`,{...p.props(u.headerLeft),children:[typeof m==`function`?d(i,{"aria-label":g({id:`iH8pgl`,message:`Back`}),onClick:m,children:d(r,{"aria-hidden":!0,...p.props(u.backIcon)})}):null,d(s.span,{size:`base`,fontWeight:`semibold`,leading:`tight`,tracking:`tight`,style:{margin:0},children:y})]}),f(`div`,{...p.props(u.headerTrailing),children:[v?d(c,{onOpen:_}):null,d(a.CloseButton,{})]})]})}export{m as TransferCryptoHeader};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import { QuoteResponse } from "@stridge/sdk";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import { GatewaySettlementDto, GatewayUdaDto } from "@stridge/sdk";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{useWithdrawBindings as e}from"../bindings/WithdrawBindings.js";import"../bindings/index.js";import{useWithdrawSnapshot as t}from"../driver/context.js";import{useWithdrawState as n}from"../orchestrator/controller.js";import{useWithdraw as r}from"../orchestrator/useWithdraw.js";import"../orchestrator/index.js";import{useWithdrawEmissions as i}from"../../../events/emit/useWithdrawEmissions.js";import"../../../events/emit/index.js";import{useIntercomShutdownOnUnmount as a}from"../../../shared/support/useIntercomShutdownOnUnmount.js";import"../../../shared/support/index.js";import{Dialog as o}from"../../../shared/ui/Dialog/Dialog.js";import"../../../shared/ui/Dialog/index.js";import{Withdraw as s}from"../widgets/withdraw/compound/Withdraw.js";import"../../../withdraw/compound/index.js";import{
|
|
1
|
+
"use client";import{useWithdrawBindings as e}from"../bindings/WithdrawBindings.js";import"../bindings/index.js";import{useWithdrawSnapshot as t}from"../driver/context.js";import{useWithdrawState as n}from"../orchestrator/controller.js";import{useWithdraw as r}from"../orchestrator/useWithdraw.js";import"../orchestrator/index.js";import{useWithdrawEmissions as i}from"../../../events/emit/useWithdrawEmissions.js";import"../../../events/emit/index.js";import{useIntercomShutdownOnUnmount as a}from"../../../shared/support/useIntercomShutdownOnUnmount.js";import"../../../shared/support/index.js";import{Dialog as o}from"../../../shared/ui/Dialog/Dialog.js";import"../../../shared/ui/Dialog/index.js";import{Withdraw as s}from"../widgets/withdraw/compound/Withdraw.js";import"../../../withdraw/compound/index.js";import{WithdrawHistoryDetail as c}from"../widgets/activity-history/WithdrawHistoryDetail.js";import{WithdrawHistoryList as l}from"../widgets/activity-history/WithdrawHistoryList.js";import{WithdrawError as u}from"../widgets/withdraw-error/WithdrawError.js";import{WithdrawForm as d}from"../widgets/withdraw-form/WithdrawForm.js";import{WithdrawInProgress as f}from"../widgets/withdraw-in-progress/WithdrawInProgress.js";import{WithdrawSuccess as p}from"../widgets/withdraw-success/WithdrawSuccess.js";import"../../../_internal/withdraw/widgets/index.js";import{jsx as m,jsxs as h}from"react/jsx-runtime";function g({container:g,metadata:_,onError:v,balance:y,onSubmit:b,suggestedRecipient:x}={}){let S=n(),{close:C}=r(),w=t(),T=S.name!==`closed`;return i({state:S,settlement:w.settlement,quote:w.quote,metadata:_}),a(),e({...y===void 0?{}:{balance:y},...b?{onSubmit:b}:{},...x?{suggestedRecipient:x}:{}}),m(o,{open:T,onOpenChange:e=>e?void 0:C(),children:m(o.Content,{container:g,children:m(s.Boundary,{...v?{onError:v}:{},children:m(s.Guards,{children:h(s.Steps,{children:[m(s.Step,{name:`form`,children:m(d,{})}),m(s.Step,{name:`inProgress`,children:m(f,{})}),m(s.Step,{name:`success`,children:m(p,{})}),m(s.Step,{name:`error`,children:m(u,{})}),m(s.Step,{name:`historyList`,children:m(l,{})}),m(s.Step,{name:`historyDetail`,children:m(c,{})})]})})})})})}export{g as WithdrawDialog};
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { Entity, SettlementFailureKind, TxRef } from "../../../shared/driver/types.js";
|
|
2
2
|
import { FormattedField } from "../../../shared/format/types.js";
|
|
3
|
+
import { ActivityHistoryPayload } from "../../../shared/widgets/activity-history/payloads.js";
|
|
3
4
|
import { ReceiveOptionDto, ReceiveOptionsResponse, WithdrawableBalanceDto, WithdrawableBalancesResponse, WithdrawalQuoteDto, WithdrawalQuoteResponse, WithdrawalSettlementDto, WithdrawalSettlementResponse } from "./dto.js";
|
|
4
5
|
import { ReceiveChainPayload, ReceiveTokenOptionPayload, WithdrawableBalanceItemPayload, WithdrawalQuoteBreakdownPayload, WithdrawalQuotePayload, WithdrawalReceiveAssetPayload, WithdrawalSettlementFailurePayload, WithdrawalSettlementPayload, WithdrawalSettlementPendingPayload, WithdrawalSettlementSuccessPayload } from "./payloads.js";
|
|
6
|
+
import { GatewayPollResponse, GatewayUdaDto } from "@stridge/sdk";
|
|
5
7
|
|
|
6
8
|
//#region src/flows/withdraw/driver/types.d.ts
|
|
7
9
|
/**
|
|
@@ -51,6 +53,15 @@ interface WithdrawSnapshot {
|
|
|
51
53
|
* `<StridgeProvider flows.withdraw.maxAmountUsd>` and constant across the driver's lifetime.
|
|
52
54
|
*/
|
|
53
55
|
maxAmountUsd?: FormattedField<number>;
|
|
56
|
+
/**
|
|
57
|
+
* Owner-scoped recent activity. Backed by the same multi-UDA envelope from
|
|
58
|
+
* `GET /gateway/{owner}` the deposit flow consumes — the list spans both deposit-direction
|
|
59
|
+
* and withdraw-direction settlements for the connected owner. Drives the kit's in-dialog
|
|
60
|
+
* `<ActivityHistory>` surface. `idle` when no fetch has run yet; `loading` during the first
|
|
61
|
+
* fetch; `ready` / `stale` once a list has landed; `error` when the initial fetch failed and
|
|
62
|
+
* the list is empty.
|
|
63
|
+
*/
|
|
64
|
+
history: Entity<ActivityHistoryPayload, ReadonlyArray<GatewayUdaDto>, GatewayPollResponse>;
|
|
54
65
|
}
|
|
55
66
|
/**
|
|
56
67
|
* Input to {@link WithdrawDriver.requestQuote}. The form widget builds this from current field
|
|
@@ -191,6 +202,29 @@ interface WithdrawDriver {
|
|
|
191
202
|
* into its own snapshot. Hosts that surface a static brand-side balance can omit this.
|
|
192
203
|
*/
|
|
193
204
|
watchWithdrawableBalances?(input: WatchWithdrawableBalancesInput, listener: (entity: WithdrawSnapshot["withdrawableBalances"]) => void, signal: AbortSignal): void;
|
|
205
|
+
/**
|
|
206
|
+
* Owner-scoped activity refresh. Calls `GET /gateway/{owner}` without a destination tuple,
|
|
207
|
+
* collapses the multi-UDA envelope into a row payload, and updates {@link
|
|
208
|
+
* WithdrawSnapshot.history} in place. Mirrors the deposit driver's contract — the kit's
|
|
209
|
+
* `<ActivityHistory>` surface is shared between the two dialogs, so both drivers expose the
|
|
210
|
+
* same refresh action. Used as the imperative one-shot trigger — the activity surface's
|
|
211
|
+
* error-view retry button calls this. Steady-state recurring fetches land via
|
|
212
|
+
* {@link watchHistory}. Optional — drivers that don't have a multi-UDA history concept can
|
|
213
|
+
* omit it, in which case the activity header icon is hidden.
|
|
214
|
+
*/
|
|
215
|
+
refreshHistory?(signal: AbortSignal): void;
|
|
216
|
+
/**
|
|
217
|
+
* Long-running adaptive poll of `GET /gateway/{owner}` (unfiltered). Updates
|
|
218
|
+
* {@link WithdrawSnapshot.history} in place every tick. Cadence adapts to the
|
|
219
|
+
* current payload — short interval while any row is `pending`, long interval
|
|
220
|
+
* once all rows are terminal. Mounted by the controller while the FSM is on
|
|
221
|
+
* `history`; aborted on transition out.
|
|
222
|
+
*
|
|
223
|
+
* Optional — drivers that don't have a multi-UDA history concept can omit
|
|
224
|
+
* it. When omitted alongside {@link refreshHistory}, the activity surface
|
|
225
|
+
* stays cold (only the initial paint, no live updates).
|
|
226
|
+
*/
|
|
227
|
+
watchHistory?(signal: AbortSignal): void;
|
|
194
228
|
}
|
|
195
229
|
//#endregion
|
|
196
230
|
export { PrepareWithdrawalInput, RequestWithdrawalQuoteInput, WatchWithdrawableBalancesInput, WatchWithdrawalSettlementInput, WithdrawDriver, WithdrawPreparation, WithdrawSnapshot };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{useLingui as e}from"../../../shared/i18n/useLingui.js";import"../../../i18n/index.js";import{toFailure as t}from"../../../shared/orchestrator/toFailure.js";import{useDriverSettlementListener as n}from"../../../shared/orchestrator/useDriverSettlementListener.js";import{useEffectiveState as r}from"../../../shared/orchestrator/useEffectiveState.js";import{useSettlementWatcher as i}from"../../../shared/orchestrator/useSettlementWatcher.js";import"../../../shared/orchestrator/index.js";import{useWithdrawBindingsRef as a}from"../bindings/WithdrawBindings.js";import"../bindings/index.js";import{useWithdrawDriverInstance as o}from"../driver/context.js";import{initialState as s,reducer as c}from"./reducer.js";import{createContext as l,use as u,useCallback as d,
|
|
1
|
+
"use client";import{useLingui as e}from"../../../shared/i18n/useLingui.js";import"../../../i18n/index.js";import{toFailure as t}from"../../../shared/orchestrator/toFailure.js";import{useDriverSettlementListener as n}from"../../../shared/orchestrator/useDriverSettlementListener.js";import{useEffectiveState as r}from"../../../shared/orchestrator/useEffectiveState.js";import{useSettlementWatcher as i}from"../../../shared/orchestrator/useSettlementWatcher.js";import"../../../shared/orchestrator/index.js";import{useWithdrawBindingsRef as a}from"../bindings/WithdrawBindings.js";import"../bindings/index.js";import{useWithdrawDriverInstance as o}from"../driver/context.js";import{initialState as s,reducer as c}from"./reducer.js";import{createContext as l,use as u,useCallback as d,useEffect as f,useMemo as p,useReducer as m,useRef as h}from"react";import{jsx as g}from"react/jsx-runtime";const _={id:`ldK3jJ`,message:`Failed to submit withdrawal.`},v={id:`kUFhUv`,message:`Withdrawal failed.`},y={id:`srsA0x`,message:`Withdrawal declined.`},b=l(null);b.displayName=`WithdrawControllerContext`;function x(){let e=u(b);if(!e)throw Error(`useWithdraw / WithdrawControllerProvider must be used inside <KitProvider withdraw={…} />. Mount KitProvider once at the host's app root with a withdraw driver.`);return e}function S(){return u(b)}function C(){return x().state}function w(){return x().effectiveState}function T(){return x().actions}function E({children:e}){let t=o(),[n,a]=m(c,s),l=O(n,a,t),u=n.name===`inProgress`?{form:n.ctx.input,submittedAt:n.ctx.submittedAt,...n.ctx.tx?{tx:n.ctx.tx}:{}}:void 0;i(t,u,u?`${u.submittedAt}|${u.tx?.hash??``}`:void 0),k(t,n.name===`historyList`||n.name===`historyDetail`),A(n,a,t);let d=r(n),f=D(a,l,t);return g(b,{value:p(()=>({state:n,effectiveState:d,dispatch:a,controller:f,actions:l}),[n,d,f,l]),children:e})}function D(e,t,n){let r=h(n);r.current=n;let i=d(()=>{r.current.arm(),e({type:`OPEN`})},[e]),a=d(()=>{e({type:`CLOSE`})},[e]);return p(()=>({open:i,close:a,actions:t}),[i,a,t])}function O(n,r,i){let o=h(n);o.current=n;let s=h(i);s.current=i;let c=h(r);c.current=r;let{i18n:l}=e(),u=h(l);u.current=l;let f=a(),m=d(e=>{let n=s.current;c.current({type:`SUBMIT`,input:e});let r=new AbortController,i={sourceAssetSymbol:e.sourceAssetSymbol,sourceChainId:e.sourceChainId,amount:e.amount,receiveTokenSymbol:e.receiveTokenSymbol,receiveChainId:e.receiveChainId,recipientAddress:e.recipientAddress},a={beginProcessing(e){c.current({type:`BEGIN_PROCESSING`,submittedAt:Date.now(),...e?{tx:e}:{}})},setTxHash(e){c.current({type:`SET_TX_HASH`,tx:e,submittedAt:Date.now()})},fail(e){c.current({type:`MARK_FAILED`,...e?{failure:e}:{}})},decline(){c.current({type:`SUBMIT_FAILED`,failure:{reason:u.current._(y),code:`UserRejectedRequestError`},input:e})},succeed(){c.current({type:`MARK_SUCCEEDED`})}};n.prepareWithdrawal(i,r.signal).then(i=>{if(r.signal.aborted)return;let o=f.current.onSubmit;if(!o){c.current({type:`SUBMIT_FAILED`,failure:t(Error(`WithdrawDialog onSubmit is missing.`),u.current._(_)),input:e});return}let s=n.getSnapshot().quote,l=s.status===`ready`||s.status===`stale`?s.payload:void 0;try{let n=o({form:e,depositTarget:i.depositTarget,correlation:i.correlation,...l?{quote:l}:{}},a,r.signal);n&&typeof n.catch==`function`&&n.catch(n=>{r.signal.aborted||c.current({type:`SUBMIT_FAILED`,failure:t(n,u.current._(_)),input:e})})}catch(n){if(r.signal.aborted)return;c.current({type:`SUBMIT_FAILED`,failure:t(n,u.current._(_)),input:e})}}).catch(n=>{r.signal.aborted||c.current({type:`SUBMIT_FAILED`,failure:t(n,u.current._(_)),input:e})})},[]),g=d(()=>{c.current({type:`CLOSE`})},[]),v=d(()=>{c.current({type:`RESET`})},[]),b=d(()=>{c.current({type:`CLEAR_NOTICE`})},[]),x=d(()=>{c.current({type:`BACK`})},[]),S=d(()=>{o.current.name===`form`&&c.current({type:`OPEN_HISTORY`})},[]),C=d(e=>{c.current({type:`SELECT_SETTLEMENT`,settlementId:e})},[]);return p(()=>({submit:m,close:g,reset:v,clearNotice:b,back:x,openHistory:S,selectSettlement:C}),[m,g,v,b,x,S,C])}function k(e,t){f(()=>{if(!t||!e.watchHistory)return;let n=new AbortController;return e.watchHistory(n.signal),()=>n.abort()},[t,e])}function A(t,r,i){let a=h(t);a.current=t;let{i18n:o}=e(),s=h(o);s.current=o,n(i,(e,t)=>{if(a.current.name===`inProgress`){if(e===`succeeded`){r({type:`SETTLEMENT_SUCCEEDED`});return}if(e===`failed`){let e=t.settlement,n=e.status===`ready`||e.status===`stale`?e.payload:null,i=n&&n.kind===`failed`?{reason:s.current._(v),code:n.failureKind}:void 0;r({type:`SETTLEMENT_FAILED`,...i?{failure:i}:{}})}}})}export{E as WithdrawControllerProvider,x as useControllerContext,S as useOptionalControllerContext,T as useWithdrawActions,w as useWithdrawEffectiveState,C as useWithdrawState};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{isUserRejectionFailure as e}from"../../../shared/orchestrator/userRejection.js";import"../../../shared/orchestrator/index.js";const t={name:`closed`};function n(e,t){switch(e.name){case`closed`:return r(t);case`form`:return i(e,t);case`submitting`:return a(e,t);case`inProgress`:return o(e,t);case`success`:return s(e,t);case`error`:return c(e,t);default:return
|
|
1
|
+
import{isUserRejectionFailure as e}from"../../../shared/orchestrator/userRejection.js";import"../../../shared/orchestrator/index.js";const t={name:`closed`};function n(e,t){switch(e.name){case`closed`:return r(t);case`form`:return i(e,t);case`submitting`:return a(e,t);case`inProgress`:return o(e,t);case`success`:return s(e,t);case`error`:return c(e,t);case`historyList`:return l(e,t);case`historyDetail`:return u(e,t);default:return f(e)}}function r(e){return e.type===`OPEN`?{name:`form`}:{name:`closed`}}function i(e,t){switch(t.type){case`SUBMIT`:return{name:`submitting`,ctx:{input:t.input}};case`CLEAR_NOTICE`:return e.ctx?.notice?{name:`form`}:e;case`OPEN_HISTORY`:return{name:`historyList`,ctx:{backTarget:{kind:`form`,...e.ctx?.notice?{notice:e.ctx.notice}:{}}}};case`CLOSE`:return{name:`closed`};default:return e}}function a(t,n){switch(n.type){case`BEGIN_PROCESSING`:return{name:`inProgress`,ctx:{input:t.ctx.input,submittedAt:n.submittedAt,...n.tx?{tx:n.tx}:{}}};case`SET_TX_HASH`:return{name:`inProgress`,ctx:{input:t.ctx.input,submittedAt:n.submittedAt,tx:n.tx}};case`MARK_SUCCEEDED`:return{name:`success`,ctx:{input:t.ctx.input}};case`MARK_FAILED`:return{name:`error`,ctx:{input:t.ctx.input,...n.failure?{failure:n.failure}:{}}};case`SUBMIT_FAILED`:return e(n.failure)?{name:`form`,ctx:{notice:n.failure.reason}}:{name:`error`,ctx:{input:n.input,failure:n.failure}};case`CLOSE`:return{name:`closed`};default:return t}}function o(e,t){switch(t.type){case`SET_TX_HASH`:return{name:`inProgress`,ctx:{...e.ctx,tx:t.tx}};case`BEGIN_PROCESSING`:return{name:`inProgress`,ctx:{input:e.ctx.input,submittedAt:e.ctx.submittedAt,...e.ctx.tx?{tx:e.ctx.tx}:t.tx?{tx:t.tx}:{}}};case`MARK_SUCCEEDED`:return{name:`success`,ctx:{input:e.ctx.input,...e.ctx.tx?{tx:e.ctx.tx}:{}}};case`MARK_FAILED`:return{name:`error`,ctx:{input:e.ctx.input,...e.ctx.tx?{tx:e.ctx.tx}:{},...t.failure?{failure:t.failure}:{}}};case`SETTLEMENT_SUCCEEDED`:return{name:`success`,ctx:{input:e.ctx.input,...e.ctx.tx?{tx:e.ctx.tx}:{}}};case`SETTLEMENT_FAILED`:return{name:`error`,ctx:{input:e.ctx.input,...e.ctx.tx?{tx:e.ctx.tx}:{},...t.failure?{failure:t.failure}:{}}};case`CLOSE`:return{name:`closed`};default:return e}}function s(e,t){switch(t.type){case`RESET`:return{name:`form`};case`CLOSE`:return{name:`closed`};default:return e}}function c(e,t){switch(t.type){case`RESET`:return{name:`form`};case`CLOSE`:return{name:`closed`};default:return e}}function l(e,t){switch(t.type){case`SELECT_SETTLEMENT`:return{name:`historyDetail`,ctx:{settlementId:t.settlementId,backTarget:e.ctx.backTarget}};case`BACK`:return d(e.ctx.backTarget);case`CLOSE`:return{name:`closed`};default:return e}}function u(e,t){switch(t.type){case`BACK`:return{name:`historyList`,ctx:{backTarget:e.ctx.backTarget}};case`CLOSE`:return{name:`closed`};default:return e}}function d(e){return e.kind===`form`?e.notice?{name:`form`,ctx:{notice:e.notice}}:{name:`form`}:f(e.kind)}function f(e){throw Error(`Unhandled withdraw state: ${JSON.stringify(e)}`)}export{t as initialState,n as reducer};
|