ValidatorPrefs has Compact<Balance> (#604)

This commit is contained in:
Jaco Greeff
2019-01-21 10:29:09 +01:00
committed by GitHub
parent 508e3bfa94
commit 0d29925406
+5 -4
View File
@@ -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;
}
}