Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Commit

Permalink
Required validators >= num owners (#6551)
Browse files Browse the repository at this point in the history
  • Loading branch information
ngotchac authored and gavofyork committed Sep 19, 2017
1 parent f38d349 commit 8a21cde
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions js/src/modals/CreateWallet/createWalletStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,12 @@ export default class CreateWalletStore {
const daylimitValidation = validateUint(_wallet.daylimit);
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 = {
address: addressValidation.addressError,
account: accountValidation.addressError,
Expand Down

0 comments on commit 8a21cde

Please sign in to comment.