bugfix (not done)

This commit is contained in:
Brandon Thomas committed 2022-02-24 05:32:58 -05:00
1 parent 4b97683a84
commit 854f6a852f
1 file changed
+1 -11
@@ -57,7 +57,7 @@ function BitsCheermotePrefixSpendThresholdForm(props: BitsCheermotePrefixSpendTh
const updateCheerPrefix = (ev: React.FormEvent<HTMLSelectElement>) : boolean => {
const value = (ev.target as HTMLSelectElement).value;
setCheerPrefix(value);
recalcuateFieldValue(value, bitsValue);
setCustomCheerPrefix(value);
return true;
}
@@ -68,16 +68,6 @@ function BitsCheermotePrefixSpendThresholdForm(props: BitsCheermotePrefixSpendTh
return true;
}
// When the dropdowns are used, replace any manual text entry.
const recalcuateFieldValue = (prefix: string, bits: number) => {
if (prefix === undefined) {
return;
}
const cheerValue = `${prefix}`;
setCustomCheerPrefix(cheerValue);
props.updateCheerNameOrPrefix(cheerValue);
}
const handleBitSelect = (ev: React.FormEvent<HTMLSelectElement>) : boolean => {
const value = (ev.target as HTMLSelectElement).value;
const numericValue = parseInt(value);