@orbs-network/spot-react 2.0.1 → 2.1.0
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 +228 -117
- package/dist/spot-react/src/context/client-error-notice.d.ts +7 -0
- package/dist/spot-react/src/context/client-error-notice.d.ts.map +1 -0
- package/dist/spot-react/src/context/error-boundary.d.ts +7 -0
- package/dist/spot-react/src/context/error-boundary.d.ts.map +1 -0
- package/dist/spot-react/src/context/order-form-context.d.ts +7 -0
- package/dist/spot-react/src/context/order-form-context.d.ts.map +1 -0
- package/dist/spot-react/src/context/spot-form-synchronizer.d.ts +14 -0
- package/dist/spot-react/src/context/spot-form-synchronizer.d.ts.map +1 -0
- package/dist/spot-react/src/context/spot-provider.d.ts +3 -0
- package/dist/spot-react/src/context/spot-provider.d.ts.map +1 -0
- package/dist/spot-react/src/context/spot-store.d.ts +86 -0
- package/dist/spot-react/src/context/spot-store.d.ts.map +1 -0
- package/dist/spot-react/src/context/use-client.d.ts +10 -0
- package/dist/spot-react/src/context/use-client.d.ts.map +1 -0
- package/dist/spot-react/src/context/use-spot-analytics.d.ts +3 -0
- package/dist/spot-react/src/context/use-spot-analytics.d.ts.map +1 -0
- package/dist/spot-react/src/context/use-spot-provider-state.d.ts +10 -0
- package/dist/spot-react/src/context/use-spot-provider-state.d.ts.map +1 -0
- package/dist/spot-react/src/execute-order.d.ts +24 -0
- package/dist/spot-react/src/execute-order.d.ts.map +1 -0
- package/dist/spot-react/src/execution-state.d.ts +19 -0
- package/dist/spot-react/src/execution-state.d.ts.map +1 -0
- package/dist/spot-react/src/hooks/helper-hooks.d.ts +2 -547
- package/dist/spot-react/src/hooks/helper-hooks.d.ts.map +1 -1
- package/dist/spot-react/src/hooks/order-hooks.d.ts +28 -18
- package/dist/spot-react/src/hooks/order-hooks.d.ts.map +1 -1
- package/dist/spot-react/src/hooks/use-cancel-order.d.ts +4 -4
- package/dist/spot-react/src/hooks/use-cancel-order.d.ts.map +1 -1
- package/dist/spot-react/src/hooks/use-disclaimer.d.ts.map +1 -1
- package/dist/spot-react/src/hooks/use-duration.d.ts +2 -19
- package/dist/spot-react/src/hooks/use-duration.d.ts.map +1 -1
- package/dist/spot-react/src/hooks/use-execution.d.ts +30 -0
- package/dist/spot-react/src/hooks/use-execution.d.ts.map +1 -0
- package/dist/spot-react/src/hooks/use-fill-delay.d.ts +2 -21
- 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 +51 -27
- package/dist/spot-react/src/hooks/use-history-order.d.ts.map +1 -1
- package/dist/spot-react/src/hooks/use-input-errors.d.ts +1 -1
- package/dist/spot-react/src/hooks/use-input-errors.d.ts.map +1 -1
- package/dist/spot-react/src/hooks/use-limit-price.d.ts +14 -21
- package/dist/spot-react/src/hooks/use-limit-price.d.ts.map +1 -1
- package/dist/spot-react/src/hooks/use-output-amount.d.ts +5 -0
- package/dist/spot-react/src/hooks/use-output-amount.d.ts.map +1 -0
- package/dist/spot-react/src/hooks/use-price-display.d.ts +10 -0
- package/dist/spot-react/src/hooks/use-price-display.d.ts.map +1 -0
- package/dist/spot-react/src/hooks/use-submit-order.d.ts +1 -2
- package/dist/spot-react/src/hooks/use-submit-order.d.ts.map +1 -1
- package/dist/spot-react/src/hooks/use-swap-execution.d.ts +9 -10
- package/dist/spot-react/src/hooks/use-swap-execution.d.ts.map +1 -1
- package/dist/spot-react/src/hooks/use-trades.d.ts +7 -17
- package/dist/spot-react/src/hooks/use-trades.d.ts.map +1 -1
- package/dist/spot-react/src/hooks/use-trigger-price.d.ts +13 -20
- package/dist/spot-react/src/hooks/use-trigger-price.d.ts.map +1 -1
- package/dist/spot-react/src/index.d.ts +19 -10
- package/dist/spot-react/src/index.d.ts.map +1 -1
- package/dist/spot-react/src/order-history-data.d.ts +14 -0
- package/dist/spot-react/src/order-history-data.d.ts.map +1 -0
- package/dist/spot-react/src/types.d.ts +90 -106
- package/dist/spot-react/src/types.d.ts.map +1 -1
- package/dist/spot-react.js +1650 -6497
- package/dist/spot-react.umd.cjs +1 -64
- package/package.json +8 -13
- package/dist/spot-react/package.json.d.ts +0 -56
- package/dist/spot-react/src/hooks/use-amounts-usd.d.ts +0 -5
- package/dist/spot-react/src/hooks/use-amounts-usd.d.ts.map +0 -1
- package/dist/spot-react/src/hooks/use-build-order-info.d.ts +0 -62
- package/dist/spot-react/src/hooks/use-build-order-info.d.ts.map +0 -1
- package/dist/spot-react/src/hooks/use-deadline.d.ts +0 -2
- package/dist/spot-react/src/hooks/use-deadline.d.ts.map +0 -1
- package/dist/spot-react/src/hooks/use-default-values.d.ts +0 -3
- package/dist/spot-react/src/hooks/use-default-values.d.ts.map +0 -1
- package/dist/spot-react/src/hooks/use-dst-amount.d.ts +0 -11
- package/dist/spot-react/src/hooks/use-dst-amount.d.ts.map +0 -1
- package/dist/spot-react/src/hooks/use-dst-token-panel.d.ts +0 -7
- package/dist/spot-react/src/hooks/use-dst-token-panel.d.ts.map +0 -1
- package/dist/spot-react/src/hooks/use-fees.d.ts +0 -7
- package/dist/spot-react/src/hooks/use-fees.d.ts.map +0 -1
- package/dist/spot-react/src/hooks/use-form-data.d.ts +0 -57
- package/dist/spot-react/src/hooks/use-form-data.d.ts.map +0 -1
- package/dist/spot-react/src/hooks/use-input-with-percentage.d.ts +0 -16
- package/dist/spot-react/src/hooks/use-input-with-percentage.d.ts.map +0 -1
- package/dist/spot-react/src/hooks/use-limit-price-panel.d.ts +0 -22
- package/dist/spot-react/src/hooks/use-limit-price-panel.d.ts.map +0 -1
- package/dist/spot-react/src/hooks/use-partner-chains.d.ts +0 -2
- package/dist/spot-react/src/hooks/use-partner-chains.d.ts.map +0 -1
- package/dist/spot-react/src/hooks/use-price-panel.d.ts +0 -21
- package/dist/spot-react/src/hooks/use-price-panel.d.ts.map +0 -1
- package/dist/spot-react/src/hooks/use-repermit-data.d.ts +0 -7
- package/dist/spot-react/src/hooks/use-repermit-data.d.ts.map +0 -1
- package/dist/spot-react/src/hooks/use-repermit-order-data.d.ts +0 -20
- package/dist/spot-react/src/hooks/use-repermit-order-data.d.ts.map +0 -1
- package/dist/spot-react/src/hooks/use-spot.d.ts +0 -40
- package/dist/spot-react/src/hooks/use-spot.d.ts.map +0 -1
- package/dist/spot-react/src/hooks/use-src-amount.d.ts +0 -6
- package/dist/spot-react/src/hooks/use-src-amount.d.ts.map +0 -1
- package/dist/spot-react/src/hooks/use-submit-order-panel.d.ts +0 -28
- package/dist/spot-react/src/hooks/use-submit-order-panel.d.ts.map +0 -1
- package/dist/spot-react/src/hooks/use-trade-price.d.ts +0 -2
- package/dist/spot-react/src/hooks/use-trade-price.d.ts.map +0 -1
- package/dist/spot-react/src/hooks/use-trigger-price-panel.d.ts +0 -23
- package/dist/spot-react/src/hooks/use-trigger-price-panel.d.ts.map +0 -1
- package/dist/spot-react/src/spot-context.d.ts +0 -6
- package/dist/spot-react/src/spot-context.d.ts.map +0 -1
- package/dist/spot-react/src/store.d.ts +0 -11
- package/dist/spot-react/src/store.d.ts.map +0 -1
- package/dist/spot-react/src/utils.d.ts +0 -20
- package/dist/spot-react/src/utils.d.ts.map +0 -1
- package/dist/spot-ui/src/index.d.ts +0 -14
- package/dist/spot-ui/src/index.d.ts.map +0 -1
- package/dist/spot-ui/src/lib/abi/erc20.json.d.ts +0 -291
- package/dist/spot-ui/src/lib/abi/index.d.ts +0 -260
- package/dist/spot-ui/src/lib/abi/index.d.ts.map +0 -1
- package/dist/spot-ui/src/lib/abi/iweth.json.d.ts +0 -41
- package/dist/spot-ui/src/lib/abi/repermit.json.d.ts +0 -315
- package/dist/spot-ui/src/lib/analytics.d.ts +0 -111
- package/dist/spot-ui/src/lib/analytics.d.ts.map +0 -1
- package/dist/spot-ui/src/lib/build-repermit-order-data.d.ts +0 -35
- package/dist/spot-ui/src/lib/build-repermit-order-data.d.ts.map +0 -1
- package/dist/spot-ui/src/lib/consts.d.ts +0 -99
- package/dist/spot-ui/src/lib/consts.d.ts.map +0 -1
- package/dist/spot-ui/src/lib/lib.d.ts +0 -80
- package/dist/spot-ui/src/lib/lib.d.ts.map +0 -1
- package/dist/spot-ui/src/lib/networks.d.ts +0 -571
- package/dist/spot-ui/src/lib/networks.d.ts.map +0 -1
- package/dist/spot-ui/src/lib/orders/index.d.ts +0 -15
- package/dist/spot-ui/src/lib/orders/index.d.ts.map +0 -1
- package/dist/spot-ui/src/lib/orders/v1-orders.d.ts +0 -34
- package/dist/spot-ui/src/lib/orders/v1-orders.d.ts.map +0 -1
- package/dist/spot-ui/src/lib/orders/v2-orders.d.ts +0 -11
- package/dist/spot-ui/src/lib/orders/v2-orders.d.ts.map +0 -1
- package/dist/spot-ui/src/lib/submit-order.d.ts +0 -3
- package/dist/spot-ui/src/lib/submit-order.d.ts.map +0 -1
- package/dist/spot-ui/src/lib/types.d.ts +0 -318
- package/dist/spot-ui/src/lib/types.d.ts.map +0 -1
- package/dist/spot-ui/src/lib/utils.d.ts +0 -578
- package/dist/spot-ui/src/lib/utils.d.ts.map +0 -1
|
@@ -1,549 +1,4 @@
|
|
|
1
|
-
export declare const useAmountBN: (decimals?: number, value?: string) => string;
|
|
2
1
|
export declare const useAmountUi: (decimals?: number, value?: string) => string;
|
|
3
|
-
export declare const useNetwork: () =>
|
|
4
|
-
|
|
5
|
-
name: string;
|
|
6
|
-
shortname: string;
|
|
7
|
-
native: {
|
|
8
|
-
address: string;
|
|
9
|
-
symbol: string;
|
|
10
|
-
decimals: number;
|
|
11
|
-
logoUrl: string;
|
|
12
|
-
};
|
|
13
|
-
wToken: {
|
|
14
|
-
symbol: string;
|
|
15
|
-
address: string;
|
|
16
|
-
decimals: number;
|
|
17
|
-
logoUrl: string;
|
|
18
|
-
};
|
|
19
|
-
publicRpcUrl: string;
|
|
20
|
-
logoUrl: string;
|
|
21
|
-
explorer: string;
|
|
22
|
-
eip1559: boolean;
|
|
23
|
-
} | {
|
|
24
|
-
id: number;
|
|
25
|
-
name: string;
|
|
26
|
-
shortname: string;
|
|
27
|
-
native: {
|
|
28
|
-
address: string;
|
|
29
|
-
symbol: string;
|
|
30
|
-
decimals: number;
|
|
31
|
-
logoUrl: string;
|
|
32
|
-
};
|
|
33
|
-
wToken: {
|
|
34
|
-
symbol: string;
|
|
35
|
-
address: string;
|
|
36
|
-
decimals: number;
|
|
37
|
-
logoUrl: string;
|
|
38
|
-
};
|
|
39
|
-
publicRpcUrl: string;
|
|
40
|
-
logoUrl: string;
|
|
41
|
-
explorer: string;
|
|
42
|
-
eip1559: boolean;
|
|
43
|
-
} | {
|
|
44
|
-
id: number;
|
|
45
|
-
name: string;
|
|
46
|
-
shortname: string;
|
|
47
|
-
native: {
|
|
48
|
-
address: string;
|
|
49
|
-
symbol: string;
|
|
50
|
-
decimals: number;
|
|
51
|
-
logoUrl: string;
|
|
52
|
-
};
|
|
53
|
-
wToken: {
|
|
54
|
-
symbol: string;
|
|
55
|
-
address: string;
|
|
56
|
-
decimals: number;
|
|
57
|
-
logoUrl: string;
|
|
58
|
-
};
|
|
59
|
-
publicRpcUrl: string;
|
|
60
|
-
logoUrl: string;
|
|
61
|
-
explorer: string;
|
|
62
|
-
eip1559: boolean;
|
|
63
|
-
} | {
|
|
64
|
-
id: number;
|
|
65
|
-
name: string;
|
|
66
|
-
shortname: string;
|
|
67
|
-
native: {
|
|
68
|
-
address: string;
|
|
69
|
-
symbol: string;
|
|
70
|
-
decimals: number;
|
|
71
|
-
logoUrl: string;
|
|
72
|
-
};
|
|
73
|
-
wToken: {
|
|
74
|
-
symbol: string;
|
|
75
|
-
address: string;
|
|
76
|
-
decimals: number;
|
|
77
|
-
logoUrl: string;
|
|
78
|
-
};
|
|
79
|
-
publicRpcUrl: string;
|
|
80
|
-
logoUrl: string;
|
|
81
|
-
explorer: string;
|
|
82
|
-
eip1559: boolean;
|
|
83
|
-
} | {
|
|
84
|
-
id: number;
|
|
85
|
-
name: string;
|
|
86
|
-
shortname: string;
|
|
87
|
-
native: {
|
|
88
|
-
address: string;
|
|
89
|
-
symbol: string;
|
|
90
|
-
decimals: number;
|
|
91
|
-
logoUrl: string;
|
|
92
|
-
};
|
|
93
|
-
wToken: {
|
|
94
|
-
symbol: string;
|
|
95
|
-
address: string;
|
|
96
|
-
decimals: number;
|
|
97
|
-
logoUrl: string;
|
|
98
|
-
};
|
|
99
|
-
publicRpcUrl: string;
|
|
100
|
-
logoUrl: string;
|
|
101
|
-
explorer: string;
|
|
102
|
-
eip1559: boolean;
|
|
103
|
-
} | {
|
|
104
|
-
id: number;
|
|
105
|
-
name: string;
|
|
106
|
-
shortname: string;
|
|
107
|
-
native: {
|
|
108
|
-
address: string;
|
|
109
|
-
symbol: string;
|
|
110
|
-
decimals: number;
|
|
111
|
-
logoUrl: string;
|
|
112
|
-
};
|
|
113
|
-
wToken: {
|
|
114
|
-
symbol: string;
|
|
115
|
-
address: string;
|
|
116
|
-
decimals: number;
|
|
117
|
-
logoUrl: string;
|
|
118
|
-
};
|
|
119
|
-
publicRpcUrl: string;
|
|
120
|
-
logoUrl: string;
|
|
121
|
-
explorer: string;
|
|
122
|
-
eip1559: boolean;
|
|
123
|
-
} | {
|
|
124
|
-
id: number;
|
|
125
|
-
name: string;
|
|
126
|
-
shortname: string;
|
|
127
|
-
native: {
|
|
128
|
-
address: string;
|
|
129
|
-
symbol: string;
|
|
130
|
-
decimals: number;
|
|
131
|
-
logoUrl: string;
|
|
132
|
-
};
|
|
133
|
-
wToken: {
|
|
134
|
-
symbol: string;
|
|
135
|
-
address: string;
|
|
136
|
-
decimals: number;
|
|
137
|
-
logoUrl: string;
|
|
138
|
-
};
|
|
139
|
-
publicRpcUrl: string;
|
|
140
|
-
logoUrl: string;
|
|
141
|
-
explorer: string;
|
|
142
|
-
eip1559: boolean;
|
|
143
|
-
} | {
|
|
144
|
-
id: number;
|
|
145
|
-
name: string;
|
|
146
|
-
shortname: string;
|
|
147
|
-
native: {
|
|
148
|
-
address: string;
|
|
149
|
-
symbol: string;
|
|
150
|
-
decimals: number;
|
|
151
|
-
logoUrl: string;
|
|
152
|
-
};
|
|
153
|
-
wToken: {
|
|
154
|
-
symbol: string;
|
|
155
|
-
address: string;
|
|
156
|
-
decimals: number;
|
|
157
|
-
logoUrl: string;
|
|
158
|
-
};
|
|
159
|
-
publicRpcUrl: string;
|
|
160
|
-
logoUrl: string;
|
|
161
|
-
explorer: string;
|
|
162
|
-
eip1559: boolean;
|
|
163
|
-
} | {
|
|
164
|
-
id: number;
|
|
165
|
-
name: string;
|
|
166
|
-
shortname: string;
|
|
167
|
-
native: {
|
|
168
|
-
address: string;
|
|
169
|
-
symbol: string;
|
|
170
|
-
decimals: number;
|
|
171
|
-
logoUrl: string;
|
|
172
|
-
};
|
|
173
|
-
wToken: {
|
|
174
|
-
symbol: string;
|
|
175
|
-
address: string;
|
|
176
|
-
decimals: number;
|
|
177
|
-
logoUrl: string;
|
|
178
|
-
};
|
|
179
|
-
publicRpcUrl: string;
|
|
180
|
-
logoUrl: string;
|
|
181
|
-
explorer: string;
|
|
182
|
-
eip1559: boolean;
|
|
183
|
-
} | {
|
|
184
|
-
id: number;
|
|
185
|
-
name: string;
|
|
186
|
-
shortname: string;
|
|
187
|
-
native: {
|
|
188
|
-
address: string;
|
|
189
|
-
symbol: string;
|
|
190
|
-
decimals: number;
|
|
191
|
-
logoUrl: string;
|
|
192
|
-
};
|
|
193
|
-
wToken: {
|
|
194
|
-
symbol: string;
|
|
195
|
-
address: string;
|
|
196
|
-
decimals: number;
|
|
197
|
-
logoUrl: string;
|
|
198
|
-
};
|
|
199
|
-
publicRpcUrl: string;
|
|
200
|
-
logoUrl: string;
|
|
201
|
-
explorer: string;
|
|
202
|
-
eip1559: boolean;
|
|
203
|
-
} | {
|
|
204
|
-
id: number;
|
|
205
|
-
name: string;
|
|
206
|
-
shortname: string;
|
|
207
|
-
native: {
|
|
208
|
-
address: string;
|
|
209
|
-
symbol: string;
|
|
210
|
-
decimals: number;
|
|
211
|
-
logoUrl: string;
|
|
212
|
-
};
|
|
213
|
-
wToken: {
|
|
214
|
-
symbol: string;
|
|
215
|
-
address: string;
|
|
216
|
-
decimals: number;
|
|
217
|
-
logoUrl: string;
|
|
218
|
-
};
|
|
219
|
-
publicRpcUrl: string;
|
|
220
|
-
logoUrl: string;
|
|
221
|
-
explorer: string;
|
|
222
|
-
eip1559: boolean;
|
|
223
|
-
} | {
|
|
224
|
-
id: number;
|
|
225
|
-
name: string;
|
|
226
|
-
shortname: string;
|
|
227
|
-
native: {
|
|
228
|
-
address: string;
|
|
229
|
-
symbol: string;
|
|
230
|
-
decimals: number;
|
|
231
|
-
logoUrl: string;
|
|
232
|
-
};
|
|
233
|
-
wToken: {
|
|
234
|
-
symbol: string;
|
|
235
|
-
address: string;
|
|
236
|
-
decimals: number;
|
|
237
|
-
logoUrl: string;
|
|
238
|
-
};
|
|
239
|
-
publicRpcUrl: string;
|
|
240
|
-
logoUrl: string;
|
|
241
|
-
explorer: string;
|
|
242
|
-
eip1559: boolean;
|
|
243
|
-
} | {
|
|
244
|
-
id: number;
|
|
245
|
-
name: string;
|
|
246
|
-
shortname: string;
|
|
247
|
-
native: {
|
|
248
|
-
address: string;
|
|
249
|
-
symbol: string;
|
|
250
|
-
decimals: number;
|
|
251
|
-
logoUrl: string;
|
|
252
|
-
};
|
|
253
|
-
wToken: {
|
|
254
|
-
symbol: string;
|
|
255
|
-
address: string;
|
|
256
|
-
decimals: number;
|
|
257
|
-
logoUrl: string;
|
|
258
|
-
};
|
|
259
|
-
publicRpcUrl: string;
|
|
260
|
-
logoUrl: string;
|
|
261
|
-
explorer: string;
|
|
262
|
-
eip1559: boolean;
|
|
263
|
-
} | {
|
|
264
|
-
id: number;
|
|
265
|
-
name: string;
|
|
266
|
-
shortname: string;
|
|
267
|
-
native: {
|
|
268
|
-
address: string;
|
|
269
|
-
symbol: string;
|
|
270
|
-
decimals: number;
|
|
271
|
-
logoUrl: string;
|
|
272
|
-
};
|
|
273
|
-
wToken: {
|
|
274
|
-
symbol: string;
|
|
275
|
-
address: string;
|
|
276
|
-
decimals: number;
|
|
277
|
-
logoUrl: string;
|
|
278
|
-
};
|
|
279
|
-
publicRpcUrl: string;
|
|
280
|
-
logoUrl: string;
|
|
281
|
-
explorer: string;
|
|
282
|
-
eip1559: boolean;
|
|
283
|
-
} | {
|
|
284
|
-
id: number;
|
|
285
|
-
name: string;
|
|
286
|
-
shortname: string;
|
|
287
|
-
native: {
|
|
288
|
-
address: string;
|
|
289
|
-
symbol: string;
|
|
290
|
-
decimals: number;
|
|
291
|
-
logoUrl: string;
|
|
292
|
-
};
|
|
293
|
-
wToken: {
|
|
294
|
-
symbol: string;
|
|
295
|
-
address: string;
|
|
296
|
-
decimals: number;
|
|
297
|
-
logoUrl: string;
|
|
298
|
-
};
|
|
299
|
-
publicRpcUrl: string;
|
|
300
|
-
logoUrl: string;
|
|
301
|
-
explorer: string;
|
|
302
|
-
eip1559: boolean;
|
|
303
|
-
} | {
|
|
304
|
-
id: number;
|
|
305
|
-
name: string;
|
|
306
|
-
shortname: string;
|
|
307
|
-
native: {
|
|
308
|
-
address: string;
|
|
309
|
-
symbol: string;
|
|
310
|
-
decimals: number;
|
|
311
|
-
logoUrl: string;
|
|
312
|
-
};
|
|
313
|
-
wToken: {
|
|
314
|
-
symbol: string;
|
|
315
|
-
address: string;
|
|
316
|
-
decimals: number;
|
|
317
|
-
logoUrl: string;
|
|
318
|
-
};
|
|
319
|
-
publicRpcUrl: string;
|
|
320
|
-
logoUrl: string;
|
|
321
|
-
explorer: string;
|
|
322
|
-
eip1559: boolean;
|
|
323
|
-
} | {
|
|
324
|
-
id: number;
|
|
325
|
-
name: string;
|
|
326
|
-
shortname: string;
|
|
327
|
-
native: {
|
|
328
|
-
address: string;
|
|
329
|
-
symbol: string;
|
|
330
|
-
decimals: number;
|
|
331
|
-
logoUrl: string;
|
|
332
|
-
};
|
|
333
|
-
wToken: {
|
|
334
|
-
symbol: string;
|
|
335
|
-
address: string;
|
|
336
|
-
decimals: number;
|
|
337
|
-
logoUrl: string;
|
|
338
|
-
};
|
|
339
|
-
publicRpcUrl: string;
|
|
340
|
-
logoUrl: string;
|
|
341
|
-
explorer: string;
|
|
342
|
-
eip1559: boolean;
|
|
343
|
-
} | {
|
|
344
|
-
id: number;
|
|
345
|
-
name: string;
|
|
346
|
-
shortname: string;
|
|
347
|
-
native: {
|
|
348
|
-
address: string;
|
|
349
|
-
symbol: string;
|
|
350
|
-
decimals: number;
|
|
351
|
-
logoUrl: string;
|
|
352
|
-
};
|
|
353
|
-
wToken: {
|
|
354
|
-
symbol: string;
|
|
355
|
-
address: string;
|
|
356
|
-
decimals: number;
|
|
357
|
-
logoUrl: string;
|
|
358
|
-
};
|
|
359
|
-
publicRpcUrl: string;
|
|
360
|
-
logoUrl: string;
|
|
361
|
-
explorer: string;
|
|
362
|
-
eip1559: boolean;
|
|
363
|
-
} | {
|
|
364
|
-
id: number;
|
|
365
|
-
name: string;
|
|
366
|
-
shortname: string;
|
|
367
|
-
native: {
|
|
368
|
-
address: string;
|
|
369
|
-
symbol: string;
|
|
370
|
-
decimals: number;
|
|
371
|
-
logoUrl: string;
|
|
372
|
-
};
|
|
373
|
-
wToken: {
|
|
374
|
-
symbol: string;
|
|
375
|
-
address: string;
|
|
376
|
-
decimals: number;
|
|
377
|
-
logoUrl: string;
|
|
378
|
-
};
|
|
379
|
-
publicRpcUrl: string;
|
|
380
|
-
logoUrl: string;
|
|
381
|
-
explorer: string;
|
|
382
|
-
eip1559: boolean;
|
|
383
|
-
} | {
|
|
384
|
-
id: number;
|
|
385
|
-
name: string;
|
|
386
|
-
shortname: string;
|
|
387
|
-
native: {
|
|
388
|
-
address: string;
|
|
389
|
-
symbol: string;
|
|
390
|
-
decimals: number;
|
|
391
|
-
logoUrl: string;
|
|
392
|
-
};
|
|
393
|
-
wToken: {
|
|
394
|
-
symbol: string;
|
|
395
|
-
address: string;
|
|
396
|
-
decimals: number;
|
|
397
|
-
logoUrl: string;
|
|
398
|
-
};
|
|
399
|
-
publicRpcUrl: string;
|
|
400
|
-
logoUrl: string;
|
|
401
|
-
explorer: string;
|
|
402
|
-
eip1559: boolean;
|
|
403
|
-
} | {
|
|
404
|
-
id: number;
|
|
405
|
-
name: string;
|
|
406
|
-
shortname: string;
|
|
407
|
-
native: {
|
|
408
|
-
address: string;
|
|
409
|
-
symbol: string;
|
|
410
|
-
decimals: number;
|
|
411
|
-
logoUrl: string;
|
|
412
|
-
};
|
|
413
|
-
wToken: {
|
|
414
|
-
symbol: string;
|
|
415
|
-
address: string;
|
|
416
|
-
decimals: number;
|
|
417
|
-
logoUrl: string;
|
|
418
|
-
};
|
|
419
|
-
publicRpcUrl: string;
|
|
420
|
-
logoUrl: string;
|
|
421
|
-
explorer: string;
|
|
422
|
-
eip1559: boolean;
|
|
423
|
-
} | {
|
|
424
|
-
id: number;
|
|
425
|
-
name: string;
|
|
426
|
-
shortname: string;
|
|
427
|
-
native: {
|
|
428
|
-
address: string;
|
|
429
|
-
symbol: string;
|
|
430
|
-
decimals: number;
|
|
431
|
-
logoUrl: string;
|
|
432
|
-
};
|
|
433
|
-
wToken: {
|
|
434
|
-
symbol: string;
|
|
435
|
-
address: string;
|
|
436
|
-
decimals: number;
|
|
437
|
-
logoUrl: string;
|
|
438
|
-
};
|
|
439
|
-
publicRpcUrl: string;
|
|
440
|
-
logoUrl: string;
|
|
441
|
-
explorer: string;
|
|
442
|
-
eip1559: boolean;
|
|
443
|
-
} | {
|
|
444
|
-
id: number;
|
|
445
|
-
name: string;
|
|
446
|
-
shortname: string;
|
|
447
|
-
native: {
|
|
448
|
-
address: string;
|
|
449
|
-
symbol: string;
|
|
450
|
-
decimals: number;
|
|
451
|
-
logoUrl: string;
|
|
452
|
-
};
|
|
453
|
-
wToken: {
|
|
454
|
-
symbol: string;
|
|
455
|
-
address: string;
|
|
456
|
-
decimals: number;
|
|
457
|
-
logoUrl: string;
|
|
458
|
-
};
|
|
459
|
-
publicRpcUrl: string;
|
|
460
|
-
logoUrl: string;
|
|
461
|
-
explorer: string;
|
|
462
|
-
eip1559: boolean;
|
|
463
|
-
} | {
|
|
464
|
-
id: number;
|
|
465
|
-
name: string;
|
|
466
|
-
shortname: string;
|
|
467
|
-
native: {
|
|
468
|
-
address: string;
|
|
469
|
-
symbol: string;
|
|
470
|
-
decimals: number;
|
|
471
|
-
logoUrl: string;
|
|
472
|
-
};
|
|
473
|
-
wToken: {
|
|
474
|
-
symbol: string;
|
|
475
|
-
address: string;
|
|
476
|
-
decimals: number;
|
|
477
|
-
logoUrl: string;
|
|
478
|
-
};
|
|
479
|
-
publicRpcUrl: string;
|
|
480
|
-
logoUrl: string;
|
|
481
|
-
explorer: string;
|
|
482
|
-
eip1559: boolean;
|
|
483
|
-
} | {
|
|
484
|
-
id: number;
|
|
485
|
-
name: string;
|
|
486
|
-
shortname: string;
|
|
487
|
-
native: {
|
|
488
|
-
address: string;
|
|
489
|
-
symbol: string;
|
|
490
|
-
decimals: number;
|
|
491
|
-
logoUrl: string;
|
|
492
|
-
};
|
|
493
|
-
wToken: {
|
|
494
|
-
symbol: string;
|
|
495
|
-
address: string;
|
|
496
|
-
decimals: number;
|
|
497
|
-
logoUrl: string;
|
|
498
|
-
};
|
|
499
|
-
publicRpcUrl: string;
|
|
500
|
-
logoUrl: string;
|
|
501
|
-
explorer: string;
|
|
502
|
-
eip1559: boolean;
|
|
503
|
-
} | {
|
|
504
|
-
id: number;
|
|
505
|
-
name: string;
|
|
506
|
-
shortname: string;
|
|
507
|
-
native: {
|
|
508
|
-
address: string;
|
|
509
|
-
symbol: string;
|
|
510
|
-
decimals: number;
|
|
511
|
-
logoUrl: string;
|
|
512
|
-
};
|
|
513
|
-
wToken: {
|
|
514
|
-
symbol: string;
|
|
515
|
-
address: string;
|
|
516
|
-
decimals: number;
|
|
517
|
-
logoUrl: string;
|
|
518
|
-
};
|
|
519
|
-
publicRpcUrl: string;
|
|
520
|
-
logoUrl: string;
|
|
521
|
-
explorer: string;
|
|
522
|
-
eip1559: boolean;
|
|
523
|
-
} | {
|
|
524
|
-
id: number;
|
|
525
|
-
name: string;
|
|
526
|
-
shortname: string;
|
|
527
|
-
native: {
|
|
528
|
-
address: string;
|
|
529
|
-
symbol: string;
|
|
530
|
-
decimals: number;
|
|
531
|
-
logoUrl: string;
|
|
532
|
-
};
|
|
533
|
-
wToken: {
|
|
534
|
-
symbol: string;
|
|
535
|
-
address: string;
|
|
536
|
-
decimals: number;
|
|
537
|
-
logoUrl: string;
|
|
538
|
-
};
|
|
539
|
-
publicRpcUrl: string;
|
|
540
|
-
logoUrl: string;
|
|
541
|
-
explorer: string;
|
|
542
|
-
eip1559: boolean;
|
|
543
|
-
} | undefined;
|
|
544
|
-
export declare const useExplorerLink: (txHash?: string) => string | undefined;
|
|
545
|
-
export declare const useUsdAmount: (amount?: string, usd?: string | number) => string;
|
|
546
|
-
export declare const useShouldOnlyWrap: () => boolean;
|
|
547
|
-
export declare const useShouldUnwrap: () => boolean;
|
|
548
|
-
export declare const useShouldWrapOrUnwrapOnly: () => boolean;
|
|
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;
|
|
549
4
|
//# 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":"AAIA,eAAO,MAAM,WAAW,GAAI,WAAW,MAAM,EAAE,QAAQ,MAAM,WAE5D,CAAC;AAEF,eAAO,MAAM,UAAU,GAAI,kBAAkB,MAAM,wDAIlD,CAAC;AAEF,eAAO,MAAM,eAAe,GAAI,SAAS,MAAM,EAAE,UAAU,MAAM,uBAMhE,CAAC"}
|
|
@@ -1,22 +1,32 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
export
|
|
1
|
+
import { OrderStatus, Order } from '@orbs-network/spot-ui';
|
|
2
|
+
import { CategorizedOrders } from '../order-history-data';
|
|
3
|
+
export type { CategorizedOrders } from '../order-history-data';
|
|
4
|
+
/**
|
|
5
|
+
* Connects the provider store to the account/client-specific history source.
|
|
6
|
+
* This configures fetching but does not start polling; useOrders owns the
|
|
7
|
+
* mounted-consumer subscription that activates it.
|
|
8
|
+
*/
|
|
9
|
+
export declare const useOrdersResource: () => {
|
|
10
|
+
enabled: boolean;
|
|
11
|
+
key: string | undefined;
|
|
12
|
+
refetch: () => Promise<Order[] | undefined>;
|
|
13
|
+
};
|
|
14
|
+
/** Cache commands used by order creation and cancellation flows. */
|
|
4
15
|
export declare const useAddNewOrder: () => (order: Order) => void;
|
|
5
|
-
export declare const useUpdateCachedOrderStatus: () => (
|
|
6
|
-
export declare const
|
|
7
|
-
export
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
export declare const useOrderHistoryPanel: () => {
|
|
11
|
-
orders: {
|
|
12
|
-
all: Order[];
|
|
13
|
-
open: Order[];
|
|
14
|
-
completed: Order[];
|
|
15
|
-
cancelled: Order[];
|
|
16
|
-
expired: Order[];
|
|
17
|
-
};
|
|
16
|
+
export declare const useUpdateCachedOrderStatus: () => (historyKey: string, status: OrderStatus) => void;
|
|
17
|
+
export declare const useRefetchActiveOrders: () => () => Promise<Order[] | undefined>;
|
|
18
|
+
export interface OrdersResult {
|
|
19
|
+
data?: CategorizedOrders;
|
|
20
|
+
error?: Error;
|
|
18
21
|
isLoading: boolean;
|
|
22
|
+
isFetching: boolean;
|
|
19
23
|
isRefetching: boolean;
|
|
20
|
-
|
|
21
|
-
}
|
|
24
|
+
refetch: () => Promise<CategorizedOrders | undefined>;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Public order-history hook. Multiple callers share one provider-owned cache,
|
|
28
|
+
* in-flight request, and polling timer. Polling exists only while at least one
|
|
29
|
+
* caller is mounted.
|
|
30
|
+
*/
|
|
31
|
+
export declare const useOrders: () => OrdersResult;
|
|
22
32
|
//# sourceMappingURL=order-hooks.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"order-hooks.d.ts","sourceRoot":"","sources":["../../../../src/hooks/order-hooks.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
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;AAUhE,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,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Order } from '
|
|
3
|
-
export declare const useCancelOrderRefetchUntilStatusSynced: () =>
|
|
1
|
+
import { ExecutionStatus } from '../types';
|
|
2
|
+
import { Order } from '@orbs-network/spot-ui';
|
|
3
|
+
export declare const useCancelOrderRefetchUntilStatusSynced: () => (historyKey: string) => Promise<void>;
|
|
4
4
|
export type CancelOrderStatus = {
|
|
5
|
-
status:
|
|
5
|
+
status: ExecutionStatus;
|
|
6
6
|
disabled?: boolean;
|
|
7
7
|
txHash?: string;
|
|
8
8
|
error?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-cancel-order.d.ts","sourceRoot":"","sources":["../../../../src/hooks/use-cancel-order.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
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,EAKL,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,cAAc,GAAI,QAAQ,KAAK;;;;;;;;CA0G3C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-disclaimer.d.ts","sourceRoot":"","sources":["../../../../src/hooks/use-disclaimer.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"use-disclaimer.d.ts","sourceRoot":"","sources":["../../../../src/hooks/use-disclaimer.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAGtC,eAAO,MAAM,aAAa,QAAO,UAAU,GAAG,SAY7C,CAAC"}
|
|
@@ -1,27 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { TimeDuration, TimeUnit } from '@orbs-network/spot-ui';
|
|
2
2
|
export declare const useDuration: () => {
|
|
3
|
-
duration: TimeDuration;
|
|
4
|
-
setDuration: (typedDuration: TimeDuration) => void;
|
|
5
|
-
error: {
|
|
6
|
-
type: InputErrors;
|
|
7
|
-
value: number;
|
|
8
|
-
args: {
|
|
9
|
-
duration: string;
|
|
10
|
-
};
|
|
11
|
-
} | undefined;
|
|
12
|
-
};
|
|
13
|
-
export declare const useDurationPanel: () => {
|
|
14
3
|
duration: TimeDuration;
|
|
15
4
|
onChange: (typedDuration: TimeDuration) => void;
|
|
16
5
|
milliseconds: number;
|
|
17
6
|
onInputChange: (value: string) => void;
|
|
18
7
|
onUnitSelect: (unit: TimeUnit) => void;
|
|
19
|
-
error:
|
|
20
|
-
type: InputErrors;
|
|
21
|
-
value: number;
|
|
22
|
-
args: {
|
|
23
|
-
duration: string;
|
|
24
|
-
};
|
|
25
|
-
} | undefined;
|
|
8
|
+
error: import('@orbs-network/spot-ui').InputError | undefined;
|
|
26
9
|
};
|
|
27
10
|
//# sourceMappingURL=use-duration.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-duration.d.ts","sourceRoot":"","sources":["../../../../src/hooks/use-duration.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
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;AAMpE,eAAO,MAAM,WAAW;;8BAMJ,YAAY;;2BAQpB,MAAM;yBASP,QAAQ;;CAiBlB,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { ExecutionPhase, ExecutionStatus, ParsedError, Steps, Token } from '../types';
|
|
2
|
+
export interface SpotExecutionData {
|
|
3
|
+
phase: ExecutionPhase;
|
|
4
|
+
status?: ExecutionStatus;
|
|
5
|
+
error?: ParsedError;
|
|
6
|
+
currentStep?: Steps;
|
|
7
|
+
currentStepIndex?: number;
|
|
8
|
+
approvalTxHash?: string;
|
|
9
|
+
wrapTxHash?: string;
|
|
10
|
+
totalSteps?: number;
|
|
11
|
+
executionSteps?: Steps[];
|
|
12
|
+
inputToken?: Token;
|
|
13
|
+
outputToken?: Token;
|
|
14
|
+
chainId?: number;
|
|
15
|
+
submitOrder: () => void;
|
|
16
|
+
startNewOrder: () => boolean;
|
|
17
|
+
returnToOrderForm: () => boolean;
|
|
18
|
+
isExecuting: boolean;
|
|
19
|
+
isSuccess: boolean;
|
|
20
|
+
isFailed: boolean;
|
|
21
|
+
isRejected: boolean;
|
|
22
|
+
isPreparingOrder: boolean;
|
|
23
|
+
canDismiss: boolean;
|
|
24
|
+
}
|
|
25
|
+
export declare const useExecution: () => SpotExecutionData;
|
|
26
|
+
export declare const useSubmitButton: () => {
|
|
27
|
+
disabled: boolean;
|
|
28
|
+
loading: boolean;
|
|
29
|
+
};
|
|
30
|
+
//# sourceMappingURL=use-execution.d.ts.map
|