Skip to content

Commit

Permalink
Catch errors correctly when composing MPMA send
Browse files Browse the repository at this point in the history
  • Loading branch information
Ouziel committed Dec 16, 2024
1 parent 80ef2b1 commit b008cbd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
10 changes: 7 additions & 3 deletions counterparty-core/counterpartycore/lib/messages/versions/mpma.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,13 @@ def compose(
raise exceptions.ComposeError(problems)

data = message_type.pack(ID)
data += _encode_mpma_send(
db, asset_dest_quant_list, block_index, memo=memo, memo_is_hex=memo_is_hex
)

try:
data += _encode_mpma_send(
db, asset_dest_quant_list, block_index, memo=memo, memo_is_hex=memo_is_hex
)
except Exception as e:
raise exceptions.ComposeError(f"couldn't encode MPMA send: {e}") from e

return (source, [], data)

Expand Down
1 change: 1 addition & 0 deletions release-notes/release-notes-v10.9.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
## Bugfixes

- Fix endpoint to get info from raw transaction when block index is not provided
- Catch errors correctly when composing MPMA send

## Codebase

Expand Down

0 comments on commit b008cbd

Please sign in to comment.