fix address format handling of tx summaries endpoint #411
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Background:
Previously when I was implementing the API, I didn't get the input address handing correct. To be consistent with other APIs that take address (set) inputs, the supported address types should be:
For a shelly address, if the client wants to match by full address (payment key hash and stake address), it should pass 2. If the client wants to match only the payment key hash and disregard the stake part, it should pass 5.
Type 1 & 2 should be matched against
tx_out.address
. Type 5 should be matched againsttx_out.payment_cred
(after the conversion to hex string).This PR fixes handling of address type 5.