Closed artman325 closed 1 year ago
How to reproduce: try to produce any community instance. And call getRoles()
getRoles()
Actual:
[ getRoles method Response ] uint8[] : 0,1,2,3,4,5 string[] : relayers,owners,admins,members,alumni,visitors string[] : ,,,,,
Expected:
[ getRoles method Response ] uint8[] : 1,2,3,4,5,6 string[] : relayers,owners,admins,members,alumni,visitors string[] : ,,,,,
Comments: it's just mistyping here. Confused between index of uitn8 and real role id. There are no zero index role in the contract. https://github.com/Intercoin/CommunityContract/blob/288b09786be440654117a5a9f4150ac75fda1e68/contracts/CommunityView.sol#L260 should be like indexes[i-1] = i; instead of indexes[i-1] = i-1;
indexes[i-1] = i;
indexes[i-1] = i-1;
need to update unittests. Seems it's wrong too
Has this been fixed? @artman325 update the unit tests
updated unittests in https://github.com/Intercoin/CommunityContract/commit/64a11372756cce3c998752cb5c45aff2897c10e8
How to reproduce: try to produce any community instance. And call
getRoles()
Actual:
Expected:
Comments: it's just mistyping here. Confused between index of uitn8 and real role id. There are no zero index role in the contract. https://github.com/Intercoin/CommunityContract/blob/288b09786be440654117a5a9f4150ac75fda1e68/contracts/CommunityView.sol#L260 should be like
indexes[i-1] = i;
instead ofindexes[i-1] = i-1;