Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
5 changes: 5 additions & 0 deletions .changeset/fix-koios-epoch-params-ordering.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@evolution-sdk/evolution": patch
---

Fix Koios `getProtocolParameters` returning stale epoch data on preview by explicitly ordering `epoch_params` descending
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import * as _Ogmios from "./Ogmios.js"

export const getProtocolParameters = (baseUrl: string, token?: string) =>
Effect.gen(function* () {
const url = `${baseUrl}/epoch_params?limit=1`
const url = `${baseUrl}/epoch_params?limit=1&order=epoch_no.desc`
const schema = Schema.Array(_Koios.ProtocolParametersSchema)
const bearerToken = token ? { Authorization: `Bearer ${token}` } : undefined
const [result] = yield* pipe(
Expand Down
Loading