Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix oracle actions #832

Merged
merged 1 commit into from
Aug 25, 2022
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
6 changes: 1 addition & 5 deletions renderer/pages/oracles/view.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ import {
hasQuorum,
hasWinner,
humanError,
isAllowedToTerminate,
mapVotingStatus,
quorumVotesCount,
sumAccountableVotes,
Expand Down Expand Up @@ -162,7 +161,6 @@ export default function ViewVotingPage() {
estimatedOracleReward,
estimatedMaxOracleReward = estimatedOracleReward,
isOracle,
estimatedTerminationTime,
minOracleReward,
estimatedTotalReward,
epochWithoutGrowth,
Expand Down Expand Up @@ -199,8 +197,6 @@ export default function ViewVotingPage() {
const isVotingFailed =
!didReachQuorum && epochWithoutGrowth >= 3 && !canProlong

const shouldTerminate = isAllowedToTerminate({estimatedTerminationTime})

const isMaxWinnerThreshold = winnerThreshold === 100

const accountableVoteCount = sumAccountableVotes(votes)
Expand Down Expand Up @@ -507,7 +503,7 @@ export default function ViewVotingPage() {
VotingStatus.Terminated,
VotingStatus.Terminating
) &&
shouldTerminate && (
canTerminate && (
<PrimaryButton
variantColor="red"
onClick={() => send('TERMINATE')}
Expand Down
2 changes: 1 addition & 1 deletion renderer/screens/oracles/hooks.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ async function loadActions(id, from) {
async function checkAction(fn) {
try {
const result = await fn
return !!result?.receipt?.success
return !!result?.success
} catch (e) {
return false
}
Expand Down