safe-react icon indicating copy to clipboard operation
safe-react copied to clipboard

Refactor CreateSafe and LoadSafe components

Open usame-algan opened this issue 3 years ago • 2 comments

Overview

Create Safe and Load Safe currently manage their internal form state of owners differently. This should be streamlined to improve maintainability.

Differences between create and load

  • Different titles and copy
  • Only when creating, owners can be added and threshold changed

Otherwise the two flows are identical.

Goals

  • FIELD_SAFE_OWNERS_LIST and FIELD_SAFE_OWNER_LIST have the same name, structure and data handling
  • FIELD_MAX_OWNER_NUMBER is removed as it is not used

usame-algan avatar Jan 14 '22 08:01 usame-algan

@usame-algan, I would highly recommend a cleanup of the data handling of owners whilst doing this as well. The structure of Final Form is very confusing.

iamacook avatar Jan 14 '22 08:01 iamacook

@usame-algan, I would highly recommend a cleanup of the data handling of owners whilst doing this as well. The structure of Final Form is very confusing.

Agreed! I extended the Goals so we can take care of the data handling of owners as well

usame-algan avatar Jan 14 '22 09:01 usame-algan