setAutoShieldEnabled method

  1. @override
Future<void> setAutoShieldEnabled({
  1. required bool enabled,
})
override

Persist the auto-shield switch. Same durability contract as setExpertTransparentFunds.

Implementation

@override
Future<void> setAutoShieldEnabled({required bool enabled}) async {
  autoShieldWrites++;
  final gate = writeGate;
  if (gate != null) await gate.future;
  if (failWrites) throw Exception('scripted settings write failure');
  autoShieldValue = enabled;
}