Skip to content

Commit

Permalink
ashray PR suggestion: change error message
Browse files Browse the repository at this point in the history
  • Loading branch information
ckeshava committed Feb 6, 2025
1 parent 1e0f73c commit a37cd1b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions tests/unit/models/transactions/test_amm_clawback.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ def test_incorrect_asset_amount(self):
)
self.assertEqual(
error.exception.args[0],
"{'AMMClawback': 'Amount issuer/currency subfield does not match Asset "
+ "field. '}",
"{'AMMClawback': 'Amount.issuer and Amount.currency must match "
+ "corresponding Asset fields.'}",
)

def test_valid_txn(self):
Expand Down
5 changes: 4 additions & 1 deletion xrpl/models/transactions/amm_clawback.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,9 @@ def _validate_wallet_and_amount_fields(self: Self) -> Optional[str]:
self.amount.issuer != self.asset.issuer
or self.amount.currency != self.asset.currency
):
errors += "Amount issuer/currency subfield does not match Asset field. "
errors += (
"Amount.issuer and Amount.currency must match corresponding Asset "
+ "fields."
)

return errors if errors else None

0 comments on commit a37cd1b

Please sign in to comment.