atomicDEX-API
atomicDEX-API copied to clipboard
Refactor code using helper macros str_strip_0x push_if_some def_with_opt_param
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.