stride icon indicating copy to clipboard operation
stride copied to clipboard

Lack of check exist of acctAddress in mint module

Open ThanhNhann opened this issue 2 years ago • 2 comments

Background

SetupNewModuleAccount function doesn't have a check if the acctAddress is exist https://github.com/Stride-Labs/stride/blob/94e3a91dc582218a477771d9a694966bf901fdf5/x/mint/keeper/keeper.go#L233-L242 so in some cases, we can face some problems with this, I have run simulation for this and face it

Suggested Design

  • Add a check if the acctAddress is exist

Acceptance Criteria

  • Check for existing of acctAddress was added
  • All test pass

ThanhNhann avatar Feb 21 '23 09:02 ThanhNhann

Can you elaborate on

so in some cases, we can face some problems with this, I have run simulation for this and face it

I don't understand what will break in this case?

Also, if you are running simulation tests, could you share your code for that? We'd like to start using them.

riley-stride avatar Feb 21 '23 23:02 riley-stride

Sure @riley-stride, I coding simulation test for Strid, and will update information of fail soon in the pr of this issue

ThanhNhann avatar Feb 22 '23 04:02 ThanhNhann