diff --git a/packages/types/src/ValidatorPrefs.ts b/packages/types/src/ValidatorPrefs.ts index 4d7ea73205..1ff476c21c 100644 --- a/packages/types/src/ValidatorPrefs.ts +++ b/packages/types/src/ValidatorPrefs.ts @@ -4,6 +4,7 @@ import { AnyNumber } from './types'; +import Compact from './codec/Compact'; import Struct from './codec/Struct'; import Balance from './Balance'; import U32 from './U32'; @@ -22,7 +23,7 @@ export default class ValidatorPrefs extends Struct { constructor (value?: ValidatorPrefsValue | Uint8Array) { super({ unstakeThreshold: U32, - validatorPayment: Balance + validatorPayment: Compact.with(Balance) }, value); } @@ -34,9 +35,9 @@ export default class ValidatorPrefs extends Struct { } /** - * @description The payment config for the validator as [[Balance]] + * @description The payment config for the validator as a [[Compact]] [[Balance]] */ - get validatorPayment (): Balance { - return this.get('validatorPayment') as Balance; + get validatorPayment (): Compact { + return this.get('validatorPayment') as Compact; } }