From 2f8f98f9eb49f1e350eac4c19f6bdd449779c113 Mon Sep 17 00:00:00 2001 From: La Ancapo <> Date: Fri, 6 Feb 2026 15:23:05 +0100 Subject: [PATCH 1/2] pretty clawback --- src/Pretty.hs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Pretty.hs b/src/Pretty.hs index 0d07035..e2cb9e5 100644 --- a/src/Pretty.hs +++ b/src/Pretty.hs @@ -92,7 +92,7 @@ instance Pretty OperationBody where pretty (OperationBody'BEGIN_SPONSORING_FUTURE_RESERVES (BeginSponsoringFutureReservesOp account)) = T.concat ["Sponsoring reserves for ", pretty account] pretty OperationBody'END_SPONSORING_FUTURE_RESERVES = "No longer sponsored reserves" -- pretty (OperationBody'REVOKE_SPONSORSHIP x) = pretty x --- pretty (OperationBody'CLAWBACK x) = pretty x + pretty (OperationBody'CLAWBACK x) = pretty x -- pretty (OperationBody'CLAWBACK_CLAIMABLE_BALANCE x) = pretty x pretty (OperationBody'SET_TRUST_LINE_FLAGS x) = pretty x -- pretty (OperationBody'LIQUIDITY_POOL_DEPOSIT x) = pretty x @@ -142,6 +142,9 @@ instance Pretty ManageDataOp where pretty (ManageDataOp name Nothing) = T.concat ["Data ", utf8s name, " cleared"] pretty (ManageDataOp name (Just value)) = T.concat ["Data ", utf8s name, " = ", utf8s value] +instance Pretty ClawbackOp where + pretty (ClawbackOp ass acc amount) = T.concat ["Clawback ", prettyAmount amount, " ", pretty ass, " from ", pretty acc] + instance Pretty MuxedAccount where pretty (MuxedAccount'KEY_TYPE_ED25519 x) = prettyKey x pretty (MuxedAccount'KEY_TYPE_MUXED_ED25519 id key) = T.concat [b32 key, " (", T.show id, ")"] From be19f96d03d42e7f9b0c10487fd7e2769609d42e Mon Sep 17 00:00:00 2001 From: La Ancapo <> Date: Fri, 6 Feb 2026 15:23:39 +0100 Subject: [PATCH 2/2] fixed claimable balance amount pretty-printing --- src/Pretty.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Pretty.hs b/src/Pretty.hs index e2cb9e5..348016b 100644 --- a/src/Pretty.hs +++ b/src/Pretty.hs @@ -124,7 +124,7 @@ instance Pretty CreateAccountOp where pretty (CreateAccountOp dest bal) = T.concat ["Create account ", pretty dest, " with starting balance ", T.show bal] instance Pretty CreateClaimableBalanceOp where - pretty (CreateClaimableBalanceOp ass amount claimants) = T.concat ["Create claimable ", T.show amount, " ", pretty ass, " to ", pretty claimants] + pretty (CreateClaimableBalanceOp ass amount claimants) = T.concat ["Create claimable ", prettyAmount amount, " ", pretty ass, " to ", pretty claimants] instance Pretty SetTrustLineFlagsOp where pretty (SetTrustLineFlagsOp trustor ass clearFlags setFlags)