opensquare-network / subsquare

https://www.subsquare.io
5 stars 5 forks source link

fellowship/core page showing incorrect "promotion period" for Rank 1 members #4306

Closed acatangiu closed 6 days ago

acatangiu commented 6 days ago

Context

https://github.com/polkadot-fellows/Evidences/pull/24#discussion_r1650748569

fellowshipCore.params: PalletCoreFellowshipParamsType storage:

{
  ...
  minPromotionPeriod: [
    0
    2,629,800
    2,629,800
    2,629,800
    2,629,800
    2,629,800
    2,629,800
    1,314,900
    2,103,840
  ]
  ...
}

Code for target rank converted to index converted to period -> only rank0->rank1 has 0 min period.

Issue

Subsquare UI is incorrectly showing Promotion Period: 100% for all current Rank 1 members.

E.g. member with less than 1 year in rank 1: Screenshot 2024-06-24 at 14 11 45

wliyongfeng commented 6 days ago

Hey @acatangiu , thanks for this issue. I'm confused with this sentence only rank0->rank1 has 0 min period. Is it that all rank 1 members has index 0, so all rank 1 members have a min promotion period 0?


Ah, sorry. I understand, the rank to be calculated should be to_rank, not the rank that the member to be promoted is currently at.