@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.
Files changed (58) hide show
  1. package/dist/KitProvider.js +1 -1
  2. package/dist/_internal/withdraw/driver/index.d.ts +2 -2
  3. package/dist/drivers/stridge/createStridgeDepositDriver.js +1 -1
  4. package/dist/drivers/stridge/createStridgeWithdrawDriver.d.ts +10 -12
  5. package/dist/drivers/stridge/createStridgeWithdrawDriver.js +1 -1
  6. package/dist/drivers/stridge/types.d.ts +7 -4
  7. package/dist/drivers/stridge-mock/createStridgeMockWithdrawDriver.d.ts +2 -2
  8. package/dist/drivers/stridge-mock/createStridgeMockWithdrawDriver.js +1 -1
  9. package/dist/flows/deposit/dialog/DepositDialog.js +1 -1
  10. package/dist/flows/deposit/orchestrator/controller.js +1 -1
  11. package/dist/flows/deposit/widgets/deposit/Deposit.js +1 -1
  12. package/dist/flows/deposit/widgets/transfer-crypto/compound/components/Address.js +1 -1
  13. package/dist/flows/deposit/widgets/transfer-crypto/compound/components/Disclosure.d.ts +2 -1
  14. package/dist/flows/deposit/widgets/transfer-crypto/compound/components/Disclosure.js +1 -1
  15. package/dist/flows/shared/transformers/pickRelevantSettlement.js +1 -1
  16. package/dist/flows/withdraw/dialog/WithdrawDialog.d.ts +57 -11
  17. package/dist/flows/withdraw/dialog/WithdrawDialog.js +1 -1
  18. package/dist/flows/withdraw/dialog/WithdrawDialogBindingsContext.d.ts +44 -0
  19. package/dist/flows/withdraw/dialog/WithdrawDialogBindingsContext.js +1 -0
  20. package/dist/flows/withdraw/driver/types.d.ts +53 -11
  21. package/dist/flows/withdraw/orchestrator/controller.js +1 -1
  22. package/dist/flows/withdraw/orchestrator/reducer.js +1 -1
  23. package/dist/flows/withdraw/orchestrator/types.d.ts +106 -31
  24. package/dist/flows/withdraw/widgets/withdraw-form/WithdrawForm.js +1 -1
  25. package/dist/flows/withdraw/widgets/withdraw-form/compound/WithdrawForm.js +1 -1
  26. package/dist/flows/withdraw/widgets/withdraw-form/compound/components/RecipientField.d.ts +7 -5
  27. package/dist/flows/withdraw/widgets/withdraw-form/compound/components/RecipientField.js +1 -1
  28. package/dist/flows/withdraw/widgets/withdraw-form/compound/types.d.ts +8 -5
  29. package/dist/i18n/locales/ar.js +1 -1
  30. package/dist/i18n/locales/es.js +1 -1
  31. package/dist/i18n/locales/source-keys.d.ts +1 -1
  32. package/dist/index.d.ts +2 -2
  33. package/dist/package.js +1 -1
  34. package/dist/shared/constants/brand-intercom.js +1 -0
  35. package/dist/shared/driver/types.d.ts +4 -3
  36. package/dist/shared/orchestrator/useSettlementWatcher.js +1 -1
  37. package/dist/shared/primitives/TxHashValue/TxHashValue.js +1 -1
  38. package/dist/shared/support/SupportLink.js +1 -0
  39. package/dist/shared/support/SupportSpinner.js +1 -0
  40. package/dist/shared/support/index.js +1 -0
  41. package/dist/shared/support/intercom-loader.js +1 -0
  42. package/dist/shared/support/useIntercomMerchantContext.js +1 -0
  43. package/dist/shared/support/useIntercomShutdownOnUnmount.js +1 -0
  44. package/dist/shared/support/useSupportTrigger.js +1 -0
  45. package/dist/shared/ui/Dialog/Dialog.js +1 -1
  46. package/dist/shared/ui/Select/Select.js +1 -1
  47. package/dist/shared/ui/WalletRow/WalletRow.js +1 -1
  48. package/dist/shared/widgets/confirm-transfer/compound/components/Disclaimer.js +1 -1
  49. package/dist/shared/widgets/error-state/compound/components/HelpInfo.js +1 -1
  50. package/dist/shared/widgets/success-state/compound/components/Actions.js +1 -1
  51. package/dist/stridge/StridgeProvider.d.ts +44 -3
  52. package/dist/stridge/StridgeProvider.js +1 -1
  53. package/dist/stridge/optionalWagmi.js +1 -0
  54. package/dist/stridge/stubs.js +1 -1
  55. package/dist/styles/index.css +4 -0
  56. package/dist/ui/index.js +1 -1
  57. package/dist/withdraw/dialog/index.d.ts +3 -1
  58. 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.submitWithdrawal}. Identical to {@link RequestWithdrawalQuoteInput}
