Small threshold adjustments (#3473)
This commit is contained in:
parent
344940e3c3
commit
96aa37f646
@ -91,7 +91,7 @@ export default React.memo(styled(Grouping)`
|
||||
display: block;
|
||||
|
||||
> li:hover {
|
||||
background: transparent;
|
||||
background: rgba(255, 255, 255, 0.5);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -3,35 +3,36 @@
|
||||
// of the Apache-2.0 license. See the LICENSE file for details.
|
||||
|
||||
import { ApiPromise } from '@polkadot/api';
|
||||
import { POLKADOT_GENESIS, KULUPU_GENESIS } from '@polkadot/apps-config/api/constants';
|
||||
import { POLKADOT_GENESIS, KULUPU_GENESIS, KUSAMA_GENESIS } from '@polkadot/apps-config/api/constants';
|
||||
|
||||
const PROPOSE_THRESHOLDS: Record<string, number> = {
|
||||
// Kulupu
|
||||
[KULUPU_GENESIS]: 1,
|
||||
// Polkadot
|
||||
[POLKADOT_GENESIS]: 0.6
|
||||
[KUSAMA_GENESIS]: 0.5,
|
||||
[POLKADOT_GENESIS]: 0.6,
|
||||
default: 0.5
|
||||
};
|
||||
|
||||
const SLASH_THRESHOLDS: Record<string, number> = {
|
||||
// Polkadot
|
||||
[POLKADOT_GENESIS]: 0.75
|
||||
[KUSAMA_GENESIS]: 0.5,
|
||||
[POLKADOT_GENESIS]: 0.75,
|
||||
default: 0.5
|
||||
};
|
||||
|
||||
const TREASURY_THRESHOLDS: Record<string, number> = {
|
||||
// Kulupu
|
||||
[KULUPU_GENESIS]: 0.8,
|
||||
// Polkadot
|
||||
[POLKADOT_GENESIS]: 0.6
|
||||
[KUSAMA_GENESIS]: 0.6,
|
||||
[POLKADOT_GENESIS]: 0.6,
|
||||
default: 0.6
|
||||
};
|
||||
|
||||
export function getThreshold (api: ApiPromise): number {
|
||||
return PROPOSE_THRESHOLDS[api.genesisHash.toHex()] || 0.5;
|
||||
return PROPOSE_THRESHOLDS[api.genesisHash.toHex()] || PROPOSE_THRESHOLDS.default;
|
||||
}
|
||||
|
||||
export function getSlashThreshold (api: ApiPromise): number {
|
||||
return SLASH_THRESHOLDS[api.genesisHash.toHex()] || 0.5;
|
||||
return SLASH_THRESHOLDS[api.genesisHash.toHex()] || SLASH_THRESHOLDS.default;
|
||||
}
|
||||
|
||||
export function getTreasuryThreshold (api: ApiPromise): number {
|
||||
return TREASURY_THRESHOLDS[api.genesisHash.toHex()] || 0.6;
|
||||
return TREASURY_THRESHOLDS[api.genesisHash.toHex()] || TREASURY_THRESHOLDS.default;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user