Skip to content

Commit

Permalink
Merge pull request #492 from waddaboo/issue-433
Browse files Browse the repository at this point in the history
refactor: patch @semaphore-protocol/data to return result sorted by timestamp
  • Loading branch information
vplasencia authored Apr 30, 2024
2 parents 51a32fb + 9846f52 commit a5d073b
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 2 deletions.
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(", "), "})");
}
}
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(", "), "})");
}
}
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=ea766a"
dependencies:
"@ethersproject/contracts": "npm:^5.7.0"
"@ethersproject/providers": "npm:^5.7.0"
axios: "npm:^0.27.2"
checksum: 10/c760b945d59219776cb5201dedcae5390d4cb360487c6ff5b752d0058b43753318f941b4f3a1e799d9f6871ad2535a72a5574242c034d0fdfdcaea8685bef658
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

0 comments on commit a5d073b

Please sign in to comment.