safe-global / safe-smart-account

Safe allows secure management of blockchain assets.
https://safe.global
GNU Lesser General Public License v3.0
1.84k stars 907 forks source link

Refactor `getSafeWithOwners` function to accept an object as an argument #780

Closed mmv08 closed 2 months ago

mmv08 commented 2 months ago

Context/issue

Currently, the getSafeWithOwners test utility function accepts all the necessary parameters as standalone variables. In general, it's a good practice in the JavaScript world to use an object instead when the number of parameters exceeds a certain threshold to ease the addition of new ones.

For more context, see the discussion and pain of introducing new parameters here https://github.com/safe-global/safe-smart-account/pull/759#discussion_r1662717057

Proposed solution

Use an object to accept all the necessary parameters for safe setup Bonus points: find other functions that would benefit from this

Alternatives

Don't do anything