Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: patch @semaphore-protocol/data to return result sorted by timestamp #492

Merged
merged 5 commits into from
Apr 30, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions .yarn/patches/@semaphore-protocol-data-npm-3.10.0-48e6c0f59e.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
diff --git a/dist/index.mjs b/dist/index.mjs
index 614a9093f82e9ae8e9219b65af0a8e93ea992560..f35cadc1c3623e2209c261ddde6c678442079522 100644
--- a/dist/index.mjs
+++ b/dist/index.mjs
@@ -1137,7 +1137,7 @@ var SemaphoreSubgraph = /** @class */ (function () {
filterFragments.push("timestamp_lte: \"".concat(jsDateToGraphqlDate(timestampLte), "\""));
}
if (filterFragments.length > 0) {
- filtersQuery = "(where: {".concat(filterFragments.join(", "), "})");
+ filtersQuery = "(orderBy:timestamp, orderDirection:desc, where: {".concat(filterFragments.join(", "), "})");
waddaboo marked this conversation as resolved.
Show resolved Hide resolved
}
}
config = {
diff --git a/dist/index.node.js b/dist/index.node.js
index 29640ebef31511af5ee5ff7e970c74e1fa0bc98e..14617cb0dab0fc92de298b6e572a70215d36bf43 100644
--- a/dist/index.node.js
+++ b/dist/index.node.js
@@ -1145,7 +1145,7 @@ var SemaphoreSubgraph = /** @class */ (function () {
filterFragments.push("timestamp_lte: \"".concat(jsDateToGraphqlDate(timestampLte), "\""));
}
if (filterFragments.length > 0) {
- filtersQuery = "(where: {".concat(filterFragments.join(", "), "})");
+ filtersQuery = "(orderBy:timestamp, orderDirection:desc, where: {".concat(filterFragments.join(", "), "})");
waddaboo marked this conversation as resolved.
Show resolved Hide resolved
}
}
config = {
2 changes: 1 addition & 1 deletion apps/dashboard/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"@emotion/styled": "^11.10.6",
"@fontsource-variable/unbounded": "^5.0.5",
"@rainbow-me/rainbowkit": "^0.12.8",
"@semaphore-protocol/data": "3.10.0",
"@semaphore-protocol/data": "patch:@semaphore-protocol/data@npm%3A3.10.0#~/.yarn/patches/@semaphore-protocol-data-npm-3.10.0-48e6c0f59e.patch",
"ethers": "5.5.1",
"framer-motion": "^10.0.1",
"react": "^18.2.0",
Expand Down
13 changes: 12 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7440,6 +7440,17 @@ __metadata:
languageName: node
linkType: hard

"@semaphore-protocol/data@patch:@semaphore-protocol/data@npm%3A3.10.0#~/.yarn/patches/@semaphore-protocol-data-npm-3.10.0-48e6c0f59e.patch":
version: 3.10.0
resolution: "@semaphore-protocol/data@patch:@semaphore-protocol/data@npm%3A3.10.0#~/.yarn/patches/@semaphore-protocol-data-npm-3.10.0-48e6c0f59e.patch::version=3.10.0&hash=a89166"
dependencies:
"@ethersproject/contracts": "npm:^5.7.0"
"@ethersproject/providers": "npm:^5.7.0"
axios: "npm:^0.27.2"
checksum: 10/9da8fde3d53db4a4b6abf712e35cf1ec1438860eb92170c56a13b4a58ccef0d4eb7df3ab7d470d6ecbf255e5704f0556b71e593580e625142fa01abbbfc1c9b3
languageName: node
linkType: hard

"@semaphore-protocol/group@npm:3.10.0":
version: 3.10.0
resolution: "@semaphore-protocol/group@npm:3.10.0"
Expand Down Expand Up @@ -13955,7 +13966,7 @@ __metadata:
"@emotion/styled": "npm:^11.10.6"
"@fontsource-variable/unbounded": "npm:^5.0.5"
"@rainbow-me/rainbowkit": "npm:^0.12.8"
"@semaphore-protocol/data": "npm:3.10.0"
"@semaphore-protocol/data": "patch:@semaphore-protocol/data@npm%3A3.10.0#~/.yarn/patches/@semaphore-protocol-data-npm-3.10.0-48e6c0f59e.patch"
"@types/react": "npm:^18.0.27"
"@types/react-dom": "npm:^18.0.10"
"@vitejs/plugin-react": "npm:^3.1.0"
Expand Down