@0xmonaco/react 1.0.29 → 1.0.32
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.
|
@@ -53,7 +53,9 @@ export const useProfile = () => {
|
|
|
53
53
|
sdk.profile.getProfile(),
|
|
54
54
|
sdk.profile.getUserBalances({ pageSize: DEFAULT_PAGE_SIZE, page: 1 }),
|
|
55
55
|
sdk.profile.getPaginatedUserMovements({ page: 1, pageSize: DEFAULT_PAGE_SIZE }),
|
|
56
|
-
|
|
56
|
+
// Cursor mode (pageToken "") reads the newest orders; legacy
|
|
57
|
+
// page-number mode is deprecated.
|
|
58
|
+
sdk.trading.getPaginatedOrders({ pageSize: DEFAULT_PAGE_SIZE, pageToken: "" }),
|
|
57
59
|
]);
|
|
58
60
|
const userProfile = getSettledValueOrThrow(userProfileResult);
|
|
59
61
|
const balances = getFulfilledValue(balancesResult);
|
|
@@ -21,9 +21,11 @@ export function useUserOrders(maxOrders = 50) {
|
|
|
21
21
|
return;
|
|
22
22
|
setLoading(true);
|
|
23
23
|
try {
|
|
24
|
+
// Cursor mode (pageToken "") reads the newest rows first, which is all
|
|
25
|
+
// this hook needs; legacy page-number mode is deprecated.
|
|
24
26
|
const response = await sdk.trading.getPaginatedOrders({
|
|
25
|
-
page: 1,
|
|
26
27
|
pageSize: maxOrders,
|
|
28
|
+
pageToken: "",
|
|
27
29
|
});
|
|
28
30
|
// Combine latest_orders (from the live engine cache) with orders (from PostgreSQL)
|
|
29
31
|
// latest_orders contains real-time data that may not yet be in PostgreSQL
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@0xmonaco/react",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.32",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
"lint": "biome lint ."
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@0xmonaco/core": "1.0.
|
|
24
|
-
"@0xmonaco/types": "1.0.
|
|
23
|
+
"@0xmonaco/core": "1.0.32",
|
|
24
|
+
"@0xmonaco/types": "1.0.32"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"@types/react": "^19.1.12",
|