Skip to content

Commit

Permalink
onboarding: limit multisig N to max 15
Browse files Browse the repository at this point in the history
  • Loading branch information
rithvikvibhu committed Jan 25, 2023
1 parent 01b0a1a commit 8b07f70
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
9 changes: 8 additions & 1 deletion app/pages/Onboarding/SelectWalletType/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export default class SelectWalletType extends Component {
});
return;
}
if (isNaN(mNum) || nNum <= 0) {
if (isNaN(nNum) || nNum <= 0) {
this.setState({
nError: t('obSelectWalletTypeErrorPositive'),
});
Expand All @@ -66,6 +66,13 @@ export default class SelectWalletType extends Component {
return;
}

if (nNum > 15) {
this.setState({
nError: t('obSelectWalletTypeErrorLarge', 15),
});
return;
}

this.props.onNext(mNum, nNum);
return;
};
Expand Down
1 change: 1 addition & 0 deletions locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,7 @@
"obSelectWalletTypeBody2": "Leave this unchecked to create a regular wallet.",
"obSelectWalletTypeCheckbox": "Create a multisig wallet?",
"obSelectWalletTypeErrorPositive": "Must be a positive integer.",
"obSelectWalletTypeErrorLarge": "Total number of signatures cannot be more than %s.",
"obSelectWalletTypeErrorLimits": "Minimum number of signatures cannot be more than total.",
"obSelectWalletTypeMinimum": "Minimum (M)",
"obSelectWalletTypeSignatures": "signatures",
Expand Down

0 comments on commit 8b07f70

Please sign in to comment.