@orbs-network/spot-react 2.1.0 → 2.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +71 -53
- package/dist/spot-react/src/context/{spot-store.d.ts → create-spot-store.d.ts} +8 -41
- package/dist/spot-react/src/context/create-spot-store.d.ts.map +1 -0
- package/dist/spot-react/src/context/order-form-context.d.ts.map +1 -1
- package/dist/spot-react/src/context/spot-form-synchronizer.d.ts +1 -1
- package/dist/spot-react/src/context/spot-form-synchronizer.d.ts.map +1 -1
- package/dist/spot-react/src/context/spot-provider.d.ts.map +1 -1
- package/dist/spot-react/src/context/spot-runtime-context.d.ts +33 -0
- package/dist/spot-react/src/context/spot-runtime-context.d.ts.map +1 -0
- package/dist/spot-react/src/context/spot-store-context.d.ts +10 -0
- package/dist/spot-react/src/context/spot-store-context.d.ts.map +1 -0
- package/dist/spot-react/src/context/use-client.d.ts.map +1 -1
- package/dist/spot-react/src/context/use-spot-provider-state.d.ts +2 -1
- package/dist/spot-react/src/context/use-spot-provider-state.d.ts.map +1 -1
- package/dist/spot-react/src/execute-order.d.ts +1 -0
- package/dist/spot-react/src/execute-order.d.ts.map +1 -1
- package/dist/spot-react/src/execution-state.d.ts +2 -2
- package/dist/spot-react/src/hooks/helper-hooks.d.ts +0 -2
- package/dist/spot-react/src/hooks/helper-hooks.d.ts.map +1 -1
- package/dist/spot-react/src/hooks/order-hooks.d.ts.map +1 -1
- package/dist/spot-react/src/hooks/use-cancel-order.d.ts +1 -0
- package/dist/spot-react/src/hooks/use-cancel-order.d.ts.map +1 -1
- package/dist/spot-react/src/hooks/use-duration.d.ts +1 -1
- package/dist/spot-react/src/hooks/use-duration.d.ts.map +1 -1
- package/dist/spot-react/src/hooks/use-execution.d.ts.map +1 -1
- package/dist/spot-react/src/hooks/use-fill-delay.d.ts +1 -1
- package/dist/spot-react/src/hooks/use-fill-delay.d.ts.map +1 -1
- package/dist/spot-react/src/hooks/use-history-order.d.ts +0 -1
- package/dist/spot-react/src/hooks/use-history-order.d.ts.map +1 -1
- package/dist/spot-react/src/hooks/use-limit-price.d.ts.map +1 -1
- package/dist/spot-react/src/hooks/use-price-display.d.ts.map +1 -1
- package/dist/spot-react/src/hooks/use-submit-order.d.ts.map +1 -1
- package/dist/spot-react/src/hooks/use-trades.d.ts.map +1 -1
- package/dist/spot-react/src/hooks/use-trigger-price.d.ts.map +1 -1
- package/dist/spot-react/src/index.d.ts +2 -2
- package/dist/spot-react/src/index.d.ts.map +1 -1
- package/dist/spot-react/src/types.d.ts +29 -28
- package/dist/spot-react/src/types.d.ts.map +1 -1
- package/dist/spot-react.js +828 -843
- package/dist/spot-react.umd.cjs +1 -1
- package/package.json +2 -2
- package/dist/spot-react/src/context/spot-store.d.ts.map +0 -1
package/README.md
CHANGED
|
@@ -49,8 +49,8 @@ If migrating from `@orbs-network/twap-ui`, remove it before installing the packa
|
|
|
49
49
|
Version 2 is a deliberately breaking, headless API. Replace the broad `useSpot`
|
|
50
50
|
and `useSwapExecution` interfaces with focused hooks such as `useOrderForm`,
|
|
51
51
|
`useExecution`, `useSubmitButton`, and `useOrders`. Provider values now use
|
|
52
|
-
`input`/`output` terminology (`inputToken`, `outputToken`, `
|
|
53
|
-
`minTradeSizeUsd`), and the host supplies wallet operations through
|
|
52
|
+
`input`/`output` terminology (`inputToken`, `outputToken`, `inputBalanceRaw`,
|
|
53
|
+
and `minTradeSizeUsd`), and the host supplies wallet operations through
|
|
54
54
|
`walletInteractions`. Debug query parameters and the `isDev` option are no
|
|
55
55
|
longer supported.
|
|
56
56
|
|
|
@@ -79,6 +79,7 @@ Keep the DEX swap form as the source of truth. Pass the following adapted values
|
|
|
79
79
|
| Value | Expected shape |
|
|
80
80
|
| --- | --- |
|
|
81
81
|
| Selected tokens | `Token` objects with `address`, `symbol`, `decimals`, and optional `logoUrl` |
|
|
82
|
+
| Wrapped native token | The connected chain's wrapped-native `Token`, supplied by the DEX |
|
|
82
83
|
| Typed source amount | User-facing decimal string, for example `"1.25"` |
|
|
83
84
|
| Quote output | Raw destination-token amount for the current typed input |
|
|
84
85
|
| Input balance | Raw integer string |
|
|
@@ -87,7 +88,7 @@ Keep the DEX swap form as the source of truth. Pass the following adapted values
|
|
|
87
88
|
|
|
88
89
|
If several Spot components need the same DEX-owned values, expose a small DEX adapter context. Do not copy the swap state into a parallel Spot store, prop-drill long value lists, or create a hook whose only purpose is forwarding props to `SpotProvider`.
|
|
89
90
|
|
|
90
|
-
Memoize objects with `useMemo` and functions with `useCallback`. In particular, keep stable identities for tokens, `
|
|
91
|
+
Memoize objects with `useMemo` and functions with `useCallback`. In particular, keep stable identities for selected tokens, `wrappedNativeToken`, `marketQuote`, `walletInteractions`, and `callbacks`.
|
|
91
92
|
|
|
92
93
|
## Provider Setup
|
|
93
94
|
|
|
@@ -99,7 +100,7 @@ import {
|
|
|
99
100
|
Partners,
|
|
100
101
|
SpotProvider,
|
|
101
102
|
type Callbacks,
|
|
102
|
-
type
|
|
103
|
+
type MarketQuote,
|
|
103
104
|
type Token,
|
|
104
105
|
type WalletInteractions,
|
|
105
106
|
} from "@orbs-network/spot-react";
|
|
@@ -126,13 +127,14 @@ function SpotOrderForm({ module }: { module: Module }) {
|
|
|
126
127
|
chainId,
|
|
127
128
|
inputCurrency,
|
|
128
129
|
outputCurrency,
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
130
|
+
wrappedNativeCurrency,
|
|
131
|
+
inputBalanceRaw,
|
|
132
|
+
inputAmountUi,
|
|
133
|
+
quotedInputAmountUi,
|
|
134
|
+
quotedOutputAmountRaw,
|
|
133
135
|
isQuoteLoading,
|
|
134
|
-
|
|
135
|
-
|
|
136
|
+
inputTokenUsdPrice,
|
|
137
|
+
outputTokenUsdPrice,
|
|
136
138
|
refetchBalances,
|
|
137
139
|
dexWallet,
|
|
138
140
|
} = useDexSpotAdapter();
|
|
@@ -157,26 +159,38 @@ function SpotOrderForm({ module }: { module: Module }) {
|
|
|
157
159
|
};
|
|
158
160
|
}, [outputCurrency]);
|
|
159
161
|
|
|
160
|
-
const
|
|
162
|
+
const wrappedNativeToken = useMemo<Token | undefined>(() => {
|
|
163
|
+
if (!wrappedNativeCurrency) return undefined;
|
|
164
|
+
return {
|
|
165
|
+
address: wrappedNativeCurrency.address,
|
|
166
|
+
symbol: wrappedNativeCurrency.symbol,
|
|
167
|
+
decimals: wrappedNativeCurrency.decimals,
|
|
168
|
+
logoUrl: wrappedNativeCurrency.logoUrl,
|
|
169
|
+
};
|
|
170
|
+
}, [wrappedNativeCurrency]);
|
|
171
|
+
|
|
172
|
+
const marketQuote = useMemo<MarketQuote>(() => {
|
|
161
173
|
const shouldQuote = Boolean(
|
|
162
|
-
|
|
174
|
+
inputAmountUi && inputCurrency && outputCurrency,
|
|
163
175
|
);
|
|
164
|
-
const isStale = shouldQuote &&
|
|
165
|
-
const
|
|
176
|
+
const isStale = shouldQuote && inputAmountUi !== quotedInputAmountUi;
|
|
177
|
+
const currentQuotedOutputAmountRaw =
|
|
178
|
+
!shouldQuote || isStale ? undefined : quotedOutputAmountRaw;
|
|
166
179
|
const isLoading = shouldQuote && (isStale || isQuoteLoading);
|
|
167
180
|
|
|
168
181
|
return {
|
|
169
|
-
|
|
182
|
+
quotedOutputAmountRaw: currentQuotedOutputAmountRaw,
|
|
170
183
|
isLoading,
|
|
171
|
-
noLiquidity:
|
|
184
|
+
noLiquidity:
|
|
185
|
+
shouldQuote && !isLoading && !currentQuotedOutputAmountRaw,
|
|
172
186
|
};
|
|
173
187
|
}, [
|
|
174
188
|
inputCurrency,
|
|
175
189
|
isQuoteLoading,
|
|
176
190
|
outputCurrency,
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
191
|
+
quotedOutputAmountRaw,
|
|
192
|
+
quotedInputAmountUi,
|
|
193
|
+
inputAmountUi,
|
|
180
194
|
]);
|
|
181
195
|
|
|
182
196
|
const walletInteractions = useMemo<WalletInteractions>(
|
|
@@ -199,18 +213,19 @@ function SpotOrderForm({ module }: { module: Module }) {
|
|
|
199
213
|
<SpotProvider
|
|
200
214
|
partner={Partners.Quick}
|
|
201
215
|
module={module}
|
|
202
|
-
|
|
203
|
-
|
|
216
|
+
inputAmountUi={inputAmountUi}
|
|
217
|
+
priceProtectionPercent={3}
|
|
204
218
|
minTradeSizeUsd={5}
|
|
205
|
-
|
|
219
|
+
marketQuote={marketQuote}
|
|
206
220
|
walletInteractions={walletInteractions}
|
|
207
221
|
chainId={chainId}
|
|
208
222
|
account={account}
|
|
209
223
|
inputToken={inputToken}
|
|
210
224
|
outputToken={outputToken}
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
225
|
+
wrappedNativeToken={wrappedNativeToken}
|
|
226
|
+
inputBalanceRaw={inputBalanceRaw}
|
|
227
|
+
inputTokenUsdPrice={inputTokenUsdPrice}
|
|
228
|
+
outputTokenUsdPrice={outputTokenUsdPrice}
|
|
214
229
|
callbacks={callbacks}
|
|
215
230
|
clientErrorFallback={ClientErrorFallback}
|
|
216
231
|
appId="my-dex"
|
|
@@ -222,7 +237,14 @@ function SpotOrderForm({ module }: { module: Module }) {
|
|
|
222
237
|
}
|
|
223
238
|
```
|
|
224
239
|
|
|
225
|
-
`
|
|
240
|
+
`marketQuote.quotedOutputAmountRaw` is the DEX quote's raw output amount for the current `inputAmountUi`, not a standalone per-token price. If the quote belongs to an older input or token pair, omit `quotedOutputAmountRaw` and report `isLoading: true` until a current quote arrives.
|
|
241
|
+
|
|
242
|
+
`spot-react` has no network registry. Always pass the `wrappedNativeToken` prop
|
|
243
|
+
from the DEX's own chain configuration; its value may be `undefined` only until
|
|
244
|
+
a chain is known. It is used for native/wrapped pair detection, allowance checks,
|
|
245
|
+
approval, and order preparation. Explorer links are also host-owned; callbacks
|
|
246
|
+
and history values expose transaction hashes so the DEX can format links with
|
|
247
|
+
its existing chain metadata.
|
|
226
248
|
|
|
227
249
|
Use the connected wallet chain as the source of truth. When it is absent or unsupported, the provider does not initialize a client and submission stays disabled. The DEX submit area should show its connect-wallet or switch-network control.
|
|
228
250
|
|
|
@@ -232,32 +254,36 @@ Use the connected wallet chain as the source of truth. When it is absent or unsu
|
|
|
232
254
|
| --- | --- | --- | --- |
|
|
233
255
|
| `partner` | `Partners` | Yes | DEX partner enum |
|
|
234
256
|
| `module` | `Module` | Yes | `TWAP`, `LIMIT`, `STOP_LOSS`, or `TAKE_PROFIT` |
|
|
235
|
-
| `
|
|
236
|
-
| `
|
|
257
|
+
| `inputAmountUi` | `string` | Yes | User-entered input-token amount |
|
|
258
|
+
| `priceProtectionPercent` | `number` | Yes | Price Protection percentage; this is not swap slippage |
|
|
237
259
|
| `minTradeSizeUsd` | `number` | Yes | Minimum individual trade size in USD |
|
|
238
|
-
| `
|
|
260
|
+
| `marketQuote` | `MarketQuote` | Yes | `{ quotedOutputAmountRaw?, isLoading?, noLiquidity? }` for the current DEX quote |
|
|
239
261
|
| `walletInteractions` | `WalletInteractions` | Yes | Five wallet methods implemented by the DEX |
|
|
240
262
|
| `chainId` | `number` | No | Connected wallet chain ID |
|
|
241
263
|
| `account` | `Address` | No | Connected wallet address |
|
|
242
264
|
| `appId` | `string` | No | Stable host-defined analytics identifier (for example the DEX slug) |
|
|
243
265
|
| `inputToken` | `Token` | No | Input token metadata |
|
|
244
266
|
| `outputToken` | `Token` | No | Output token metadata |
|
|
245
|
-
| `
|
|
246
|
-
| `
|
|
247
|
-
| `
|
|
267
|
+
| `wrappedNativeToken` | `Token \| undefined` | Yes | Host-provided wrapped-native token; pass `undefined` only before a chain is known |
|
|
268
|
+
| `inputBalanceRaw` | `string \| undefined` | Yes | Raw input-token balance; pass `undefined` while disconnected or loading |
|
|
269
|
+
| `inputTokenUsdPrice` | `string \| undefined` | Yes | USD value of one whole input token; pass `undefined` while loading |
|
|
270
|
+
| `outputTokenUsdPrice` | `string` | No | USD value of one whole output token |
|
|
248
271
|
| `callbacks` | `Callbacks` | No | Lifecycle and field-change callbacks |
|
|
249
272
|
| `displayFeePercent` | `number` | No | Display-only fee estimate percentage; does not collect or subtract fees |
|
|
250
273
|
| `supportLegacyOrders` | `boolean` | No | Include supported legacy v1 orders in history |
|
|
251
274
|
| `clientErrorFallback` | `ComponentType<ClientErrorFallbackProps>` | No | Host-rendered client initialization error UI with `error`, `retry`, and `isRetrying` |
|
|
252
275
|
| `errorFallback` | `ComponentType<SpotErrorFallbackProps>` | No | Host-rendered fallback for unexpected calculation or rendering errors |
|
|
253
276
|
|
|
254
|
-
|
|
277
|
+
`inputBalanceRaw` and `inputTokenUsdPrice` are required provider props; pass
|
|
278
|
+
`undefined` only while their values are genuinely unavailable. The output-token
|
|
279
|
+
USD price remains optional because it is used for display details rather than
|
|
280
|
+
submission readiness.
|
|
255
281
|
|
|
256
282
|
`minTradeSizeUsd` must be a positive USD threshold approved for the partner;
|
|
257
|
-
there is intentionally no SDK default. `
|
|
258
|
-
`3` means 3% (300 bps). `displayFeePercent` only populates `form.fees`
|
|
259
|
-
review UI. Protocol fee collection is configured separately by the
|
|
260
|
-
backend.
|
|
283
|
+
there is intentionally no SDK default. `priceProtectionPercent` uses percentage
|
|
284
|
+
units, so `3` means 3% (300 bps). `displayFeePercent` only populates `form.fees`
|
|
285
|
+
for the review UI. Protocol fee collection is configured separately by the
|
|
286
|
+
partner and backend.
|
|
261
287
|
|
|
262
288
|
## WalletInteractions
|
|
263
289
|
|
|
@@ -355,8 +381,6 @@ const history = useOrders();
|
|
|
355
381
|
| `useCancelOrder()` | Per-order cancellation state and action |
|
|
356
382
|
| `useClient()` | Provider-scoped initialized client state |
|
|
357
383
|
| `useAmountUi()` | Raw-token amount formatting |
|
|
358
|
-
| `useExplorerLink()` | Chain explorer transaction URL |
|
|
359
|
-
| `useNetwork()` | Current or specified network metadata |
|
|
360
384
|
|
|
361
385
|
Child components should call the relevant focused hook themselves instead of receiving hook-returned panels through intermediate props. `useOrders()` activates order-history fetching while an orders consumer is mounted; form-only integrations do not fetch or poll history.
|
|
362
386
|
|
|
@@ -364,7 +388,7 @@ Keep the submit button disabled while `loading` is true. If client initializatio
|
|
|
364
388
|
|
|
365
389
|
### Trade-count validation behavior
|
|
366
390
|
|
|
367
|
-
An explicitly selected TWAP trade count persists when `
|
|
391
|
+
An explicitly selected TWAP trade count persists when `inputAmountUi` changes. If lowering the amount makes that count greater than the newly calculated `maxTrades`, Spot does not clamp or reset it: `useTrades().error` and `useInputErrors()` report `InputErrors.MAX_TRADES`, and submission remains disabled until the user selects a valid count. This is an intentional behavior change from integrations that silently reset the trade count on every amount edit. Hosts should render the returned validation error so the user can correct the value.
|
|
368
392
|
|
|
369
393
|
### Panel Visibility
|
|
370
394
|
|
|
@@ -488,9 +512,9 @@ Callbacks cover wallet notifications, analytics, field synchronization, and bala
|
|
|
488
512
|
```tsx
|
|
489
513
|
const callbacks: Callbacks = {
|
|
490
514
|
onWrapRequest: () => {},
|
|
491
|
-
onWrapSuccess: ({ txHash,
|
|
515
|
+
onWrapSuccess: ({ txHash, amount }) => {},
|
|
492
516
|
onApproveRequest: () => {},
|
|
493
|
-
onApproveSuccess: ({ txHash,
|
|
517
|
+
onApproveSuccess: ({ txHash, token, amount }) => {},
|
|
494
518
|
onSignOrderRequest: () => {},
|
|
495
519
|
onSignOrderSuccess: (signature) => {},
|
|
496
520
|
onSignOrderError: (error) => {},
|
|
@@ -500,16 +524,16 @@ const callbacks: Callbacks = {
|
|
|
500
524
|
onSubmitOrderFailed: ({ code, message }) => {},
|
|
501
525
|
onSubmitOrderRejected: () => {},
|
|
502
526
|
onCancelOrderRequest: (order) => {},
|
|
503
|
-
onCancelOrderSuccess: ({ order, txHash
|
|
527
|
+
onCancelOrderSuccess: ({ order, txHash }) => {},
|
|
504
528
|
onCancelOrderFailed: (error) => {},
|
|
505
529
|
onCopy: () => {},
|
|
506
530
|
onLimitPriceChange: (price) => {},
|
|
507
531
|
onLimitPricePercentChange: (percent) => {},
|
|
508
532
|
onTriggerPriceChange: (price) => {},
|
|
509
533
|
onTriggerPricePercentChange: (percent) => {},
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
534
|
+
onOrderDurationChange: (orderDuration) => {},
|
|
535
|
+
onTradeIntervalChange: (tradeInterval) => {},
|
|
536
|
+
onTradeCountChange: (tradeCount) => {},
|
|
513
537
|
};
|
|
514
538
|
```
|
|
515
539
|
|
|
@@ -582,14 +606,10 @@ Input errors have the shape `{ type, args }`. Resolve `type` through the DEX's i
|
|
|
582
606
|
import {
|
|
583
607
|
useAmountUi,
|
|
584
608
|
useClient,
|
|
585
|
-
useExplorerLink,
|
|
586
|
-
useNetwork,
|
|
587
609
|
} from "@orbs-network/spot-react";
|
|
588
610
|
|
|
589
611
|
useAmountUi(decimals, rawAmount);
|
|
590
612
|
useClient();
|
|
591
|
-
useExplorerLink(txHash, chainId);
|
|
592
|
-
useNetwork(chainId);
|
|
593
613
|
```
|
|
594
614
|
|
|
595
615
|
Submit through `useExecution()`. Internal mutations and execution-store hooks
|
|
@@ -603,7 +623,6 @@ Public utilities and constants include:
|
|
|
603
623
|
|
|
604
624
|
```tsx
|
|
605
625
|
import {
|
|
606
|
-
getNetwork,
|
|
607
626
|
getOrderExecutionRate,
|
|
608
627
|
getOrderFillDelayMillis,
|
|
609
628
|
getOrderLimitPriceRate,
|
|
@@ -611,7 +630,7 @@ import {
|
|
|
611
630
|
getPartners,
|
|
612
631
|
getTwapConfig,
|
|
613
632
|
calculateOrderForm,
|
|
614
|
-
|
|
633
|
+
toAmountRaw,
|
|
615
634
|
toAmountUI,
|
|
616
635
|
invertPriceInput,
|
|
617
636
|
getTriggerPriceRate,
|
|
@@ -623,7 +642,6 @@ import {
|
|
|
623
642
|
ORBS_LOGO,
|
|
624
643
|
ORBS_WEBSITE_URL,
|
|
625
644
|
SPOT_VERSION,
|
|
626
|
-
networks,
|
|
627
645
|
} from "@orbs-network/spot-react";
|
|
628
646
|
```
|
|
629
647
|
|
|
@@ -1,37 +1,12 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
1
|
import { StoreApi } from 'zustand/vanilla';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
export interface SpotRuntimeState {
|
|
6
|
-
walletInteractions: WalletInteractions;
|
|
7
|
-
marketPrice?: string;
|
|
8
|
-
quotedOutputAmount?: string;
|
|
9
|
-
marketPriceLoading?: boolean;
|
|
10
|
-
account?: Address;
|
|
11
|
-
noLiquidity?: boolean;
|
|
12
|
-
typedInputAmount: string;
|
|
13
|
-
partner: Partners;
|
|
14
|
-
minTradeSizeUsd: number;
|
|
15
|
-
inputToken?: Token;
|
|
16
|
-
outputToken?: Token;
|
|
17
|
-
inputUsd1Token?: string;
|
|
18
|
-
outputUsd1Token?: string;
|
|
19
|
-
inputBalance?: string;
|
|
20
|
-
chainId?: number;
|
|
21
|
-
isSupportedChain: boolean;
|
|
22
|
-
priceProtection: number;
|
|
23
|
-
displayFeePercent: number;
|
|
24
|
-
module: Module;
|
|
25
|
-
callbacks?: Callbacks;
|
|
26
|
-
supportLegacyOrders: boolean;
|
|
27
|
-
overrides?: Overrides;
|
|
28
|
-
}
|
|
2
|
+
import { SpotProps, State, StartedSwapExecution, SwapExecution } from '../types';
|
|
3
|
+
import { Order, SpotClient } from '@orbs-network/spot-ui';
|
|
29
4
|
export interface SpotFormDefaults {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
5
|
+
tradeCount?: number;
|
|
6
|
+
tradeInterval?: State["tradeInterval"];
|
|
7
|
+
orderDuration?: State["orderDuration"];
|
|
8
|
+
limitPriceUi?: string;
|
|
9
|
+
triggerPriceUi?: string;
|
|
35
10
|
triggerPricePercent?: string | null;
|
|
36
11
|
limitPricePercent?: string | null;
|
|
37
12
|
isMarketOrder?: boolean;
|
|
@@ -73,14 +48,6 @@ export interface SpotStore {
|
|
|
73
48
|
state: State;
|
|
74
49
|
}
|
|
75
50
|
export declare const createSpotStore: (initialState: SpotFormDefaults) => StoreApi<SpotStore>;
|
|
76
|
-
export declare const SpotStoreProvider: ({ children, runtime, initialState, }: {
|
|
77
|
-
children: ReactNode;
|
|
78
|
-
runtime: SpotRuntimeState;
|
|
79
|
-
initialState: SpotFormDefaults;
|
|
80
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
81
|
-
export declare const useSpotRuntime: () => SpotRuntimeState;
|
|
82
|
-
export declare const useSpotStoreApi: () => StoreApi<SpotStore>;
|
|
83
|
-
export declare const useSpotStore: <T>(selector: (store: SpotStore) => T) => T;
|
|
84
51
|
export declare const createSpotFormDefaults: (props: Pick<SpotProps, "module" | "overrides">) => SpotFormDefaults;
|
|
85
52
|
export {};
|
|
86
|
-
//# sourceMappingURL=spot-store.d.ts.map
|
|
53
|
+
//# sourceMappingURL=create-spot-store.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-spot-store.d.ts","sourceRoot":"","sources":["../../../../src/context/create-spot-store.ts"],"names":[],"mappings":"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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"order-form-context.d.ts","sourceRoot":"","sources":["../../../../src/context/order-form-context.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"order-form-context.d.ts","sourceRoot":"","sources":["../../../../src/context/order-form-context.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,mBAAmB,EACzB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAsC,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAO3E,eAAO,MAAM,iBAAiB,GAAI,cAAc;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,4CAyGtE,CAAC;AAEF,eAAO,MAAM,YAAY,QAAO,mBAM/B,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import { SpotFormDefaults } from './spot-store';
|
|
2
|
+
import { SpotFormDefaults } from './create-spot-store';
|
|
3
3
|
/**
|
|
4
4
|
* Applies defaults when the partner, chain, module, or token pair changes.
|
|
5
5
|
* The provider store itself remains mounted, so client/history resources and
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spot-form-synchronizer.d.ts","sourceRoot":"","sources":["../../../../src/context/spot-form-synchronizer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAqB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAE1D,OAAO,
|
|
1
|
+
{"version":3,"file":"spot-form-synchronizer.d.ts","sourceRoot":"","sources":["../../../../src/context/spot-form-synchronizer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAqB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAE1D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAG5D;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB,GAAI,mCAIlC;IACD,QAAQ,EAAE,SAAS,CAAC;IACpB,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,QAAQ,EAAE,MAAM,CAAC;CAClB,cAiBA,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spot-provider.d.ts","sourceRoot":"","sources":["../../../../src/context/spot-provider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"spot-provider.d.ts","sourceRoot":"","sources":["../../../../src/context/spot-provider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAU1C,eAAO,MAAM,YAAY,GAAI,OAAO,SAAS,4CAoB5C,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { Module, Address, Partners } from '@orbs-network/spot-ui';
|
|
3
|
+
import { Callbacks, Overrides, Token, WalletInteractions } from '../types';
|
|
4
|
+
export interface SpotRuntimeState {
|
|
5
|
+
walletInteractions: WalletInteractions;
|
|
6
|
+
quotedOutputAmountRaw?: string;
|
|
7
|
+
marketPriceLoading?: boolean;
|
|
8
|
+
account?: Address;
|
|
9
|
+
noLiquidity?: boolean;
|
|
10
|
+
inputAmountUi: string;
|
|
11
|
+
partner: Partners;
|
|
12
|
+
minTradeSizeUsd: number;
|
|
13
|
+
inputToken?: Token;
|
|
14
|
+
outputToken?: Token;
|
|
15
|
+
wrappedNativeToken: Token | undefined;
|
|
16
|
+
inputBalanceRaw: string | undefined;
|
|
17
|
+
inputTokenUsdPrice: string | undefined;
|
|
18
|
+
outputTokenUsdPrice?: string;
|
|
19
|
+
chainId?: number;
|
|
20
|
+
isSupportedChain: boolean;
|
|
21
|
+
priceProtectionPercent: number;
|
|
22
|
+
displayFeePercent: number;
|
|
23
|
+
module: Module;
|
|
24
|
+
callbacks?: Callbacks;
|
|
25
|
+
supportLegacyOrders: boolean;
|
|
26
|
+
overrides?: Overrides;
|
|
27
|
+
}
|
|
28
|
+
export declare const SpotRuntimeProvider: ({ children, value, }: {
|
|
29
|
+
children: ReactNode;
|
|
30
|
+
value: SpotRuntimeState;
|
|
31
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
32
|
+
export declare const useSpotRuntime: () => SpotRuntimeState;
|
|
33
|
+
//# sourceMappingURL=spot-runtime-context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spot-runtime-context.d.ts","sourceRoot":"","sources":["../../../../src/context/spot-runtime-context.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA6B,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAClE,OAAO,EACL,MAAM,EACN,KAAK,OAAO,EACZ,KAAK,QAAQ,EACd,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EACV,SAAS,EACT,SAAS,EACT,KAAK,EACL,kBAAkB,EACnB,MAAM,UAAU,CAAC;AAElB,MAAM,WAAW,gBAAgB;IAC/B,kBAAkB,EAAE,kBAAkB,CAAC;IACvC,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,aAAa,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,QAAQ,CAAC;IAClB,eAAe,EAAE,MAAM,CAAC;IACxB,UAAU,CAAC,EAAE,KAAK,CAAC;IACnB,WAAW,CAAC,EAAE,KAAK,CAAC;IACpB,kBAAkB,EAAE,KAAK,GAAG,SAAS,CAAC;IACtC,eAAe,EAAE,MAAM,GAAG,SAAS,CAAC;IACpC,kBAAkB,EAAE,MAAM,GAAG,SAAS,CAAC;IACvC,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,sBAAsB,EAAE,MAAM,CAAC;IAC/B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,mBAAmB,EAAE,OAAO,CAAC;IAC7B,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB;AAID,eAAO,MAAM,mBAAmB,GAAI,sBAGjC;IACD,QAAQ,EAAE,SAAS,CAAC;IACpB,KAAK,EAAE,gBAAgB,CAAC;CACzB,4CAIA,CAAC;AAEF,eAAO,MAAM,cAAc,QAAO,gBAMjC,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { StoreApi } from 'zustand/vanilla';
|
|
3
|
+
import { SpotFormDefaults, SpotStore } from './create-spot-store';
|
|
4
|
+
export declare const SpotStoreProvider: ({ children, initialState, }: {
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
initialState: SpotFormDefaults;
|
|
7
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare const useSpotStoreApi: () => StoreApi<SpotStore>;
|
|
9
|
+
export declare const useSpotStore: <T>(selector: (store: SpotStore) => T) => T;
|
|
10
|
+
//# sourceMappingURL=spot-store-context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spot-store-context.d.ts","sourceRoot":"","sources":["../../../../src/context/spot-store-context.tsx"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAEf,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAEL,KAAK,gBAAgB,EACrB,KAAK,SAAS,EACf,MAAM,qBAAqB,CAAC;AAI7B,eAAO,MAAM,iBAAiB,GAAI,6BAG/B;IACD,QAAQ,EAAE,SAAS,CAAC;IACpB,YAAY,EAAE,gBAAgB,CAAC;CAChC,4CAQA,CAAC;AAEF,eAAO,MAAM,eAAe,QAAO,QAAQ,CAAC,SAAS,CAMpD,CAAC;AAEF,eAAO,MAAM,YAAY,GAAI,CAAC,EAAG,UAAU,CAAC,KAAK,EAAE,SAAS,KAAK,CAAC,KAAG,CAGpE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-client.d.ts","sourceRoot":"","sources":["../../../../src/context/use-client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,KAAK,UAAU,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"use-client.d.ts","sourceRoot":"","sources":["../../../../src/context/use-client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,KAAK,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAMtE,MAAM,WAAW,YAAY;IAC3B,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,SAAS,EAAE,OAAO,CAAC;IACnB,UAAU,EAAE,OAAO,CAAC;IACpB,OAAO,EAAE,MAAM,OAAO,CAAC,UAAU,GAAG,SAAS,CAAC,CAAC;CAChD;AAID,eAAO,MAAM,SAAS,QAAO,YAyC5B,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { SpotProps } from '../types';
|
|
2
|
-
import { SpotFormDefaults
|
|
2
|
+
import { SpotFormDefaults } from './create-spot-store';
|
|
3
|
+
import { SpotRuntimeState } from './spot-runtime-context';
|
|
3
4
|
interface SpotProviderState {
|
|
4
5
|
initialState: SpotFormDefaults;
|
|
5
6
|
formScopeKey: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-spot-provider-state.d.ts","sourceRoot":"","sources":["../../../../src/context/use-spot-provider-state.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAC1C,OAAO,EAEL,KAAK,gBAAgB,
|
|
1
|
+
{"version":3,"file":"use-spot-provider-state.d.ts","sourceRoot":"","sources":["../../../../src/context/use-spot-provider-state.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAC1C,OAAO,EAEL,KAAK,gBAAgB,EACtB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAE/D,UAAU,iBAAiB;IACzB,YAAY,EAAE,gBAAgB,CAAC;IAC/B,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,gBAAgB,CAAC;CAC3B;AAED,eAAO,MAAM,oBAAoB,GAAI,OAAO,SAAS,KAAG,iBAmGvD,CAAC"}
|
|
@@ -11,6 +11,7 @@ export interface ExecuteOrderParams extends ExecutionStoreActions {
|
|
|
11
11
|
isSupportedChain: boolean;
|
|
12
12
|
inputToken?: Token;
|
|
13
13
|
outputToken?: Token;
|
|
14
|
+
wrappedNativeToken?: Token;
|
|
14
15
|
form: CalculatedOrderForm;
|
|
15
16
|
client?: SpotClient;
|
|
16
17
|
walletInteractions: WalletInteractions;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"execute-order.d.ts","sourceRoot":"","sources":["../../../src/execute-order.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"execute-order.d.ts","sourceRoot":"","sources":["../../../src/execute-order.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,OAAO,EACZ,KAAK,mBAAmB,EACxB,KAAK,KAAK,EAEV,KAAK,UAAU,EAChB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAGL,KAAK,SAAS,EACd,KAAK,oBAAoB,EACzB,KAAK,aAAa,EAClB,KAAK,KAAK,EACV,KAAK,kBAAkB,EACxB,MAAM,SAAS,CAAC;AAWjB,UAAU,qBAAqB;IAC7B,mBAAmB,EAAE,MAAM,aAAa,CAAC;IACzC,cAAc,EAAE,CACd,KAAK,EAAE,IAAI,CAAC,aAAa,EAAE,aAAa,GAAG,OAAO,CAAC,KAChD,oBAAoB,GAAG,SAAS,CAAC;IACtC,gBAAgB,EAAE,CAChB,WAAW,EAAE,MAAM,EACnB,KAAK,EAAE,aAAa,KACjB,OAAO,CAAC;CACd;AAED,MAAM,WAAW,kBAAmB,SAAQ,qBAAqB;IAC/D,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,UAAU,CAAC,EAAE,KAAK,CAAC;IACnB,WAAW,CAAC,EAAE,KAAK,CAAC;IACpB,kBAAkB,CAAC,EAAE,KAAK,CAAC;IAC3B,IAAI,EAAE,mBAAmB,CAAC;IAC1B,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB,kBAAkB,EAAE,kBAAkB,CAAC;IACvC,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,WAAW,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IACpC,mBAAmB,EAAE,MAAM,OAAO,CAAC;IACnC,IAAI,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CAChD;AAkHD,eAAO,MAAM,YAAY,GACvB,QAAQ,kBAAkB,KACzB,OAAO,CAAC,KAAK,GAAG,SAAS,CAkQ3B,CAAC"}
|
|
@@ -9,11 +9,11 @@ export declare const getErrorMessage: (error: unknown) => string;
|
|
|
9
9
|
export declare const normalizeError: (error: unknown) => Error;
|
|
10
10
|
export declare const parseExecutionError: (error: unknown) => ParsedError;
|
|
11
11
|
export declare const observe: (callback: (() => unknown) | undefined) => void;
|
|
12
|
-
export declare const getReusableCompletedWrap: ({ execution, account, chainId, inputTokenAddress,
|
|
12
|
+
export declare const getReusableCompletedWrap: ({ execution, account, chainId, inputTokenAddress, inputAmountRaw, }: {
|
|
13
13
|
execution: SwapExecution;
|
|
14
14
|
account: string;
|
|
15
15
|
chainId: number;
|
|
16
16
|
inputTokenAddress: string;
|
|
17
|
-
|
|
17
|
+
inputAmountRaw: string;
|
|
18
18
|
}) => CompletedWrap | undefined;
|
|
19
19
|
//# sourceMappingURL=execution-state.d.ts.map
|
|
@@ -1,4 +1,2 @@
|
|
|
1
1
|
export declare const useAmountUi: (decimals?: number, value?: string) => string;
|
|
2
|
-
export declare const useNetwork: (chainIdOverride?: number) => import('@orbs-network/spot-ui').Network | undefined;
|
|
3
|
-
export declare const useExplorerLink: (txHash?: string, chainId?: number) => string | undefined;
|
|
4
2
|
//# sourceMappingURL=helper-hooks.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helper-hooks.d.ts","sourceRoot":"","sources":["../../../../src/hooks/helper-hooks.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"helper-hooks.d.ts","sourceRoot":"","sources":["../../../../src/hooks/helper-hooks.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,WAAW,GAAI,WAAW,MAAM,EAAE,QAAQ,MAAM,WAE5D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"order-hooks.d.ts","sourceRoot":"","sources":["../../../../src/hooks/order-hooks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,KAAK,KAAK,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"order-hooks.d.ts","sourceRoot":"","sources":["../../../../src/hooks/order-hooks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,KAAK,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAYhE,OAAO,EAIL,KAAK,iBAAiB,EACvB,MAAM,uBAAuB,CAAC;AAE/B,YAAY,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAI/D;;;;GAIG;AACH,eAAO,MAAM,iBAAiB;;;;CAkD7B,CAAC;AAEF,oEAAoE;AACpE,eAAO,MAAM,cAAc,gBAMf,KAAK,SAGhB,CAAC;AAEF,eAAO,MAAM,0BAA0B,qBAGtB,MAAM,UAAU,WAAW,SAI3C,CAAC;AAEF,eAAO,MAAM,sBAAsB,0CAMlC,CAAC;AAEF,MAAM,WAAW,YAAY;IAC3B,IAAI,CAAC,EAAE,iBAAiB,CAAC;IACzB,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,SAAS,EAAE,OAAO,CAAC;IACnB,UAAU,EAAE,OAAO,CAAC;IACpB,YAAY,EAAE,OAAO,CAAC;IACtB,OAAO,EAAE,MAAM,OAAO,CAAC,iBAAiB,GAAG,SAAS,CAAC,CAAC;CACvD;AAED;;;;GAIG;AACH,eAAO,MAAM,SAAS,QAAO,YAsC5B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-cancel-order.d.ts","sourceRoot":"","sources":["../../../../src/hooks/use-cancel-order.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAC3C,OAAO,
|
|
1
|
+
{"version":3,"file":"use-cancel-order.d.ts","sourceRoot":"","sources":["../../../../src/hooks/use-cancel-order.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAC3C,OAAO,EAIL,KAAK,KAAK,EACX,MAAM,uBAAuB,CAAC;AAiB/B,eAAO,MAAM,sCAAsC,qBAG5B,MAAM,KAAG,OAAO,CAAC,IAAI,CAuB3C,CAAC;AA4BF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,MAAM,EAAE,eAAe,CAAC;IACxB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAAI,OAAO,KAAK,KAAG,KAGlD,CAAC;AAEH,eAAO,MAAM,cAAc,GAAI,QAAQ,KAAK;;;;;;;;CAsG3C,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { TimeDuration, TimeUnit } from '@orbs-network/spot-ui';
|
|
2
2
|
export declare const useDuration: () => {
|
|
3
3
|
duration: TimeDuration;
|
|
4
|
-
onChange: (
|
|
4
|
+
onChange: (orderDuration: TimeDuration) => void;
|
|
5
5
|
milliseconds: number;
|
|
6
6
|
onInputChange: (value: string) => void;
|
|
7
7
|
onUnitSelect: (unit: TimeUnit) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-duration.d.ts","sourceRoot":"","sources":["../../../../src/hooks/use-duration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"use-duration.d.ts","sourceRoot":"","sources":["../../../../src/hooks/use-duration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAOpE,eAAO,MAAM,WAAW;;8BAMJ,YAAY;;2BAQpB,MAAM;yBASP,QAAQ;;CAiBlB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-execution.d.ts","sourceRoot":"","sources":["../../../../src/hooks/use-execution.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,eAAe,EACf,KAAK,WAAW,EAChB,KAAK,KAAK,EACV,KAAK,KAAK,EACX,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"use-execution.d.ts","sourceRoot":"","sources":["../../../../src/hooks/use-execution.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,eAAe,EACf,KAAK,WAAW,EAChB,KAAK,KAAK,EACV,KAAK,KAAK,EACX,MAAM,UAAU,CAAC;AAgBlB,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,cAAc,CAAC;IACtB,MAAM,CAAC,EAAE,eAAe,CAAC;IACzB,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,WAAW,CAAC,EAAE,KAAK,CAAC;IACpB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,KAAK,EAAE,CAAC;IACzB,UAAU,CAAC,EAAE,KAAK,CAAC;IACnB,WAAW,CAAC,EAAE,KAAK,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,IAAI,CAAC;IACxB,aAAa,EAAE,MAAM,OAAO,CAAC;IAC7B,iBAAiB,EAAE,MAAM,OAAO,CAAC;IACjC,WAAW,EAAE,OAAO,CAAC;IACrB,SAAS,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,OAAO,CAAC;IAClB,UAAU,EAAE,OAAO,CAAC;IACpB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,UAAU,EAAE,OAAO,CAAC;CACrB;AAED,eAAO,MAAM,YAAY,QAAO,iBA8D/B,CAAC;AAEF,eAAO,MAAM,eAAe;;;CAgD3B,CAAC"}
|
|
@@ -2,7 +2,7 @@ import { TimeDuration, TimeUnit } from '@orbs-network/spot-ui';
|
|
|
2
2
|
export declare const useFillDelay: () => {
|
|
3
3
|
onInputChange: (value: string) => void;
|
|
4
4
|
onUnitSelect: (unit: TimeUnit) => void;
|
|
5
|
-
onChange: (
|
|
5
|
+
onChange: (tradeInterval: TimeDuration) => void;
|
|
6
6
|
milliseconds: number;
|
|
7
7
|
fillDelay: TimeDuration;
|
|
8
8
|
error: import('@orbs-network/spot-ui').InputError | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-fill-delay.d.ts","sourceRoot":"","sources":["../../../../src/hooks/use-fill-delay.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"use-fill-delay.d.ts","sourceRoot":"","sources":["../../../../src/hooks/use-fill-delay.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAOpE,eAAO,MAAM,YAAY;2BAab,MAAM;yBAQP,QAAQ;8BAfC,YAAY;;;;CA8B/B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-history-order.d.ts","sourceRoot":"","sources":["../../../../src/hooks/use-history-order.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"use-history-order.d.ts","sourceRoot":"","sources":["../../../../src/hooks/use-history-order.ts"],"names":[],"mappings":"AAAA,OAAO,EAQL,KAAK,KAAK,EACV,KAAK,SAAS,EACf,MAAM,uBAAuB,CAAC;AAG/B,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAgCtC,eAAO,MAAM,eAAe,GAC1B,QAAQ,KAAK,EACb,aAAa,KAAK,EAClB,cAAc,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aA8GpB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-limit-price.d.ts","sourceRoot":"","sources":["../../../../src/hooks/use-limit-price.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"use-limit-price.d.ts","sourceRoot":"","sources":["../../../../src/hooks/use-limit-price.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,aAAa;;;;4BAOb,MAAM;sCASD,MAAM;;;;;;;;;;;CA4DvB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-price-display.d.ts","sourceRoot":"","sources":["../../../../src/hooks/use-price-display.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"use-price-display.d.ts","sourceRoot":"","sources":["../../../../src/hooks/use-price-display.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,eAAe;;;;;;;;CA8B3B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-submit-order.d.ts","sourceRoot":"","sources":["../../../../src/hooks/use-submit-order.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"use-submit-order.d.ts","sourceRoot":"","sources":["../../../../src/hooks/use-submit-order.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,cAAc,QAAO,CAAC,MAAM,IAAI,CAkD5C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-trades.d.ts","sourceRoot":"","sources":["../../../../src/hooks/use-trades.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"use-trades.d.ts","sourceRoot":"","sources":["../../../../src/hooks/use-trades.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,SAAS;;;;;;uBAMT,MAAM;;;;CAqBlB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-trigger-price.d.ts","sourceRoot":"","sources":["../../../../src/hooks/use-trigger-price.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"use-trigger-price.d.ts","sourceRoot":"","sources":["../../../../src/hooks/use-trigger-price.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,eAAe;;;;;4BAOf,MAAM;sCASD,MAAM;;;;;;;;;CAgDvB,CAAC"}
|