Skip to content

Commit

Permalink
Update minOwnerDeposit calculation (#839)
Browse files Browse the repository at this point in the history
  • Loading branch information
ridenaio authored Aug 30, 2022
1 parent e22becc commit 78ede80
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions renderer/screens/oracles/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,8 @@ export function getUrls(text) {
export const sumAccountableVotes = votes =>
votes?.reduce((agg, curr) => agg + curr?.count, 0) ?? 0

export const minOwnerDeposit = (networkSize, commiteeSize) => {
if (networkSize === commiteeSize) return 5000
return (Math.ceil((5000 / networkSize) * 10000) / 10000) * commiteeSize
}
export const minOwnerDeposit = (networkSize, commiteeSize) =>
Math.min(
5000,
(Math.ceil((5000 / networkSize) * 10000) / 10000) * commiteeSize
)

0 comments on commit 78ede80

Please sign in to comment.