Browse Source

fix the on-screen total update for unconfirmed amount

kb/add-usage-guide
Trent Larson 2 years ago
parent
commit
25b9dce669
  1. 16
      src/views/ContactsView.vue

16
src/views/ContactsView.vue

@ -755,17 +755,13 @@ export default class ContactsView extends Vue {
this.alertMessage = "Successfully logged time to the server."; this.alertMessage = "Successfully logged time to the server.";
this.isAlertVisible = true; this.isAlertVisible = true;
if (fromDid === identity.did) { if (fromDid === identity.did) {
this.givenByMeConfirmed[toDid] = const newList = R.clone(this.givenByMeUnconfirmed);
this.givenByMeConfirmed[toDid] + amount; newList[toDid] = (newList[toDid] || 0) + amount;
// do this to update the UI (is there a better way?) this.givenByMeUnconfirmed = newList;
// eslint-disable-next-line no-self-assign
this.givenByMeConfirmed = this.givenByMeConfirmed;
} else { } else {
this.givenToMeConfirmed[fromDid] = const newList = R.clone(this.givenToMeConfirmed);
this.givenToMeConfirmed[fromDid] + amount; newList[fromDid] = (newList[fromDid] || 0) + amount;
// do this to update the UI (is there a better way?) this.givenToMeConfirmed = newList;
// eslint-disable-next-line no-self-assign
this.givenToMeConfirmed = this.givenToMeConfirmed;
} }
} }
} catch (error) { } catch (error) {

Loading…
Cancel
Save