private async Task fetchUser()
        {
            if (GlobalData.USER_RECORD_STRING != null)
            {
                // get phone number from global constants
                // fetch user details from the firebase
                FirebaseUser user = await firesharpClient.Get <FirebaseUser>("users/" + GlobalData.USER_RECORD_STRING);

                UserWallets = user.UserWallets;

                totalAmount = UserWallets.AsEnumerable().Sum(wallet => wallet.Amount);
                NotifyPropertyChanged("TotalText");
                // calculate total
                Fetching = false;
            }
        }
Beispiel #2
0
        private async Task getCurrentPayment(string key)
        {
            CurrentPayment = await fsClient.Get <Payment>("payments/" + key);

            this.BindingContext = CurrentPayment;
        }