-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TOK-515: include halted builders (#430)
* refactor: get all builders * refactor: include halted gauges * refactor: pr comments * chore: prettier
- Loading branch information
1 parent
beaa8e7
commit b4845d8
Showing
10 changed files
with
102 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { BuilderStateFlags } from '../types' | ||
|
||
export const isBuilderOperational = (stateFlags?: BuilderStateFlags) => { | ||
return !!(stateFlags && stateFlags.communityApproved && stateFlags.kycApproved && !stateFlags.paused) | ||
} | ||
|
||
const inactiveStates = ['Deactivated', 'KYCRevoked', 'Revoked', 'Paused'] as const | ||
type InactiveState = (typeof inactiveStates)[number] | ||
export const getBuilderInactiveState = (state: BuilderStateFlags): InactiveState => { | ||
if (!state.communityApproved) return 'Deactivated' | ||
if (!state.kycApproved) return 'KYCRevoked' | ||
if (state.revoked) return 'Revoked' | ||
return 'Paused' | ||
} |