mirror of
https://github.com/mempool/mempool.git
synced 2025-09-20 15:10:50 +02:00
fix sub sat charts
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
export const defaultMempoolFeeColors = [
|
||||
'557d00',
|
||||
'557d00',
|
||||
'5d7d01',
|
||||
'637d02',
|
||||
@@ -40,6 +41,7 @@ export const defaultMempoolFeeColors = [
|
||||
];
|
||||
|
||||
export const contrastMempoolFeeColors = [
|
||||
'0082e6',
|
||||
'0082e6',
|
||||
'0984df',
|
||||
'1285d9',
|
||||
@@ -81,6 +83,7 @@ export const contrastMempoolFeeColors = [
|
||||
];
|
||||
|
||||
export const chartColors = [
|
||||
"#D81B60",
|
||||
"#D81B60",
|
||||
"#8E24AA",
|
||||
"#5E35B1",
|
||||
@@ -125,7 +128,7 @@ export const poolsColor = {
|
||||
'unknown': '#FDD835',
|
||||
};
|
||||
|
||||
export const feeLevels = [0, 2, 3, 4, 5, 6, 8, 10, 12, 15, 20, 30, 40, 50, 60, 70, 80, 90, 100, 125, 150, 175, 200,
|
||||
export const feeLevels = [0, 1, 2, 3, 4, 5, 6, 8, 10, 12, 15, 20, 30, 40, 50, 60, 70, 80, 90, 100, 125, 150, 175, 200,
|
||||
250, 300, 350, 400, 500, 600, 700, 800, 900, 1000, 1200, 1400, 1600, 1800, 2000];
|
||||
|
||||
export interface Language {
|
||||
|
@@ -153,7 +153,7 @@ export class AcceleratorDashboardComponent implements OnInit, OnDestroy {
|
||||
return acceleratedColor;
|
||||
} else {
|
||||
const rate = tx.fee / tx.vsize; // color by simple single-tx fee rate
|
||||
const feeLevelIndex = feeLevels.findIndex((feeLvl) => Math.max(1, rate) < feeLvl) - 1;
|
||||
const feeLevelIndex = feeLevels.findIndex((feeLvl) => Math.max(0, rate) < feeLvl) - 1;
|
||||
return this.theme.theme === 'contrast' || this.theme.theme === 'bukele' ? contrastColors[feeLevelIndex] || contrastColors[contrastColors.length - 1] : normalColors[feeLevelIndex] || normalColors[normalColors.length - 1];
|
||||
}
|
||||
}
|
||||
|
@@ -65,7 +65,7 @@ const defaultColors: { [key: string]: ColorPalette } = {
|
||||
base: defaultMempoolFeeColors.map(hexToColor),
|
||||
audit: [],
|
||||
marginal: [],
|
||||
baseLevel: (tx: TxView, rate: number) => feeLevels.findIndex((feeLvl) => Math.max(1, rate) < feeLvl) - 1
|
||||
baseLevel: (tx: TxView, rate: number) => feeLevels.findIndex((feeLvl) => Math.max(0, rate) < feeLvl) - 1
|
||||
},
|
||||
}
|
||||
for (const key in defaultColors) {
|
||||
@@ -96,7 +96,7 @@ const contrastColors: { [key: string]: ColorPalette } = {
|
||||
base: contrastMempoolFeeColors.map(hexToColor),
|
||||
audit: [],
|
||||
marginal: [],
|
||||
baseLevel: (tx: TxView, rate: number) => feeLevels.findIndex((feeLvl) => Math.max(1, rate) < feeLvl) - 1
|
||||
baseLevel: (tx: TxView, rate: number) => feeLevels.findIndex((feeLvl) => Math.max(0, rate) < feeLvl) - 1
|
||||
},
|
||||
}
|
||||
for (const key in contrastColors) {
|
||||
|
Reference in New Issue
Block a user