updateInfo static method

dynamic updateInfo()

Implementation

static updateInfo() async {
  final uuid = await getBootpayUUID();
  final bootpaySK = await getBootpaySK();
  final int lastTime = await getBootpayLastTime();

  int current = DateTime.now().millisecondsSinceEpoch;
  if(bootpaySK == '') await newBootpaySK(uuid, current);

  bool isExpired = current - lastTime > 30 * 60 * 1000;
  if(isExpired) await newBootpaySK(uuid, current);
  await setBootpayLastTime(current);
}