@@ -27,7 +27,7 @@ import {
27
27
} from './types' ;
28
28
import { Cardano , StakePoolStats } from '@cardano-sdk/core' ;
29
29
import { Hash32ByteBase16 } from '@cardano-sdk/crypto' ;
30
- import { bufferToHexString , isNotNil } from '@cardano-sdk/util' ;
30
+ import { Percent , bufferToHexString , isNotNil } from '@cardano-sdk/util' ;
31
31
import Fraction from 'fraction.js' ;
32
32
33
33
const getPoolStatus = (
@@ -65,7 +65,7 @@ export const calcNodeMetricsValues = (metrics: PoolMetrics['metrics'], apy?: num
65
65
const isZeroStake = liveStake === 0n ;
66
66
const size : Cardano . StakePoolMetricsSize = {
67
67
active : activeStakePercentage ,
68
- live : Cardano . Percent ( ! isZeroStake ? 1 - activeStakePercentage : 0 )
68
+ live : Percent ( ! isZeroStake ? 1 - activeStakePercentage : 0 )
69
69
} ;
70
70
const stake : Cardano . StakePoolMetricsStake = {
71
71
active : activeStake ,
@@ -245,12 +245,12 @@ export const mapPoolMetrics = (poolMetricsModel: PoolMetricsModel): PoolMetrics
245
245
hashId : Number ( poolMetricsModel . pool_hash_id ) ,
246
246
metrics : {
247
247
activeStake : BigInt ( poolMetricsModel . active_stake ) ,
248
- activeStakePercentage : Cardano . Percent ( Number ( poolMetricsModel . active_stake_percentage ) ) ,
248
+ activeStakePercentage : Percent ( Number ( poolMetricsModel . active_stake_percentage ) ) ,
249
249
blocksCreated : poolMetricsModel . blocks_created ,
250
250
delegators : poolMetricsModel . delegators ,
251
251
livePledge : BigInt ( poolMetricsModel . live_pledge ) ,
252
252
liveStake : BigInt ( poolMetricsModel . live_stake ) ,
253
- saturation : Cardano . Percent ( Number . parseFloat ( poolMetricsModel . saturation ) )
253
+ saturation : Percent ( Number . parseFloat ( poolMetricsModel . saturation ) )
254
254
}
255
255
} ) ;
256
256
0 commit comments