Skip to content
This repository was archived by the owner on Jun 17, 2025. It is now read-only.

Commit d81ee65

Browse files
author
cmd
committed
fixed issue with oracle returning floats
1 parent 718b087 commit d81ee65

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/lib/oracle.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,8 +172,10 @@ export async function fee_estimates (
172172
const json = await resolve_json<OracleFeeEstimate>(res)
173173
// If the response failed, throw.
174174
if (!json.ok) throw new Error(json.error)
175-
// Return the parsed data.
176-
return json.data
175+
// Return the parsed data with rounded values.
176+
const ent = Object.entries(json.data)
177+
const rnd = ent.map(([ k, v ]) => [ [ k, Math.ceil(v)] ])
178+
return Object.fromEntries(rnd)
177179
}
178180

179181
/**

0 commit comments

Comments
 (0)