diff --git a/servers/cu/package-lock.json b/servers/cu/package-lock.json index 68eca9197..a0370ba2e 100644 --- a/servers/cu/package-lock.json +++ b/servers/cu/package-lock.json @@ -9,7 +9,7 @@ "version": "1.0.0", "dependencies": { "@permaweb/ao-loader": "0.0.12", - "@permaweb/ao-scheduler-utils": "^0.0.5", + "@permaweb/ao-scheduler-utils": "^0.0.7", "arweave": "^1.14.4", "cors": "^2.8.5", "dataloader": "^2.2.2", @@ -52,11 +52,11 @@ } }, "node_modules/@permaweb/ao-scheduler-utils": { - "version": "0.0.5", - "resolved": "https://registry.npmjs.org/@permaweb/ao-scheduler-utils/-/ao-scheduler-utils-0.0.5.tgz", - "integrity": "sha512-ssO7RXyL6L+pSbq8S0Rtwa5HCXHqdv+xuQrRka/IEWVOF22t7ZbAmskAv1uxesVp62pBk3OIFWAjGXnhnn4b7g==", + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/@permaweb/ao-scheduler-utils/-/ao-scheduler-utils-0.0.7.tgz", + "integrity": "sha512-N3pAin4FC+p9WF8WwSR4K6uSyEXTVMFuFiijscwf70MlY03egxeVy91FdXqF4kGOtx1matcXEzseOUjqypkXlQ==", "dependencies": { - "mnemonist": "^0.39.6", + "lru-cache": "^10.1.0", "ramda": "^0.29.1" }, "engines": { @@ -1122,14 +1122,6 @@ "node": "*" } }, - "node_modules/mnemonist": { - "version": "0.39.6", - "resolved": "https://registry.npmjs.org/mnemonist/-/mnemonist-0.39.6.tgz", - "integrity": "sha512-A/0v5Z59y63US00cRSLiloEIw3t5G+MiKz4BhX21FI+YBJXBOGW0ohFxTxO08dsOYlzxo87T7vGfZKYp2bcAWA==", - "dependencies": { - "obliterator": "^2.0.1" - } - }, "node_modules/ms": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", @@ -1250,11 +1242,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/obliterator": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/obliterator/-/obliterator-2.0.4.tgz", - "integrity": "sha512-lgHwxlxV1qIg1Eap7LgIeoBWIMFibOjbrYPIPJZcI1mmGAI2m3lNYpK12Y+GBdPQ0U1hRwSord7GIaawz962qQ==" - }, "node_modules/on-finished": { "version": "2.4.1", "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", @@ -2088,11 +2075,11 @@ "integrity": "sha512-ttYTYds0bxf4JDV4kwg/lJWBOaR5x6Mibm0KBXrOL5b8KOlqBwQhZhQE8lFKkzRp8iY/bXZLeb82DUDBn88AHA==" }, "@permaweb/ao-scheduler-utils": { - "version": "0.0.5", - "resolved": "https://registry.npmjs.org/@permaweb/ao-scheduler-utils/-/ao-scheduler-utils-0.0.5.tgz", - "integrity": "sha512-ssO7RXyL6L+pSbq8S0Rtwa5HCXHqdv+xuQrRka/IEWVOF22t7ZbAmskAv1uxesVp62pBk3OIFWAjGXnhnn4b7g==", + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/@permaweb/ao-scheduler-utils/-/ao-scheduler-utils-0.0.7.tgz", + "integrity": "sha512-N3pAin4FC+p9WF8WwSR4K6uSyEXTVMFuFiijscwf70MlY03egxeVy91FdXqF4kGOtx1matcXEzseOUjqypkXlQ==", "requires": { - "mnemonist": "^0.39.6", + "lru-cache": "^10.1.0", "ramda": "^0.29.1" } }, @@ -2883,14 +2870,6 @@ "brace-expansion": "^1.1.7" } }, - "mnemonist": { - "version": "0.39.6", - "resolved": "https://registry.npmjs.org/mnemonist/-/mnemonist-0.39.6.tgz", - "integrity": "sha512-A/0v5Z59y63US00cRSLiloEIw3t5G+MiKz4BhX21FI+YBJXBOGW0ohFxTxO08dsOYlzxo87T7vGfZKYp2bcAWA==", - "requires": { - "obliterator": "^2.0.1" - } - }, "ms": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", @@ -2967,11 +2946,6 @@ "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.3.tgz", "integrity": "sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==" }, - "obliterator": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/obliterator/-/obliterator-2.0.4.tgz", - "integrity": "sha512-lgHwxlxV1qIg1Eap7LgIeoBWIMFibOjbrYPIPJZcI1mmGAI2m3lNYpK12Y+GBdPQ0U1hRwSord7GIaawz962qQ==" - }, "on-finished": { "version": "2.4.1", "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", diff --git a/servers/cu/package.json b/servers/cu/package.json index 2909c8d99..7cd740fe4 100644 --- a/servers/cu/package.json +++ b/servers/cu/package.json @@ -14,7 +14,7 @@ }, "dependencies": { "@permaweb/ao-loader": "0.0.12", - "@permaweb/ao-scheduler-utils": "^0.0.5", + "@permaweb/ao-scheduler-utils": "^0.0.7", "arweave": "^1.14.4", "cors": "^2.8.5", "dataloader": "^2.2.2", diff --git a/servers/cu/src/domain/client/ao-su.js b/servers/cu/src/domain/client/ao-su.js index 53a8ec4a6..0ba41c761 100644 --- a/servers/cu/src/domain/client/ao-su.js +++ b/servers/cu/src/domain/client/ao-su.js @@ -133,7 +133,15 @@ export const loadMessagesWith = ({ fetch, logger: _logger, pageSize }) => { Epoch: path(['epoch']), Nonce: path(['nonce']), Timestamp: path(['timestamp']), - 'Block-Height': path(['block']), + 'Block-Height': pipe( + /** + * Returns a left padded integer like '000001331218' + * + * So use parseInt to convert it into a number + */ + path(['block']), + (str) => parseInt(`${str}`) + ), 'Hash-Chain': path(['hash_chain']), Cron: always(false) }), diff --git a/servers/cu/src/domain/model.js b/servers/cu/src/domain/model.js index 07a389b7b..263f59282 100644 --- a/servers/cu/src/domain/model.js +++ b/servers/cu/src/domain/model.js @@ -128,7 +128,7 @@ export const evaluationSchema = z.object({ messageId: z.string().min(1).optional(), timestamp: z.coerce.number(), ordinate: z.coerce.string(), - blockHeight: z.number(), + blockHeight: z.coerce.number(), /** * Scheduled messages do not have a cron */