2023-08-25 21:28:33 +00:00
|
|
|
import 'package:cake_wallet/core/authentication_request_data.dart';
|
|
|
|
|
|
|
|
class TotpResponse {
|
|
|
|
TotpResponse({bool success = false, required this.close, String? error})
|
|
|
|
: this.success = success,
|
|
|
|
this.error = success == false ? error ?? '' : null;
|
|
|
|
|
|
|
|
final bool success;
|
|
|
|
final String? error;
|
|
|
|
final CloseAuth close;
|
|
|
|
}
|
|
|
|
|
|
|
|
typedef OnTotpAuthenticationFinished = void Function(TotpResponse);
|
2023-05-17 14:43:23 +00:00
|
|
|
|
|
|
|
class TotpAuthArgumentsModel {
|
|
|
|
final bool? isForSetup;
|
|
|
|
final bool? isClosable;
|
2023-08-25 21:28:33 +00:00
|
|
|
final bool? showPopup;
|
2023-05-17 14:43:23 +00:00
|
|
|
final OnTotpAuthenticationFinished? onTotpAuthenticationFinished;
|
|
|
|
|
|
|
|
TotpAuthArgumentsModel({
|
|
|
|
this.isForSetup,
|
|
|
|
this.isClosable,
|
2023-08-25 21:28:33 +00:00
|
|
|
this.showPopup,
|
2023-05-17 14:43:23 +00:00
|
|
|
this.onTotpAuthenticationFinished,
|
|
|
|
});
|
|
|
|
}
|