PrimeDAO / prime-deals-dapp

DAO to DAO negotiations facilitated, ratified, and archived.
https://www.prime.xyz/deals
3 stars 1 forks source link

Deal Dashboard: Rep count should automatically update after editing a deal #1032

Open BartuCulha opened 2 years ago

BartuCulha commented 2 years ago

Steps to reproduce:

  1. Create or find a deal with multiple representatives
  2. Edit deal
  3. Remove reps
  4. Submit deal
  5. Go to deal page

Result: Rep count will display the outdated data, refreshing fixes the issue DEAL-Dashboard-Prime-Deals (24)

Expected:Rep count update automatically after changing representatives via registration wizard

DEAL-Dashboard-Prime-Deals (26).png

paweljanicki commented 2 years ago

Sometimes I can reproduce it, sometimes I cannot.

I figured out that deal entity is correctly updated in the dApp, but sometimes the UI doesn't reflect it.

If the UI doesn't update, while you are on deal dashboard, go back to all deals and then enter deal dashboard again. The UI will display correct information.

To me it looks like Aurelia specific issue. What interest me is

  @computedFrom("registrationData.partnerDAO.representatives")
  public get partnerDaoRepresentatives(): Set<Address> {
    return new Set(this.registrationData.partnerDAO?.representatives.map(representative => representative.address) ?? []);
  }

and

  @computedFrom("registrationData.primaryDAO.representatives")
  public get primaryDaoRepresentatives(): Set<Address> {
    return new Set(this.registrationData.primaryDAO?.representatives.map(representative => representative.address) ?? []);
  }
paweljanicki commented 2 years ago

I cannot get this to work, I think someone more experienced with Aurelia is more capable to fix it

paweljanicki commented 2 years ago

I've tried on this branch, but failed https://github.com/PrimeDAO/prime-deals-dapp/tree/bugfix/1032

IonelLupu commented 2 years ago

After investigation this with @paweljanicki we decided to wait for AU2 migration as it might automatically fix this issue. We will retest it after AU2 migration is done