getWalletList method

dynamic getWalletList(
  1. bool requestBioPay
)

Implementation

getWalletList(bool requestBioPay) async {
  String userToken = widget.payload?.userToken ?? '';

  await widget.c.getWalletList(userToken);
  updateSelectedCardIndexForButton();

  if(requestBioPay == true) {
    requestBioForPay();
    return;
  }


  if(widget.c.resWallet.value.biometric?.biometric_confirmed == false) {
    final prefs = await SharedPreferences.getInstance();
    if(widget.c.resWallet.value.wallets.isEmpty) {
      prefs.setString("biometric_secret_key", "");
    }
    prefs.setString("password_token", "");
  }

  if(widget.c.resWallet.value.wallets.isEmpty) {
    addNewCard();
  } else {
    showCardView();
  }
}