atomicDEX-API icon indicating copy to clipboard operation
atomicDEX-API copied to clipboard

Refactor code using helper macros str_strip_0x push_if_some def_with_opt_param

Open dimxy opened this issue 1 year ago • 0 comments

A few helper macros were added which make code more compact:

  • str_strip_0x - strips 0x prefix from str with hex
  • push_if_some - pushes (key, value as string) into array if value is Some
  • def_with_opt_param - adds a with_... method in a struct implementing Builder pattern

Suggestion is to use these macros throughout the codebase.

dimxy avatar Oct 24 '24 16:10 dimxy