added mutex since only one epic cash wallet can/should be active at a time

This commit is contained in:
julian 2023-09-20 17:08:22 -06:00
parent 8ec22ed389
commit 781e2262b5

View file

@ -8,6 +8,11 @@ import 'package:mutex/mutex.dart';
/// Should all be static calls (no state stored in this class) /// Should all be static calls (no state stored in this class)
/// ///
abstract class LibEpiccash { abstract class LibEpiccash {
static final Mutex _mutex = Mutex();
///
/// Check if [address] is a valid epiccash address according to libepiccash
///
static bool validateSendAddress({required String address}) { static bool validateSendAddress({required String address}) {
final String validate = lib_epiccash.validateSendAddress(address); final String validate = lib_epiccash.validateSendAddress(address);
if (int.parse(validate) == 1) { if (int.parse(validate) == 1) {