Required validators >= num owners (#6551)
This commit is contained in:
parent
f38d34919b
commit
8a21cde188
@ -281,6 +281,12 @@ export default class CreateWalletStore {
|
|||||||
const daylimitValidation = validateUint(_wallet.daylimit);
|
const daylimitValidation = validateUint(_wallet.daylimit);
|
||||||
const nameValidation = validateName(_wallet.name);
|
const nameValidation = validateName(_wallet.name);
|
||||||
|
|
||||||
|
const owners = _wallet.owners.filter((owner) => !/^(0x)?0*$/.test(owner));
|
||||||
|
|
||||||
|
if (_wallet.required > owners.length) {
|
||||||
|
requiredValidation.valueError = 'the number of required validators should be lower or equal the number of owners';
|
||||||
|
}
|
||||||
|
|
||||||
const errors = {
|
const errors = {
|
||||||
address: addressValidation.addressError,
|
address: addressValidation.addressError,
|
||||||
account: accountValidation.addressError,
|
account: accountValidation.addressError,
|
||||||
|
Loading…
Reference in New Issue
Block a user