61
- * — the live driver re-uses the most recent quote for submit, so the same identifying fields
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 SubmitWithdrawalInput = RequestWithdrawalQuoteInput;
64
+ type PrepareWithdrawalInput = RequestWithdrawalQuoteInput;
65
65
  /**
66
- * Input to {@link WithdrawDriver.watchSettlement}. Carries the broadcast tx ref so the watcher
67
- * can scope its poll to the in-flight withdraw.
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: TxRef;
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
- * Submits the confirmed withdrawal. Resolves with the broadcast tx ref. The settlement
117
- * watcher takes over from there to populate the `settlement` entity.
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
- submitWithdrawal(input: SubmitWithdrawalInput, signal: AbortSignal): Promise<TxRef>;
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 { RequestWithdrawalQuoteInput, SubmitWithdrawalInput, WatchWithdrawableBalancesInput, WatchWithdrawalSettlementInput, WithdrawDriver, WithdrawSnapshot };
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 o,reducer as s}from"./reducer.js";import{createContext as c,use as l,useCallback as u,useMemo as d,useReducer as f,useRef as p}from"react";import{jsx as m}from"react/jsx-runtime";const h={id:`ldK3jJ`,message:`Failed to submit withdrawal.`},g={id:`kUFhUv`,message:`Withdrawal failed.`},_=c(null);_.displayName=`WithdrawControllerContext`;function v(){let e=l(_);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 y(){return v().state}function b(){return v().effectiveState}function x(){return v().actions}function S({children:e}){let t=a(),[n,c]=f(s,o),l=w(n,c,t);i(t,n.name===`inProgress`?n.ctx.tx:void 0),T(n,c,t);let u=r(n),p=C(c,l);return m(_,{value:d(()=>({state:n,effectiveState:u,dispatch:c,controller:p,actions:l}),[n,u,p,l]),children:e})}function C(e,t){let n=u(()=>{e({type:`OPEN`})},[e]),r=u(()=>{e({type:`CLOSE`})},[e]);return d(()=>({open:n,close:r,actions:t}),[n,r,t])}function w(n,r,i){let a=p(n);a.current=n;let o=p(i);o.current=i;let s=p(r);s.current=r;let{i18n:c}=e(),l=p(c);l.current=c;let f=u(e=>{let n=o.current;s.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};n.submitWithdrawal(i,r.signal).then(e=>{r.signal.aborted||s.current({type:`SUBMIT_CONFIRMED`,tx:e})}).catch(n=>{r.signal.aborted||s.current({type:`SUBMIT_FAILED`,failure:t(n,l.current._(h)),input:e})})},[]),m=u(()=>{s.current({type:`CLOSE`})},[]),g=u(()=>{s.current({type:`RESET`})},[]),_=u(()=>{s.current({type:`CLEAR_NOTICE`})},[]);return d(()=>({submit:f,close:m,reset:g,clearNotice:_}),[f,m,g,_])}function T(t,r,i){let a=p(t);a.current=t;let{i18n:o}=e(),s=p(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._(g),code:n.failureKind}:void 0;r({type:`SETTLEMENT_FAILED`,...i?{failure:i}:{}})}}})}export{S as WithdrawControllerProvider,v as useControllerContext,x as useWithdrawActions,b as useWithdrawEffectiveState,y as useWithdrawState};
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`SUBMIT_CONFIRMED`:return{name:`inProgress`,ctx:{input:t.ctx.input,tx:n.tx}};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`SETTLEMENT_SUCCEEDED`:return{name:`success`,ctx:{input:e.ctx.input,tx:e.ctx.tx}};case`SETTLEMENT_FAILED`:return{name:`error`,ctx:{input:e.ctx.input,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
+ 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` narrows
26
- * what data is available — illegal states (e.g. `inProgress` without a tx ref) are
27
- * unrepresentable.
27
+ * State machine state for the orchestrated withdraw dialog. Per-state discriminated `ctx`
28
+ * narrows what data is available.
28
29
  *
29
- * The reducer carries navigation intent only — entity-derived data (quote payload, settlement
30
- * payload, balances) lives on the driver and is read directly by widgets.
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. Currently set when the user
38
- * declines the wallet signature: the FSM lands the user back on the form (preserving
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
- tx: TxRef;
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: TxRef;
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 (currently
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: "SUBMIT_CONFIRMED";
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 through the driver. Dispatches `SUBMIT` synchronously (so the form
138
- * flips to the loading-button state) and then `SUBMIT_CONFIRMED` / `SUBMIT_FAILED` based on
139
- * the driver's `submitWithdrawal` resolution.
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 (typically the post-rejection "Signature declined." hint).
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 i,useWithdrawEffectiveState as ee}from"../../orchestrator/controller.js";import{parseAmountInputValue as a}from"../../../../shared/ui/AmountInput/utils.js";import"../../../../shared/ui/AmountInput/index.js";import{toAssetDescriptor as o}from"../../../../shared/widgets/asset-descriptor.js";import{useQuoteCountdown as te}from"../../../../shared/quote/useQuoteCountdown.js";import"../../../../shared/quote/index.js";import{WithdrawForm as s}from"./compound/WithdrawForm.js";import"./compound/index.js";import{useWithdrawDialogEvents as ne}from"../../dialog/WithdrawDialogEventsContext.js";import{isValidEvmAddress as re,resolveSubmitLabel as ie}from"./validation.js";import{useCallback as c,useEffect as l,useMemo as u,useRef as d,useState as f}from"react";import{jsx as p,jsxs as ae}from"react/jsx-runtime";import{useAccount as oe}from"wagmi";function m({events:m}){let h=r(),g=n(),_=ee(),v=i(),{_:y}=t(),b=ne(),se=u(()=>({...b,...m??{}}),[b,m]),x=d(se);x.current=se;let{address:ce}=oe(),le=ce??``,[S,ue]=f(``),[de,fe]=f(``),C=_.name===`submitting`,w=_.name===`form`?_.ctx?.notice:void 0,T=d(w);T.current=w;let E=h.withdrawableBalances.status===`ready`||h.withdrawableBalances.status===`stale`?h.withdrawableBalances.payload[0]:void 0,D=u(()=>o(E)??{symbol:`USDC`},[E]),pe=u(()=>o(E?{symbol:E.networkName,eip155Id:E.eip155Id,isNative:!0,logoUrl:E.chainLogoUrl}:void 0)??{symbol:`BSC`},[E]),me=E?{amount:E.amount.formatted,symbol:E.symbol}:void 0,O=h.receiveOptions.status===`ready`||h.receiveOptions.status===`stale`?h.receiveOptions.payload:[],k=E?.eip155Id?Number(E.eip155Id):void 0,A=E?.symbol??D.symbol,j=u(()=>{let e=new Map;for(let t of O)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},[O]),M=u(()=>{if(j.size===0)return;let e=A.toUpperCase();return j.has(e)?e:j.keys().next().value},[j,A]),N=c(e=>{let t=j.get(e);if(!(!t||t.length===0))return(k===void 0?void 0:t.find(e=>e.chain.eip155Id===k))??t[0]},[j,k]),[P,F]=f(void 0),[I,L]=f(void 0);l(()=>{if(I||!M)return;let e=N(M);e&&(F(e.chain),L(e.token))},[M,N,I]);let R=c(()=>{T.current&&v.clearNotice()},[v]),he=c(e=>{R(),ue(e),x.current.onRecipientChanged?.(e)},[R]),z=e().locale,B=c(e=>{R(),fe(e);let t=a(e,z);x.current.onAmountChanged?.({raw:e,numeric:t})},[R,z]),V=c(e=>{R();let t=e.symbol.toUpperCase(),n=j.get(t)?.find(e=>e.chain.eip155Id===P?.eip155Id)??N(t);n&&(F(n.chain),L(n.token),x.current.onReceiveTokenChanged?.(n.token),n.chain.eip155Id!==P?.eip155Id&&x.current.onReceiveChainChanged?.(n.chain))},[R,j,N,P?.eip155Id]),ge=c(e=>{R(),F(e);let t=I?.symbol.toUpperCase(),n=(t?e.tokens.find(e=>e.symbol.toUpperCase()===t):void 0)??e.tokens[0];n&&L(n),x.current.onReceiveChainChanged?.(e),n&&n.symbol!==I?.symbol&&x.current.onReceiveTokenChanged?.(n)},[R,I?.symbol]),H=a(de,z),U=H!==null&&H>0,_e=S.trim(),ve=_e.length>0,W=re(_e),G=P!==void 0&&I!==void 0,K=U&&E!==void 0&&H>E.amount.value,[q,ye]=f(null),J=(h.quote.status===`ready`||h.quote.status===`stale`)&&ve&&U&&G&&q!==null&&q.recipient===S&&q.amount===H&&q.receiveChainId===P.eip155Id&&q.receiveSymbol===I.symbol?h.quote.payload:void 0,be=u(()=>j.size===0?[D]:[...j.values()].map(e=>{let t=e[0];return o({symbol:t.token.symbol,eip155Id:t.chain.eip155Id,address:t.token.address,isNative:t.token.isNative,logoUrl:t.token.assetLogoUrl})??{symbol:t.token.symbol}}),[j,D]),xe=u(()=>{let e=I?.symbol.toUpperCase(),t=e?j.get(e):void 0;return(t?t.map(e=>e.chain):O).map(e=>o({symbol:e.networkName,eip155Id:e.eip155Id,isNative:!0,logoUrl:e.chainLogoUrl})??{symbol:e.networkName})},[I?.symbol,j,O]),Se=I?o({symbol:I.symbol,eip155Id:P?.eip155Id,address:I.address,isNative:I.isNative,logoUrl:I.assetLogoUrl}):D,Ce=P?o({symbol:P.networkName,eip155Id:P.eip155Id,isNative:!0,logoUrl:P.chainLogoUrl}):pe,we=u(()=>{if(J?.breakdown)return{route:J.breakdown.selectedRoute?.label,networkCost:J.breakdown.networkCost?.formatted,priceImpact:J.breakdown.priceImpact?.formatted}},[J]),Te=u(()=>{if(U)return J?.receiveAmountUsd?J.receiveAmountUsd.formatted:`$${H.toFixed(2)}`},[H,U,J]),Ee=J&&U?J.receiveAmount.formatted:void 0,De=J?.receiveAmountUsd?.formatted,Y=W&&U&&!K&&G&&J===void 0&&h.quote.status!==`error`,X=W&&U&&!K&&G&&J!==void 0,Oe=te({expiresAt:J?.expiresAt,enabled:X}),ke=X&&J?J.quoteTotalSeconds:void 0,[Z,Q]=f(!1);l(()=>{Q(!1)},[S,H,P?.eip155Id,I?.symbol,_.name]),l(()=>{if(!X||!J||_.name!==`form`||Z)return;let e=Math.max(0,J.expiresAt-Date.now()),t=setTimeout(()=>{Q(!0)},e);return()=>clearTimeout(t)},[X,J,_.name,Z]),l(()=>{if(!Z||_.name!==`form`||k===void 0||!P||!I||!W||!U||K)return;let e=new AbortController,t={recipient:S,amount:H??0,receiveChainId:P.eip155Id,receiveSymbol:I.symbol},n={sourceAssetSymbol:A,sourceChainId:k,amount:H??0,receiveTokenSymbol:I.symbol,receiveChainId:P.eip155Id,recipientAddress:S};return x.current.onQuoteRequested?.(n),g.requestQuote(n,e.signal).then(()=>{e.signal.aborted||ye(t)}).catch(()=>{}).finally(()=>{e.signal.aborted||Q(!1)}),()=>e.abort()},[Z,g,S,H,W,U,K,k,A,P,I,_.name]);let $=!W||!U||K||!G||Y||Z,Ae=ie({enterRecipientAddress:y({id:`nr03QI`,message:`Enter Recipient Address`}),enterValidRecipientAddress:y({id:`GZPxmc`,message:`Enter Valid Recipient Address`}),enterAmount:y({id:`yH9V_J`,message:`Enter Amount`}),insufficientBalance:y({id:`N2DUxS`,message:`Insufficient Balance`}),regeneratingQuote:y({id:`Ly6geA`,message:`Regenerating quote…`}),estimatingQuote:y({id:`Uevt3L`,message:`Estimating quote`})},{isRecipientFilled:ve,isRecipientValid:W,isAmountValid:U,exceedsBalance:K,quoteEstimating:Y,quoteRegenerating:Z}),je=d(null);l(()=>{if(je.current?.abort(),!W||!U||K||!G||_.name!==`form`||k===void 0)return;let e=new AbortController;je.current=e;let t={recipient:S,amount:H,receiveChainId:P.eip155Id,receiveSymbol:I.symbol},n=setTimeout(()=>{let n={sourceAssetSymbol:A,sourceChainId:k,amount:H,receiveTokenSymbol:I.symbol,receiveChainId:P.eip155Id,recipientAddress:S};x.current.onQuoteRequested?.(n),g.requestQuote(n,e.signal).then(()=>{e.signal.aborted||ye(t)}).catch(()=>{})},400);return()=>{clearTimeout(n),e.abort()}},[g,S,H,W,U,K,G,k,A,P?.eip155Id,I?.symbol,_.name]);let Me=c(()=>{E&&B(E.amount.formatted)},[E,B]),Ne=c(()=>{C||$||k===void 0||!P||!I||v.submit({sourceAssetSymbol:A,sourceChainId:k,amount:H??0,recipientAddress:S,receiveTokenSymbol:I.symbol,receiveChainId:P.eip155Id})},[v,H,k,A,P,I,S,$,C]),Pe=c(e=>{let t=O.find(t=>String(t.eip155Id)===String(e.chainId));t&&ge(t)},[ge,O]),Fe=c(e=>{let t=e.symbol.toUpperCase(),n=j.get(t);!n||n.length===0||V((n.find(e=>e.chain.eip155Id===P?.eip155Id)??n[0]).token)},[V,j,P?.eip155Id]);return _.name!==`form`&&_.name!==`submitting`?null:ae(s,{recipientAddress:S,onRecipientChange:he,connectedAddress:le,amount:de,onAmountChange:B,onAmountMax:Me,sourceAsset:D,sourceChain:pe,receiveAsset:Se,receiveChain:Ce,receiveAssetOptions:be,onReceiveAssetChange:Fe,receiveChainOptions:xe,onReceiveChainChange:Pe,balance:me,amountUsd:Te,receiveAmount:Ee,receiveAmountUsd:De,breakdown:we,quoteEstimating:Y,quoteRegenerating:Z,...Oe===void 0?{}:{quoteSeconds:Oe},...ke===void 0?{}:{quoteTotalSeconds:ke},submitting:C,submitDisabled:$,submitLabel:Ae,...w?{notice:w}:{},onSubmit:Ne,children:[p(s.Header,{}),ae(s.Body,{children:[p(s.RecipientField,{}),p(s.AmountField,{}),p(s.ReceiveSelectors,{}),p(s.BreakdownCard,{})]}),p(s.Footer,{})]})}export{m as WithdrawForm};
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,connectedAddress: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,connectedAddress: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};
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 wallet pill.
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 pill becomes an interactive button when `connectedAddress` is set; clicking it fills the
13
- * input. Omitted entirely when `connectedAddress` is absent. The pill renders the truncated
14
- * address (`0x70…79C8`) the user recognizes their own address, making the action self-evident
15
- * while keeping pill width deterministic across locales.
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(),{connectedAddress:v,onRecipientChange:y}=f,b=s(e=>{y(e.target.value.replace(/[\r\n]+/g,``))},[y]),x=s(()=>{v&&y(v)},[v,y]),S=v?p(v):``;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:b,...d.props(o.recipientInputMono)}),v?l(r.Addon,{align:`inline-end`,children:u(`button`,{type:`button`,"data-stridge-slot":a.recipientPill,onClick:x,"aria-label":m({id:`8Fcmiu`,message:`Use connected wallet address`}),...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:S})]})}):null]})]})}function p(e){return e.length<=10?e:`${e.slice(0,4)}…${e.slice(-4)}`}export{f as WithdrawFormRecipientField};
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
- * Connected-wallet address surfaced behind the trailing "Use connected" pill in
42
- * {@link WithdrawForm.RecipientField}. When provided, clicking the pill fills the recipient
43
- * input with this address (via {@link WithdrawFormProps.onRecipientChange}). When omitted,
44
- * the pill renders as a static decorative chip.
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
- connectedAddress?: string;
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. */
@@ -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-":["تستلم"],"8Fcmiu":["استخدم عنوان المحفظة المتصلة"],"9JHY2T":["تمت إضافة أموال إيداعك إلى حسابك."],"9cCjMJ":["إيداع الحد الأقصى من الرصيد"],"< 1 min":["< دقيقة"],"AO44G_":["عرض الإيصال"],"AOPSKq":["إيداع ",["0"]],"AWtGgd":["احصل على المساعدة"],"AeXO77":["حساب"],"AeZIvT":["ستستلم"],"AikETk":["الحد الأدنى ",["minDeposit"]],"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};
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};
@@ -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"],"8Fcmiu":["Usar la dirección de la billetera conectada"],"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"]],"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};
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};