@stridge/kit 0.1.0-alpha.12 → 0.1.0-alpha.14
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/KitProvider.js +1 -1
- package/dist/_internal/withdraw/driver/index.d.ts +2 -2
- package/dist/drivers/stridge/createStridgeDepositDriver.js +1 -1
- package/dist/drivers/stridge/createStridgeWithdrawDriver.d.ts +10 -12
- package/dist/drivers/stridge/createStridgeWithdrawDriver.js +1 -1
- package/dist/drivers/stridge/types.d.ts +7 -4
- package/dist/drivers/stridge-mock/createStridgeMockWithdrawDriver.d.ts +2 -2
- package/dist/drivers/stridge-mock/createStridgeMockWithdrawDriver.js +1 -1
- package/dist/flows/deposit/dialog/DepositDialog.js +1 -1
- package/dist/flows/deposit/orchestrator/controller.js +1 -1
- package/dist/flows/deposit/widgets/deposit/Deposit.js +1 -1
- package/dist/flows/deposit/widgets/transfer-crypto/compound/components/Address.js +1 -1
- package/dist/flows/deposit/widgets/transfer-crypto/compound/components/Disclosure.d.ts +2 -1
- package/dist/flows/deposit/widgets/transfer-crypto/compound/components/Disclosure.js +1 -1
- package/dist/flows/shared/transformers/pickRelevantSettlement.js +1 -1
- package/dist/flows/withdraw/dialog/WithdrawDialog.d.ts +57 -11
- package/dist/flows/withdraw/dialog/WithdrawDialog.js +1 -1
- package/dist/flows/withdraw/dialog/WithdrawDialogBindingsContext.d.ts +44 -0
- package/dist/flows/withdraw/dialog/WithdrawDialogBindingsContext.js +1 -0
- package/dist/flows/withdraw/driver/types.d.ts +53 -11
- 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 +106 -31
- package/dist/flows/withdraw/widgets/withdraw-form/WithdrawForm.js +1 -1
- package/dist/flows/withdraw/widgets/withdraw-form/compound/WithdrawForm.js +1 -1
- package/dist/flows/withdraw/widgets/withdraw-form/compound/components/RecipientField.d.ts +7 -5
- package/dist/flows/withdraw/widgets/withdraw-form/compound/components/RecipientField.js +1 -1
- package/dist/flows/withdraw/widgets/withdraw-form/compound/types.d.ts +8 -5
- 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/package.js +1 -1
- package/dist/shared/constants/brand-intercom.js +1 -0
- package/dist/shared/driver/types.d.ts +4 -3
- package/dist/shared/orchestrator/useSettlementWatcher.js +1 -1
- package/dist/shared/primitives/TxHashValue/TxHashValue.js +1 -1
- package/dist/shared/support/SupportLink.js +1 -0
- package/dist/shared/support/SupportSpinner.js +1 -0
- package/dist/shared/support/index.js +1 -0
- package/dist/shared/support/intercom-loader.js +1 -0
- package/dist/shared/support/useIntercomMerchantContext.js +1 -0
- package/dist/shared/support/useIntercomShutdownOnUnmount.js +1 -0
- package/dist/shared/support/useSupportTrigger.js +1 -0
- package/dist/shared/ui/Dialog/Dialog.js +1 -1
- package/dist/shared/ui/Select/Select.js +1 -1
- package/dist/shared/ui/WalletRow/WalletRow.js +1 -1
- package/dist/shared/widgets/confirm-transfer/compound/components/Disclaimer.js +1 -1
- package/dist/shared/widgets/error-state/compound/components/HelpInfo.js +1 -1
- package/dist/shared/widgets/success-state/compound/components/Actions.js +1 -1
- package/dist/stridge/StridgeProvider.d.ts +44 -3
- package/dist/stridge/StridgeProvider.js +1 -1
- package/dist/stridge/optionalWagmi.js +1 -0
- package/dist/stridge/stubs.js +1 -1
- package/dist/styles/index.css +4 -0
- package/dist/ui/index.js +1 -1
- package/dist/withdraw/dialog/index.d.ts +3 -1
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{createContext as e,use as t,useEffect as n,useMemo as r,useRef as i,useState as a}from"react";import{jsx as o}from"react/jsx-runtime";const s=e(null);s.displayName=`WithdrawDialogBindingsContext`;function c({children:e}){let[t,n]=a({}),c=i({});return o(s,{value:r(()=>({bindings:t,setBindings:n,ref:c}),[t]),children:e})}function l(){return t(s)?.bindings??{}}function u(){let e=t(s),n=i({});return e?.ref??n}function d(e){let r=t(s),a=e.balance,o=e.onSubmit,c=e.suggestedRecipient;r&&(r.ref.current={...a===void 0?{}:{balance:a},...o?{onSubmit:o}:{},...c?{suggestedRecipient:c}:{}});let l=i(r?.setBindings);l.current=r?.setBindings;let u=i(r?.ref);u.current=r?.ref,n(()=>{let e=l.current;if(e)return e({...a===void 0?{}:{balance:a},...o?{onSubmit:o}:{},...c?{suggestedRecipient:c}:{}}),()=>{let e=l.current,t=u.current;t&&(t.current={}),e&&e({})}},[a,o,c])}export{c as WithdrawDialogBindingsProvider,d as usePublishWithdrawDialogBindings,l as useWithdrawDialogBindings,u as useWithdrawDialogBindingsRef};
|
|
@@ -57,17 +57,57 @@ interface RequestWithdrawalQuoteInput {
|
|
|
57
57
|
recipientAddress: string;
|
|
58
58
|
}
|
|
59
59
|
/**
|
|
60
|
-
* Input to {@link WithdrawDriver.
|
|
61
|
-
* — the live driver re-uses the most recent quote for
|
|
62
|
-
* scope both calls.
|
|
60
|
+
* Input to {@link WithdrawDriver.prepareWithdrawal}. Identical to {@link RequestWithdrawalQuoteInput}
|
|
61
|
+
* — the live driver re-uses the most recent quote shape for the gateway/start call, so the same
|
|
62
|
+
* identifying fields scope both calls.
|
|
63
63
|
*/
|
|
64
|
-
type
|
|
64
|
+
type PrepareWithdrawalInput = RequestWithdrawalQuoteInput;
|
|
65
65
|
/**
|
|
66
|
-
*
|
|
67
|
-
*
|
|
66
|
+
* Result of {@link WithdrawDriver.prepareWithdrawal}. Carries everything the host's `onSubmit`
|
|
67
|
+
* callback needs to broadcast a transfer to the Stridge UDA on the brand-currency chain — the
|
|
68
|
+
* UDA address, the chain, the token, the amount — plus the Stridge correlation fields the host
|
|
69
|
+
* may want to mirror into their own backend logs.
|
|
70
|
+
*/
|
|
71
|
+
interface WithdrawPreparation {
|
|
72
|
+
/**
|
|
73
|
+
* Where the host should send brand-currency funds. The kit has already provisioned a UDA
|
|
74
|
+
* (via `gateway/start`); the host's job is to broadcast a single on-chain transfer of
|
|
75
|
+
* `amount` of `tokenSymbol` from their treasury / custodial wallet to `address` on `chainId`.
|
|
76
|
+
* Stridge takes over from there to bridge into the user's chosen recipient/chain/token.
|
|
77
|
+
*/
|
|
78
|
+
depositTarget: {
|
|
79
|
+
/** UDA deposit address on the brand-currency chain. */address: string; /** EIP-155 chain id of the brand-currency network. */
|
|
80
|
+
chainId: number; /** Brand-currency token symbol (e.g. `"USDC"`). */
|
|
81
|
+
tokenSymbol: string; /** ERC-20 contract address of the brand currency. Empty string for native gas tokens. */
|
|
82
|
+
tokenAddress: string; /** On-chain decimal precision (e.g. `6` for USDC on Ethereum, `18` for ETH). */
|
|
83
|
+
tokenDecimals: number; /** `true` when the brand currency is the chain's native gas token. */
|
|
84
|
+
isNative: boolean; /** Exact amount to transfer, in display units (kit-managed decimals already factored in). */
|
|
85
|
+
amount: number;
|
|
86
|
+
};
|
|
87
|
+
/**
|
|
88
|
+
* Stridge correlation slot the host can pass through to their own backend / logs. `owner`
|
|
89
|
+
* is the same value the kit threaded into `gateway/start.owner` for this UDA.
|
|
90
|
+
*/
|
|
91
|
+
correlation: {
|
|
92
|
+
owner: string;
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Input to {@link WithdrawDriver.watchSettlement}. `tx` is optional — when the host has
|
|
97
|
+
* surfaced a broadcast tx hash via the orchestrator's `setTxHash` action, the watcher anchors
|
|
98
|
+
* to it for precise matching. When omitted, the watcher falls back to a best-match heuristic
|
|
99
|
+
* (destination tuple + amount tolerance + submit-time window) so the kit can find the relevant
|
|
100
|
+
* settlement even if the host never surfaces a tx hash.
|
|
68
101
|
*/
|
|
69
102
|
interface WatchWithdrawalSettlementInput {
|
|
70
|
-
tx
|
|
103
|
+
tx?: TxRef;
|
|
104
|
+
/**
|
|
105
|
+
* Form snapshot at submit time. The driver uses this in best-match mode to filter
|
|
106
|
+
* `gateway/{owner}` to settlements whose destination matches the user's selection.
|
|
107
|
+
*/
|
|
108
|
+
form: RequestWithdrawalQuoteInput;
|
|
109
|
+
/** Unix-ms timestamp the host called `beginProcessing` — the start of the matching window. */
|
|
110
|
+
submittedAt: number;
|
|
71
111
|
}
|
|
72
112
|
/**
|
|
73
113
|
* Input to {@link WithdrawDriver.watchWithdrawableBalances}. Optional listener — the form's
|
|
@@ -113,10 +153,12 @@ interface WithdrawDriver {
|
|
|
113
153
|
*/
|
|
114
154
|
requestQuote(input: RequestWithdrawalQuoteInput, signal: AbortSignal): Promise<void>;
|
|
115
155
|
/**
|
|
116
|
-
*
|
|
117
|
-
*
|
|
156
|
+
* Provisions a fresh UDA for this withdrawal (via `gateway/start`) and returns the deposit
|
|
157
|
+
* target + Stridge correlation slot for the host's `onSubmit` callback to act on. The kit
|
|
158
|
+
* never signs the withdraw transfer itself — the host's backend (treasury wallet, custodial
|
|
159
|
+
* signer, hot-wallet service) does. See {@link WithdrawPreparation}.
|
|
118
160
|
*/
|
|
119
|
-
|
|
161
|
+
prepareWithdrawal(input: PrepareWithdrawalInput, signal: AbortSignal): Promise<WithdrawPreparation>;
|
|
120
162
|
/**
|
|
121
163
|
* Watches the settlement entity through its lifecycle (pending → succeeded / failed). The
|
|
122
164
|
* listener fires on every transition with the new envelope; the FSM consumes these via the
|
|
@@ -130,4 +172,4 @@ interface WithdrawDriver {
|
|
|
130
172
|
watchWithdrawableBalances?(input: WatchWithdrawableBalancesInput, listener: (entity: WithdrawSnapshot["withdrawableBalances"]) => void, signal: AbortSignal): void;
|
|
131
173
|
}
|
|
132
174
|
//#endregion
|
|
133
|
-
export {
|
|
175
|
+
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{useWithdrawDriverInstance as a}from"../driver/context.js";import{initialState as
|
|
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{useWithdrawDriverInstance as a}from"../driver/context.js";import{useWithdrawDialogBindingsRef as o}from"../dialog/WithdrawDialogBindingsContext.js";import{initialState as s,reducer as c}from"./reducer.js";import{createContext as l,use as u,useCallback as d,useMemo as f,useReducer as p,useRef as m}from"react";import{jsx as h}from"react/jsx-runtime";const g={id:`ldK3jJ`,message:`Failed to submit withdrawal.`},_={id:`kUFhUv`,message:`Withdrawal failed.`},v=l(null);v.displayName=`WithdrawControllerContext`;function y(){let e=u(v);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 b(){return y().state}function x(){return y().effectiveState}function S(){return y().actions}function C({children:e}){let t=a(),[n,o]=p(c,s),l=T(n,o,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),E(n,o,t);let d=r(n),m=w(o,l);return h(v,{value:f(()=>({state:n,effectiveState:d,dispatch:o,controller:m,actions:l}),[n,d,m,l]),children:e})}function w(e,t){let n=d(()=>{e({type:`OPEN`})},[e]),r=d(()=>{e({type:`CLOSE`})},[e]);return f(()=>({open:n,close:r,actions:t}),[n,r,t])}function T(n,r,i){let a=m(n);a.current=n;let s=m(i);s.current=i;let c=m(r);c.current=r;let{i18n:l}=e(),u=m(l);u.current=l;let p=o(),h=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}:{}})},succeed(){c.current({type:`MARK_SUCCEEDED`})}};n.prepareWithdrawal(i,r.signal).then(i=>{if(r.signal.aborted)return;let o=p.current.onSubmit;if(!o){c.current({type:`SUBMIT_FAILED`,failure:t(Error(`WithdrawDialog onSubmit is missing.`),u.current._(g)),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._(g)),input:e})})}catch(n){if(r.signal.aborted)return;c.current({type:`SUBMIT_FAILED`,failure:t(n,u.current._(g)),input:e})}}).catch(n=>{r.signal.aborted||c.current({type:`SUBMIT_FAILED`,failure:t(n,u.current._(g)),input:e})})},[]),_=d(()=>{c.current({type:`CLOSE`})},[]),v=d(()=>{c.current({type:`RESET`})},[]),y=d(()=>{c.current({type:`CLEAR_NOTICE`})},[]);return f(()=>({submit:h,close:_,reset:v,clearNotice:y}),[h,_,v,y])}function E(t,r,i){let a=m(t);a.current=t;let{i18n:o}=e(),s=m(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._(_),code:n.failureKind}:void 0;r({type:`SETTLEMENT_FAILED`,...i?{failure:i}:{}})}}})}export{C as WithdrawControllerProvider,y as useControllerContext,S as useWithdrawActions,x as useWithdrawEffectiveState,b 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 l(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`CLOSE`:return{name:`closed`};default:return e}}function a(t,n){switch(n.type){case`
|
|
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 l(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`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){throw Error(`Unhandled withdraw state: ${JSON.stringify(e)}`)}export{t as initialState,n as reducer};
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { TxRef } from "../../../shared/driver/types.js";
|
|
2
|
+
import { WithdrawalQuotePayload } from "../driver/payloads.js";
|
|
3
|
+
import { WithdrawPreparation } from "../driver/types.js";
|
|
2
4
|
import { FailureInfo } from "../../../shared/orchestrator/types.js";
|
|
3
5
|
|
|
4
6
|
//#region src/flows/withdraw/orchestrator/types.d.ts
|
|
@@ -22,22 +24,24 @@ interface WithdrawalFormSnapshot {
|
|
|
22
24
|
receiveChainId: number;
|
|
23
25
|
}
|
|
24
26
|
/**
|
|
25
|
-
* State machine state for the orchestrated withdraw dialog. Per-state discriminated `ctx`
|
|
26
|
-
* what data is available
|
|
27
|
-
* unrepresentable.
|
|
27
|
+
* State machine state for the orchestrated withdraw dialog. Per-state discriminated `ctx`
|
|
28
|
+
* narrows what data is available.
|
|
28
29
|
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
30
|
+
* **Host-paced lifecycle** (different from the old wagmi-signed model): the kit stays in
|
|
31
|
+
* `submitting` until the host's `onSubmit` callback calls one of the controller's actions
|
|
32
|
+
* (`beginProcessing`, `fail`, `succeed`). `inProgress` accepts an optional `tx` — the host may
|
|
33
|
+
* move the user into processing before a broadcast tx hash exists; the kit polls
|
|
34
|
+
* `gateway/{owner}` and best-matches the relevant settlement (destination tuple + amount +
|
|
35
|
+
* submit-time window) until the host supplies a tx hash via `setTxHash`. `success` / `error`
|
|
36
|
+
* similarly accept optional `tx` since the host may declare a terminal verdict directly.
|
|
31
37
|
*/
|
|
32
38
|
type WithdrawState = {
|
|
33
39
|
name: "closed";
|
|
34
40
|
} | {
|
|
35
41
|
name: "form";
|
|
36
42
|
/**
|
|
37
|
-
* Optional notice rendered inline near the submit footer.
|
|
38
|
-
*
|
|
39
|
-
* recipient + amount + receive selection) with `notice = "Signature declined…"` so they
|
|
40
|
-
* can retry without losing context. Cleared on the next SUBMIT or CLOSE.
|
|
43
|
+
* Optional notice rendered inline near the submit footer. Cleared on the next SUBMIT
|
|
44
|
+
* or CLOSE.
|
|
41
45
|
*/
|
|
42
46
|
ctx?: {
|
|
43
47
|
notice?: string;
|
|
@@ -50,24 +54,28 @@ type WithdrawState = {
|
|
|
50
54
|
} | {
|
|
51
55
|
name: "inProgress";
|
|
52
56
|
ctx: {
|
|
53
|
-
input: WithdrawalFormSnapshot;
|
|
54
|
-
|
|
57
|
+
input: WithdrawalFormSnapshot; /** Unix-ms timestamp the host moved the FSM into processing (drives best-match windowing). */
|
|
58
|
+
submittedAt: number;
|
|
59
|
+
/**
|
|
60
|
+
* Source-chain broadcast hash, when the host has surfaced one via
|
|
61
|
+
* `actions.setTxHash`. Absent while the kit relies on the best-match heuristic.
|
|
62
|
+
*/
|
|
63
|
+
tx?: TxRef;
|
|
55
64
|
};
|
|
56
65
|
} | {
|
|
57
66
|
name: "success";
|
|
58
67
|
ctx: {
|
|
59
68
|
input: WithdrawalFormSnapshot;
|
|
60
|
-
tx
|
|
69
|
+
tx?: TxRef;
|
|
61
70
|
};
|
|
62
71
|
} | {
|
|
63
72
|
name: "error";
|
|
64
73
|
ctx: {
|
|
65
74
|
/**
|
|
66
75
|
* Form snapshot captured at submit time. Set when error follows a submit attempt;
|
|
67
|
-
* absent when the error path was reached without a known prior submit
|
|
68
|
-
* unreachable in V2 — kept optional so resume-style entries can re-use the slot).
|
|
76
|
+
* absent when the error path was reached without a known prior submit.
|
|
69
77
|
*/
|
|
70
|
-
input?: WithdrawalFormSnapshot; /** Optional non-settlement failure (quote / submission rejection). */
|
|
78
|
+
input?: WithdrawalFormSnapshot; /** Optional non-settlement failure (quote / submission rejection, host-supplied failure). */
|
|
71
79
|
failure?: FailureInfo; /** Source-chain broadcast tx hash when the error followed a successful broadcast. */
|
|
72
80
|
tx?: TxRef;
|
|
73
81
|
};
|
|
@@ -79,6 +87,16 @@ type WithdrawState = {
|
|
|
79
87
|
type WithdrawStateName = WithdrawState["name"];
|
|
80
88
|
/**
|
|
81
89
|
* Reducer event union. Strict discriminated; no stringly-typed transitions.
|
|
90
|
+
*
|
|
91
|
+
* The host-paced lifecycle splits the old `SUBMIT_CONFIRMED { tx }` event into three pieces so
|
|
92
|
+
* the host can move the user forward at whichever step their backend actually completes:
|
|
93
|
+
*
|
|
94
|
+
* - `BEGIN_PROCESSING { tx?, submittedAt }` — host accepted the request; move to inProgress with
|
|
95
|
+
* or without a tx hash.
|
|
96
|
+
* - `SET_TX_HASH { tx }` — host surfaced a broadcast hash later; upgrade best-match polling to
|
|
97
|
+
* tx-anchored.
|
|
98
|
+
* - `MARK_SUCCEEDED` / `MARK_FAILED { failure? }` — host short-circuits to a terminal verdict
|
|
99
|
+
* (e.g. their own settlement verification ran independently of Stridge's poll).
|
|
82
100
|
*/
|
|
83
101
|
type WithdrawEvent = {
|
|
84
102
|
type: "OPEN";
|
|
@@ -88,12 +106,22 @@ type WithdrawEvent = {
|
|
|
88
106
|
type: "SUBMIT";
|
|
89
107
|
input: WithdrawalFormSnapshot;
|
|
90
108
|
} | {
|
|
91
|
-
type: "
|
|
109
|
+
type: "BEGIN_PROCESSING";
|
|
110
|
+
submittedAt: number;
|
|
111
|
+
tx?: TxRef;
|
|
112
|
+
} | {
|
|
113
|
+
type: "SET_TX_HASH";
|
|
92
114
|
tx: TxRef;
|
|
115
|
+
submittedAt: number;
|
|
93
116
|
} | {
|
|
94
117
|
type: "SUBMIT_FAILED";
|
|
95
118
|
failure: FailureInfo;
|
|
96
119
|
input: WithdrawalFormSnapshot;
|
|
120
|
+
} | {
|
|
121
|
+
type: "MARK_SUCCEEDED";
|
|
122
|
+
} | {
|
|
123
|
+
type: "MARK_FAILED";
|
|
124
|
+
failure?: FailureInfo;
|
|
97
125
|
} | {
|
|
98
126
|
type: "SETTLEMENT_SUCCEEDED";
|
|
99
127
|
} | {
|
|
@@ -101,15 +129,7 @@ type WithdrawEvent = {
|
|
|
101
129
|
failure?: FailureInfo;
|
|
102
130
|
} | {
|
|
103
131
|
type: "RESET";
|
|
104
|
-
}
|
|
105
|
-
/**
|
|
106
|
-
* Drops the inline notice on the `form` state. Dispatched by the form widget when the user
|
|
107
|
-
* starts editing again after a wallet-rejection landed them back on `form{notice}`. Mirror of
|
|
108
|
-
* deposit's `regenerating → ready` transition (where the notice clears as a side-effect of
|
|
109
|
-
* the next quote resolving) — withdraw's form has no FSM-driven phase to ride on, so the
|
|
110
|
-
* widget signals it explicitly.
|
|
111
|
-
*/
|
|
112
|
-
| {
|
|
132
|
+
} | {
|
|
113
133
|
type: "CLEAR_NOTICE";
|
|
114
134
|
};
|
|
115
135
|
/**
|
|
@@ -134,9 +154,10 @@ interface WithdrawController {
|
|
|
134
154
|
*/
|
|
135
155
|
interface WithdrawActions {
|
|
136
156
|
/**
|
|
137
|
-
* Submits the withdrawal
|
|
138
|
-
*
|
|
139
|
-
* the
|
|
157
|
+
* Submits the withdrawal. Dispatches `SUBMIT` synchronously (so the form flips to the
|
|
158
|
+
* loading-button state) and then fires the host's `<WithdrawDialog onSubmit>` callback with
|
|
159
|
+
* the prepared UDA target + a `WithdrawSubmitActions` handle. The kit stays in `submitting`
|
|
160
|
+
* until the host calls one of those actions (`beginProcessing`, `fail`, `succeed`).
|
|
140
161
|
*/
|
|
141
162
|
submit(input: WithdrawalFormSnapshot): void;
|
|
142
163
|
/** Close the dialog. Idempotent. */
|
|
@@ -147,10 +168,64 @@ interface WithdrawActions {
|
|
|
147
168
|
*/
|
|
148
169
|
reset(): void;
|
|
149
170
|
/**
|
|
150
|
-
* Clear the form's inline notice
|
|
151
|
-
* No-op when there's no notice or the FSM isn't on `form`.
|
|
171
|
+
* Clear the form's inline notice. No-op when there's no notice or the FSM isn't on `form`.
|
|
152
172
|
*/
|
|
153
173
|
clearNotice(): void;
|
|
154
174
|
}
|
|
175
|
+
/**
|
|
176
|
+
* Payload the kit hands to the host's `<WithdrawDialog onSubmit>` callback. Carries everything
|
|
177
|
+
* the host needs to broadcast the source-chain transfer to the UDA (or to validate the request
|
|
178
|
+
* server-side before broadcasting / queueing).
|
|
179
|
+
*/
|
|
180
|
+
interface WithdrawSubmitInput {
|
|
181
|
+
/** What the user picked on the form (recipient, amount, receive token + chain). */
|
|
182
|
+
form: WithdrawalFormSnapshot;
|
|
183
|
+
/** Where the host should send brand-currency funds to trigger the bridge. */
|
|
184
|
+
depositTarget: WithdrawPreparation["depositTarget"];
|
|
185
|
+
/** Stridge correlation slot — useful for backend logs / cross-system traces. */
|
|
186
|
+
correlation: WithdrawPreparation["correlation"];
|
|
187
|
+
/** Active quote payload at submit time, when one is available. */
|
|
188
|
+
quote?: WithdrawalQuotePayload;
|
|
189
|
+
}
|
|
190
|
+
/**
|
|
191
|
+
* Imperative handles the host's `onSubmit` callback receives. Each action advances the kit's
|
|
192
|
+
* FSM at the point the host's backend reaches the matching state. All actions are optional —
|
|
193
|
+
* the host calls only what fits their flow (e.g. backend pre-validates and accepts ⇒
|
|
194
|
+
* `beginProcessing()`; later the broadcast lands ⇒ `setTxHash({ hash })`; settlement watching
|
|
195
|
+
* via Stridge takes over from there). The kit also exposes a `signal` for cancellation when
|
|
196
|
+
* the user closes the dialog mid-submit.
|
|
197
|
+
*/
|
|
198
|
+
interface WithdrawSubmitActions {
|
|
199
|
+
/**
|
|
200
|
+
* Move the FSM into `inProgress`. Pass `tx` if a broadcast hash already exists at this point;
|
|
201
|
+
* otherwise omit — the kit polls `gateway/{owner}` with a best-match heuristic until you
|
|
202
|
+
* call {@link setTxHash}. Idempotent — calling more than once is a no-op.
|
|
203
|
+
*/
|
|
204
|
+
beginProcessing(tx?: TxRef): void;
|
|
205
|
+
/**
|
|
206
|
+
* Surface a broadcast hash mid-processing. Upgrades the watcher from best-match to
|
|
207
|
+
* tx-anchored. Legal from `inProgress` or `submitting` (auto-promotes to `inProgress`).
|
|
208
|
+
*/
|
|
209
|
+
setTxHash(tx: TxRef): void;
|
|
210
|
+
/**
|
|
211
|
+
* Mark the withdraw failed. Legal from `submitting` (pre-broadcast rejection) and
|
|
212
|
+
* `inProgress` (post-broadcast failure). The optional `failure` carries a localized
|
|
213
|
+
* reason + machine code for analytics; omit when the host has nothing meaningful to
|
|
214
|
+
* report and just needs to terminate the flow.
|
|
215
|
+
*/
|
|
216
|
+
fail(failure?: FailureInfo): void;
|
|
217
|
+
/**
|
|
218
|
+
* Mark the withdraw succeeded directly. Useful when the host runs their own settlement
|
|
219
|
+
* verification independently of Stridge's poll. Legal from `submitting` and `inProgress`.
|
|
220
|
+
*/
|
|
221
|
+
succeed(): void;
|
|
222
|
+
}
|
|
223
|
+
/**
|
|
224
|
+
* Host-supplied callback fired when the user submits the withdrawal form. The kit hands the
|
|
225
|
+
* callback the resolved {@link WithdrawSubmitInput} plus a {@link WithdrawSubmitActions} handle
|
|
226
|
+
* the host calls to advance the FSM. The kit does NOT await the callback's promise — the host
|
|
227
|
+
* is in control of pacing via the actions. The `signal` aborts when the user closes the dialog.
|
|
228
|
+
*/
|
|
229
|
+
type WithdrawSubmitCallback = (input: WithdrawSubmitInput, actions: WithdrawSubmitActions, signal: AbortSignal) => void | Promise<void>;
|
|
155
230
|
//#endregion
|
|
156
|
-
export { WithdrawActions, WithdrawController, WithdrawEvent, WithdrawState, WithdrawStateName, WithdrawalFormSnapshot };
|
|
231
|
+
export { WithdrawActions, WithdrawController, WithdrawEvent, WithdrawState, WithdrawStateName, WithdrawSubmitActions, WithdrawSubmitCallback, WithdrawSubmitInput, WithdrawalFormSnapshot };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{useKitI18n as e}from"../../../../shared/i18n/useKitI18n.js";import{useLingui as t}from"../../../../shared/i18n/useLingui.js";import"../../../../i18n/index.js";import{useWithdrawDriverInstance as n,useWithdrawSnapshot as r}from"../../driver/context.js";import{useWithdrawActions as
|
|
1
|
+
"use client";import{useKitI18n as e}from"../../../../shared/i18n/useKitI18n.js";import{useLingui as t}from"../../../../shared/i18n/useLingui.js";import"../../../../i18n/index.js";import{useWithdrawDriverInstance as n,useWithdrawSnapshot as r}from"../../driver/context.js";import{useWithdrawDialogBindings as i}from"../../dialog/WithdrawDialogBindingsContext.js";import{useWithdrawActions as ee,useWithdrawEffectiveState as te}from"../../orchestrator/controller.js";import{formatTokenAmount as ne}from"../../../../shared/format/formatTokenAmount.js";import{parseAmountInputValue as re}from"../../../../shared/ui/AmountInput/utils.js";import"../../../../shared/ui/AmountInput/index.js";import{toAssetDescriptor as a}from"../../../../shared/widgets/asset-descriptor.js";import{useQuoteCountdown as ie}from"../../../../shared/quote/useQuoteCountdown.js";import"../../../../shared/quote/index.js";import{WithdrawForm as o}from"./compound/WithdrawForm.js";import"./compound/index.js";import{useWithdrawDialogEvents as ae}from"../../dialog/WithdrawDialogEventsContext.js";import{isValidEvmAddress as oe,resolveSubmitLabel as se}from"./validation.js";import{useCallback as s,useEffect as c,useMemo as l,useRef as u,useState as d}from"react";import{jsx as f,jsxs as ce}from"react/jsx-runtime";function p({events:p}){let m=r(),h=n(),g=te(),_=ee(),{i18n:le,_:v}=t(),ue=ae(),de=l(()=>({...ue,...p??{}}),[ue,p]),y=u(de);y.current=de;let{balance:b,suggestedRecipient:fe}=i(),[x,pe]=d(``),[me,he]=d(``),S=g.name===`submitting`,C=g.name===`form`?g.ctx?.notice:void 0,ge=u(C);ge.current=C;let w=m.withdrawableBalances.status===`ready`||m.withdrawableBalances.status===`stale`?m.withdrawableBalances.payload[0]:void 0,T=l(()=>a(w)??{symbol:`USDC`},[w]),_e=l(()=>a(w?{symbol:w.networkName,eip155Id:w.eip155Id,isNative:!0,logoUrl:w.chainLogoUrl}:void 0)??{symbol:`BSC`},[w]),E=typeof b==`number`?b:typeof b==`object`?b.amount:void 0,ve=w?.symbol??T.symbol,D=E??w?.amount.value,ye=E===void 0?w?.symbol:ve,O=D!==void 0&&ye!==void 0?{amount:E===void 0?w?.amount.formatted??ne(D,le):ne(E,le),symbol:ye}:void 0,k=m.receiveOptions.status===`ready`||m.receiveOptions.status===`stale`?m.receiveOptions.payload:[],A=w?.eip155Id?Number(w.eip155Id):void 0,j=w?.symbol??T.symbol,M=l(()=>{let e=new Map;for(let t of k)for(let n of t.tokens){let r=n.symbol.toUpperCase(),i=e.get(r);i?i.push({chain:t,token:n}):e.set(r,[{chain:t,token:n}])}return e},[k]),N=l(()=>{if(M.size===0)return;let e=j.toUpperCase();return M.has(e)?e:M.keys().next().value},[M,j]),P=s(e=>{let t=M.get(e);if(!(!t||t.length===0))return(A===void 0?void 0:t.find(e=>e.chain.eip155Id===A))??t[0]},[M,A]),[F,I]=d(void 0),[L,R]=d(void 0);c(()=>{if(L||!N)return;let e=P(N);e&&(I(e.chain),R(e.token))},[N,P,L]);let z=s(()=>{ge.current&&_.clearNotice()},[_]),be=s(e=>{z(),pe(e),y.current.onRecipientChanged?.(e)},[z]),B=e().locale,V=s(e=>{z(),he(e);let t=re(e,B);y.current.onAmountChanged?.({raw:e,numeric:t})},[z,B]),xe=s(e=>{z();let t=e.symbol.toUpperCase(),n=M.get(t)?.find(e=>e.chain.eip155Id===F?.eip155Id)??P(t);n&&(I(n.chain),R(n.token),y.current.onReceiveTokenChanged?.(n.token),n.chain.eip155Id!==F?.eip155Id&&y.current.onReceiveChainChanged?.(n.chain))},[z,M,P,F?.eip155Id]),Se=s(e=>{z(),I(e);let t=L?.symbol.toUpperCase(),n=(t?e.tokens.find(e=>e.symbol.toUpperCase()===t):void 0)??e.tokens[0];n&&R(n),y.current.onReceiveChainChanged?.(e),n&&n.symbol!==L?.symbol&&y.current.onReceiveTokenChanged?.(n)},[z,L?.symbol]),H=re(me,B),U=H!==null&&H>0,Ce=x.trim(),we=Ce.length>0,W=oe(Ce),G=F!==void 0&&L!==void 0,K=U&&D!==void 0&&H>D,[q,Te]=d(null),J=(m.quote.status===`ready`||m.quote.status===`stale`)&&we&&U&&G&&q!==null&&q.recipient===x&&q.amount===H&&q.receiveChainId===F.eip155Id&&q.receiveSymbol===L.symbol?m.quote.payload:void 0,Ee=l(()=>M.size===0?[T]:[...M.values()].map(e=>{let t=e[0];return a({symbol:t.token.symbol,eip155Id:t.chain.eip155Id,address:t.token.address,isNative:t.token.isNative,logoUrl:t.token.assetLogoUrl})??{symbol:t.token.symbol}}),[M,T]),De=l(()=>{let e=L?.symbol.toUpperCase(),t=e?M.get(e):void 0;return(t?t.map(e=>e.chain):k).map(e=>a({symbol:e.networkName,eip155Id:e.eip155Id,isNative:!0,logoUrl:e.chainLogoUrl})??{symbol:e.networkName})},[L?.symbol,M,k]),Oe=L?a({symbol:L.symbol,eip155Id:F?.eip155Id,address:L.address,isNative:L.isNative,logoUrl:L.assetLogoUrl}):T,ke=F?a({symbol:F.networkName,eip155Id:F.eip155Id,isNative:!0,logoUrl:F.chainLogoUrl}):_e,Ae=l(()=>{if(J?.breakdown)return{route:J.breakdown.selectedRoute?.label,networkCost:J.breakdown.networkCost?.formatted,priceImpact:J.breakdown.priceImpact?.formatted}},[J]),je=l(()=>{if(U)return J?.receiveAmountUsd?J.receiveAmountUsd.formatted:`$${H.toFixed(2)}`},[H,U,J]),Me=J&&U?J.receiveAmount.formatted:void 0,Ne=J?.receiveAmountUsd?.formatted,Y=W&&U&&!K&&G&&J===void 0&&m.quote.status!==`error`,X=W&&U&&!K&&G&&J!==void 0,Pe=ie({expiresAt:J?.expiresAt,enabled:X}),Fe=X&&J?J.quoteTotalSeconds:void 0,[Z,Q]=d(!1);c(()=>{Q(!1)},[x,H,F?.eip155Id,L?.symbol,g.name]),c(()=>{if(!X||!J||g.name!==`form`||Z)return;let e=Math.max(0,J.expiresAt-Date.now()),t=setTimeout(()=>{Q(!0)},e);return()=>clearTimeout(t)},[X,J,g.name,Z]),c(()=>{if(!Z||g.name!==`form`||A===void 0||!F||!L||!W||!U||K)return;let e=new AbortController,t={recipient:x,amount:H??0,receiveChainId:F.eip155Id,receiveSymbol:L.symbol},n={sourceAssetSymbol:j,sourceChainId:A,amount:H??0,receiveTokenSymbol:L.symbol,receiveChainId:F.eip155Id,recipientAddress:x};return y.current.onQuoteRequested?.(n),h.requestQuote(n,e.signal).then(()=>{e.signal.aborted||Te(t)}).catch(()=>{}).finally(()=>{e.signal.aborted||Q(!1)}),()=>e.abort()},[Z,h,x,H,W,U,K,A,j,F,L,g.name]);let $=!W||!U||K||!G||Y||Z,Ie=se({enterRecipientAddress:v({id:`nr03QI`,message:`Enter Recipient Address`}),enterValidRecipientAddress:v({id:`GZPxmc`,message:`Enter Valid Recipient Address`}),enterAmount:v({id:`yH9V_J`,message:`Enter Amount`}),insufficientBalance:v({id:`N2DUxS`,message:`Insufficient Balance`}),regeneratingQuote:v({id:`Ly6geA`,message:`Regenerating quote…`}),estimatingQuote:v({id:`Uevt3L`,message:`Estimating quote`})},{isRecipientFilled:we,isRecipientValid:W,isAmountValid:U,exceedsBalance:K,quoteEstimating:Y,quoteRegenerating:Z}),Le=u(null);c(()=>{if(Le.current?.abort(),!W||!U||K||!G||g.name!==`form`||A===void 0)return;let e=new AbortController;Le.current=e;let t={recipient:x,amount:H,receiveChainId:F.eip155Id,receiveSymbol:L.symbol},n=setTimeout(()=>{let n={sourceAssetSymbol:j,sourceChainId:A,amount:H,receiveTokenSymbol:L.symbol,receiveChainId:F.eip155Id,recipientAddress:x};y.current.onQuoteRequested?.(n),h.requestQuote(n,e.signal).then(()=>{e.signal.aborted||Te(t)}).catch(()=>{})},400);return()=>{clearTimeout(n),e.abort()}},[h,x,H,W,U,K,G,A,j,F?.eip155Id,L?.symbol,g.name]);let Re=s(()=>{O&&V(O.amount)},[O,V]),ze=s(()=>{S||$||A===void 0||!F||!L||_.submit({sourceAssetSymbol:j,sourceChainId:A,amount:H??0,recipientAddress:x,receiveTokenSymbol:L.symbol,receiveChainId:F.eip155Id})},[_,H,A,j,F,L,x,$,S]),Be=s(e=>{let t=k.find(t=>String(t.eip155Id)===String(e.chainId));t&&Se(t)},[Se,k]),Ve=s(e=>{let t=e.symbol.toUpperCase(),n=M.get(t);!n||n.length===0||xe((n.find(e=>e.chain.eip155Id===F?.eip155Id)??n[0]).token)},[xe,M,F?.eip155Id]);return g.name!==`form`&&g.name!==`submitting`?null:ce(o,{recipientAddress:x,onRecipientChange:be,...fe?{suggestedRecipient:fe}:{},amount:me,onAmountChange:V,onAmountMax:Re,sourceAsset:T,sourceChain:_e,receiveAsset:Oe,receiveChain:ke,receiveAssetOptions:Ee,onReceiveAssetChange:Ve,receiveChainOptions:De,onReceiveChainChange:Be,balance:O,amountUsd:je,receiveAmount:Me,receiveAmountUsd:Ne,breakdown:Ae,quoteEstimating:Y,quoteRegenerating:Z,...Pe===void 0?{}:{quoteSeconds:Pe},...Fe===void 0?{}:{quoteTotalSeconds:Fe},submitting:S,submitDisabled:$,submitLabel:Ie,...C?{notice:C}:{},onSubmit:ze,children:[f(o.Header,{}),ce(o.Body,{children:[f(o.RecipientField,{}),f(o.AmountField,{}),f(o.ReceiveSelectors,{}),f(o.BreakdownCard,{})]}),f(o.Footer,{})]})}export{p as WithdrawForm};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{DialogShell as e}from"../../../../../shared/dialog/DialogShell.js";import{Tooltip as t}from"../../../../../shared/ui/Tooltip/Tooltip.js";import"../../../../../shared/ui/Tooltip/index.js";import{Frame as n}from"../../../../../shared/dialog/Frame.js";import{WithdrawFormContext as r}from"./context.js";import{WITHDRAW_FORM_SLOTS as i}from"./WithdrawForm.slots.js";import{styles as a}from"./WithdrawForm.styles.js";import{WithdrawFormAmountField as o}from"./components/AmountField.js";import{WithdrawFormBody as s}from"./components/Body.js";import{WithdrawFormBreakdownCard as c}from"./components/BreakdownCard.js";import{WithdrawFormFooter as l}from"./components/Footer.js";import{WithdrawFormHeader as u}from"./components/Header.js";import{WithdrawFormReceiveSelectors as d}from"./components/ReceiveSelectors.js";import{WithdrawFormRecipientField as f}from"./components/RecipientField.js";import{useCallback as p,useMemo as m,useState as h}from"react";import{jsx as g}from"react/jsx-runtime";import*as _ from"@stylexjs/stylex";const v=()=>void 0;function y(e){let{recipientAddress:o=``,onRecipientChange:s,
|
|
1
|
+
"use client";import{DialogShell as e}from"../../../../../shared/dialog/DialogShell.js";import{Tooltip as t}from"../../../../../shared/ui/Tooltip/Tooltip.js";import"../../../../../shared/ui/Tooltip/index.js";import{Frame as n}from"../../../../../shared/dialog/Frame.js";import{WithdrawFormContext as r}from"./context.js";import{WITHDRAW_FORM_SLOTS as i}from"./WithdrawForm.slots.js";import{styles as a}from"./WithdrawForm.styles.js";import{WithdrawFormAmountField as o}from"./components/AmountField.js";import{WithdrawFormBody as s}from"./components/Body.js";import{WithdrawFormBreakdownCard as c}from"./components/BreakdownCard.js";import{WithdrawFormFooter as l}from"./components/Footer.js";import{WithdrawFormHeader as u}from"./components/Header.js";import{WithdrawFormReceiveSelectors as d}from"./components/ReceiveSelectors.js";import{WithdrawFormRecipientField as f}from"./components/RecipientField.js";import{useCallback as p,useMemo as m,useState as h}from"react";import{jsx as g}from"react/jsx-runtime";import*as _ from"@stylexjs/stylex";const v=()=>void 0;function y(e){let{recipientAddress:o=``,onRecipientChange:s,suggestedRecipient:c,amount:l=``,onAmountChange:u,onAmountMax:d,sourceAsset:f,sourceChain:y,receiveAsset:b,receiveChain:x,receiveAssetOptions:S,onReceiveAssetChange:C,receiveChainOptions:w,onReceiveChainChange:T,balance:E,amountUsd:D,receiveAmount:O,receiveAmountUsd:k,breakdown:A,quoteEstimating:j=!1,quoteRegenerating:M=!1,quoteSeconds:N,quoteTotalSeconds:P,submitting:F=!1,submitDisabled:I=!1,submitLabel:L,notice:R,onSubmit:z,defaultBreakdownOpen:B=!1,breakdownOpen:V,onBreakdownOpenChange:H,children:U}=e,[W,G]=h(B),K=V!==void 0,q=K?V:W,J=p(e=>{K||G(e),H?.(e)},[K,H]),Y=b??f,X=x??y;return g(r,{value:m(()=>({recipientAddress:o,onRecipientChange:s??v,suggestedRecipient:c,amount:l,onAmountChange:u??v,onAmountMax:d,sourceAsset:f,sourceChain:y,receiveAsset:Y,receiveChain:X,receiveAssetOptions:S,onReceiveAssetChange:C,receiveChainOptions:w,onReceiveChainChange:T,balance:E,amountUsd:D,receiveAmount:O,receiveAmountUsd:k,breakdown:A,quoteEstimating:j,quoteRegenerating:M,quoteSeconds:N,quoteTotalSeconds:P,submitting:F,submitDisabled:I,submitLabel:L,notice:R,onSubmit:z,breakdownOpen:q,onBreakdownOpenChange:J}),[o,s,c,l,u,d,f,y,Y,X,S,C,w,T,E,D,O,k,A,j,M,N,P,F,I,L,R,z,q,J]),children:g(t.Provider,{children:g(n,{"data-stridge-slot":i.root,..._.props(a.root),children:U})})})}function b({open:t,defaultOpen:n,onOpenChange:r,trigger:i,children:a,...o}){return g(e,{open:t,defaultOpen:n,onOpenChange:r,trigger:i,children:g(y,{...o,children:a})})}(function(e){e.Header=u,e.Body=s,e.RecipientField=f,e.AmountField=o,e.ReceiveSelectors=d,e.BreakdownCard=c,e.Footer=l,e.Dialog=b})(y||={});export{y as WithdrawForm};
|
|
@@ -2,17 +2,19 @@ import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
|
2
2
|
|
|
3
3
|
//#region src/flows/withdraw/widgets/withdraw-form/compound/components/RecipientField.d.ts
|
|
4
4
|
/**
|
|
5
|
-
* Recipient address field — label + auto-growing textarea + trailing
|
|
5
|
+
* Recipient address field — label + auto-growing textarea + trailing prefill chip.
|
|
6
6
|
*
|
|
7
7
|
* The textarea wraps long hex addresses up to `maxBlockSize`, then scrolls. Single-line semantics
|
|
8
8
|
* are kept by stripping any `\r\n` in `onChange` — no `onKeyDown` Enter-blocker, since that would
|
|
9
9
|
* also swallow IME composition keys for CJK input. The stripping handler lives here (not in
|
|
10
10
|
* `InputGroup.Textarea`) so the kit primitive stays neutral on the single-vs-multi-line decision.
|
|
11
11
|
*
|
|
12
|
-
* The
|
|
13
|
-
* input.
|
|
14
|
-
*
|
|
15
|
-
*
|
|
12
|
+
* The chip is host-controlled via `suggestedRecipient` on `<WithdrawDialog>` (or the compound
|
|
13
|
+
* root prop). Clicking it fills the input. Hidden entirely when no suggestion is supplied. The
|
|
14
|
+
* chip's `aria-label` reads off the host-supplied `label` so screen readers describe which
|
|
15
|
+
* address is being prefilled; the visible text shows the truncated address so sighted users
|
|
16
|
+
* see "this is mine" recognition. The kit no longer auto-derives this from `wagmi.address` —
|
|
17
|
+
* that misled users on embedded-wallet integrations.
|
|
16
18
|
*/
|
|
17
19
|
declare function WithdrawFormRecipientField(): _$react_jsx_runtime0.JSX.Element;
|
|
18
20
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{useLingui as e}from"../../../../../../shared/i18n/useLingui.js";import"../../../../../../i18n/index.js";import{Field as t}from"../../../../../../shared/ui/Field/Field.js";import"../../../../../../shared/ui/Field/index.js";import{Image as n}from"../../../../../../shared/ui/Image/Image.js";import"../../../../../../shared/ui/Image/index.js";import{InputGroup as r}from"../../../../../../shared/ui/InputGroup/InputGroup.js";import"../../../../../../shared/ui/InputGroup/index.js";import{useWithdrawFormContext as i}from"../context.js";import{WITHDRAW_FORM_SLOTS as a}from"../WithdrawForm.slots.js";import{styles as o}from"../WithdrawForm.styles.js";import{useCallback as s,useId as c}from"react";import{jsx as l,jsxs as u}from"react/jsx-runtime";import*as d from"@stylexjs/stylex";function f(){let f=i(`WithdrawForm.RecipientField`),{_:m}=e(),h=m({id:`yy2rkt`,message:`0x…`}),g=m({id:`MZ_nQf`,message:`Recipient address`}),_=c(),{
|
|
1
|
+
"use client";import{useLingui as e}from"../../../../../../shared/i18n/useLingui.js";import"../../../../../../i18n/index.js";import{Field as t}from"../../../../../../shared/ui/Field/Field.js";import"../../../../../../shared/ui/Field/index.js";import{Image as n}from"../../../../../../shared/ui/Image/Image.js";import"../../../../../../shared/ui/Image/index.js";import{InputGroup as r}from"../../../../../../shared/ui/InputGroup/InputGroup.js";import"../../../../../../shared/ui/InputGroup/index.js";import{useWithdrawFormContext as i}from"../context.js";import{WITHDRAW_FORM_SLOTS as a}from"../WithdrawForm.slots.js";import{styles as o}from"../WithdrawForm.styles.js";import{useCallback as s,useId as c}from"react";import{jsx as l,jsxs as u}from"react/jsx-runtime";import*as d from"@stylexjs/stylex";function f(){let f=i(`WithdrawForm.RecipientField`),{_:m}=e(),h=m({id:`yy2rkt`,message:`0x…`}),g=m({id:`MZ_nQf`,message:`Recipient address`}),_=c(),{suggestedRecipient:v,onRecipientChange:y}=f,b=v?.address,x=v?.label?.trim()||m({id:`BhQhbU`,message:`Use suggested recipient address`}),S=s(e=>{y(e.target.value.replace(/[\r\n]+/g,``))},[y]),C=s(()=>{b&&y(b)},[b,y]),w=b?p(b):``;return u(t,{"data-stridge-slot":a.recipientField,children:[l(t.Label,{htmlFor:_,children:g}),u(r,{children:[l(r.Textarea,{id:_,"data-stridge-slot":a.recipientInput,rows:1,spellCheck:!1,autoComplete:`off`,autoCorrect:`off`,autoCapitalize:`off`,placeholder:h,value:f.recipientAddress,onChange:S,...d.props(o.recipientInputMono)}),b?l(r.Addon,{align:`inline-end`,children:u(`button`,{type:`button`,"data-stridge-slot":a.recipientPill,onClick:C,"aria-label":x,...d.props(o.pillBase,o.pillInteractive,o.recipientPill),children:[l(n,{size:`sm`,alt:m({id:`sb9Y58`,message:`Wallet`})}),l(`span`,{...d.props(o.recipientPillText),children:w})]})}):null]})]})}function p(e){return e.length<=10?e:`${e.slice(0,4)}…${e.slice(-4)}`}export{f as WithdrawFormRecipientField};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { DialogShellControls } from "../../../../../shared/dialog/DialogShell.js";
|
|
2
2
|
import { AssetDescriptor } from "../../../../../shared/widgets/asset-descriptor.js";
|
|
3
|
+
import { WithdrawSuggestedRecipient } from "../../../dialog/WithdrawDialogBindingsContext.js";
|
|
3
4
|
import { ComponentProps, ReactNode } from "react";
|
|
4
5
|
|
|
5
6
|
//#region src/flows/withdraw/widgets/withdraw-form/compound/types.d.ts
|
|
@@ -38,12 +39,14 @@ interface WithdrawFormProps {
|
|
|
38
39
|
/** Fired when the user types into the recipient field. */
|
|
39
40
|
onRecipientChange?: (next: string) => void;
|
|
40
41
|
/**
|
|
41
|
-
*
|
|
42
|
-
* {@link WithdrawForm.RecipientField}.
|
|
43
|
-
*
|
|
44
|
-
* the
|
|
42
|
+
* Host-supplied recipient suggestion surfaced as a prefill chip on
|
|
43
|
+
* {@link WithdrawForm.RecipientField}. Clicking the chip fills the recipient input via
|
|
44
|
+
* {@link WithdrawFormProps.onRecipientChange}. The chip's accessible name reads off
|
|
45
|
+
* `suggestedRecipient.label` so the user knows which address they are filling with. When
|
|
46
|
+
* omitted, no chip renders. See {@link WithdrawSuggestedRecipient} for the rationale —
|
|
47
|
+
* the kit no longer auto-derives this from `wagmi.address`.
|
|
45
48
|
*/
|
|
46
|
-
|
|
49
|
+
suggestedRecipient?: WithdrawSuggestedRecipient;
|
|
47
50
|
/** Current amount-field value, in display units, as a string (controlled). */
|
|
48
51
|
amount?: string;
|
|
49
52
|
/** Fired when the user types into the amount field. */
|
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."],"5joj8M":["تفاصيل المعاملة"],"60ahSE":["معاملة السحب"],"69Gavs":["Technical details"],"6D8qH6":["أرسل العملة المختارة على الشبكة المختارة إلى هذا العنوان. تظهر الأموال في حسابك بمجرد تأكيد الشبكة للتحويل."],"6RDwJM":["العملات"],"7Bj3x9":["فشل"],"7evBec":["وقت المعالجة: ",["resolvedProcessingTime"]],"88cUW-":["تستلم"],"
|
|
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":["تمت إضافة أموال إيداعك إلى حسابك."],"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":["تبديل المبلغ المعروض"],"HfPDJV":["إغلاق — سنُشعرك"],"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":["تم سحب أموالك بنجاح."],"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."],"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"],"
|
|
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."],"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"],"HfPDJV":["Cerrar — te notificaremos"],"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."],"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};
|