Skip to content

Commit

Permalink
feat: Add the "accepted" BlockState case (missing from SDK atm)
Browse files Browse the repository at this point in the history
  • Loading branch information
msarcev committed Feb 2, 2024
1 parent c80d7cb commit 06e63b8
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions client/src/features/visualizer-threejs/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,14 @@ export const ANIMATION_TIME_SECONDS = 3;

// colors
export const PENDING_BLOCK_COLOR = new Color("#A6C3FC");
export const APPROVED_BLOCK_COLOR = new Color("#0000DB");
export const ACCEPTED_BLOCK_COLOR = new Color("#0101AB");
export const CONFIRMED_BLOCK_COLOR = new Color("#0000DB");
export const FINALIZED_BLOCK_COLOR = new Color("#0101FF");
export const BLOCK_STATE_TO_COLOR = new Map<BlockState, Color>([
// TODO Remove accepted state once is added to the SDK (missing)
export const BLOCK_STATE_TO_COLOR = new Map<BlockState | "accepted", Color>([
["pending", PENDING_BLOCK_COLOR],
["confirmed", APPROVED_BLOCK_COLOR],
["accepted", ACCEPTED_BLOCK_COLOR],
["confirmed", CONFIRMED_BLOCK_COLOR],
["finalized", FINALIZED_BLOCK_COLOR],
]);

Expand Down

0 comments on commit 06e63b8

Please sign in to comment.