Skip to content

Commit

Permalink
fixed issue with oracle returning floats
Browse files Browse the repository at this point in the history
  • Loading branch information
cmd committed Jan 25, 2024
1 parent 718b087 commit d81ee65
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/lib/oracle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,10 @@ export async function fee_estimates (
const json = await resolve_json<OracleFeeEstimate>(res)
// If the response failed, throw.
if (!json.ok) throw new Error(json.error)
// Return the parsed data.
return json.data
// Return the parsed data with rounded values.
const ent = Object.entries(json.data)
const rnd = ent.map(([ k, v ]) => [ [ k, Math.ceil(v)] ])
return Object.fromEntries(rnd)
}

/**
Expand Down

0 comments on commit d81ee65

Please sign in to comment.