diff --git a/src/app/components/Settings.tsx b/src/app/components/Settings.tsx index 16858fc..5c9fa0a 100644 --- a/src/app/components/Settings.tsx +++ b/src/app/components/Settings.tsx @@ -42,10 +42,22 @@ class Settings extends Component { password: settings.password, accessManaPledgeID: settings.accessManaPledgeID, consensusManaPledgeID: settings.consensusManaPledgeID, + gofConfThreshold: settings.gofConfThreshold, isBusy: false }); } + private static imposeMinMax(el: HTMLInputElement): void { + if (el.value !== "") { + if (parseInt(el.value) < parseInt(el.min)) { + el.value = el.min; + } + if (parseInt(el.value) > parseInt(el.max)) { + el.value = el.max; + } + } + } + /** * Render the component. * @returns The node to render. @@ -139,6 +151,23 @@ class Settings extends Component { onChange={e => this.setState({ consensusManaPledgeID: e.target.value })} /> +
+ Grade Of Finality for confirmation +
+
+ { + Settings.imposeMinMax(e.target); + this.setState({ gofConfThreshold: e.target.valueAsNumber }); + } + } + /> +