Open ShookLyngs opened 3 months ago
I think refactoring is the icing on the cake. The amount of work required and whether it is worth spending time depends on your evaluation.
If you think the input-output ratio is low, we can do nothing for it.
I want to emphasize that this is just a suggestion.
in the PR I've chosen a simpler solution to only define a type
AddressToPubkeyMap
with an explanation comment:
We can define type proxies for
Address
andPubkey
to improve the code readability of the btc lib. However, it would take some time to search for relevant code and update it. So, the discussion is: Do you think we should define the two type proxies, and do you think the change is worthwhile?From this:
Which can be refactored to this:
Original commented at: https://github.com/ckb-cell/rgbpp-sdk/pull/228#discussion_r1642535163
The original comment was discussing about how to make the type of
pubkeyMap
more clear, in the PR I've chosen a simpler solution to only define a typeAddressToPubkeyMap
with an explanation comment: