@@ -80,6 +83,10 @@ export default function RequiresConfirmationController({
LockedIcon={requiresConfirmationLockedProps.LockedIcon}
onCheckedChange={(val) => {
formMethods.setValue("requiresConfirmation", val, { shouldDirty: true });
+ // If we uncheck requires confirmation, we also uncheck the "will block slot" checkbox
+ if (!val) {
+ formMethods.setValue("requiresConfirmationWillBlockSlot", false, { shouldDirty: true });
+ }
onRequiresConfirmation(val);
}}>
@@ -121,73 +128,86 @@ export default function RequiresConfirmationController({
)}
{(requiresConfirmationSetup !== undefined ||
!requiresConfirmationLockedProps.disabled) && (
-
-
- {
- const val = Number(evt.target?.value);
- setRequiresConfirmationSetup({
- unit:
- requiresConfirmationSetup?.unit ??
- defaultRequiresConfirmationSetup.unit,
- time: val,
- });
- formMethods.setValue(
- "metadata.requiresConfirmationThreshold.time",
- val,
- { shouldDirty: true }
- );
- }}
- className="border-default !m-0 block w-16 rounded-r-none border-r-0 text-sm [appearance:textfield] focus:z-10 focus:border-r"
- defaultValue={metadata?.requiresConfirmationThreshold?.time || 30}
- />
-
-
- ),
- }}
- />
- >
- }
- id="notice"
- value="notice"
- />
+
+
+ ),
+ }}
+ />
+ >
+ }
+ id="notice"
+ value="notice"
+ />
+