From 4f79cfa8d239ff573bb5960449816595d5d6e2b5 Mon Sep 17 00:00:00 2001 From: Dzianis Andreyenka Date: Fri, 6 Oct 2023 16:11:11 +0200 Subject: [PATCH] Fix duplicate reveal operation Signed-off-by: Dzianis Andreyenka --- internal/tezos/prepare_transaction.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/tezos/prepare_transaction.go b/internal/tezos/prepare_transaction.go index 164d7a0..3fa4ee3 100644 --- a/internal/tezos/prepare_transaction.go +++ b/internal/tezos/prepare_transaction.go @@ -91,8 +91,9 @@ func (c *tezosConnector) completeOp(ctx context.Context, op *codec.Op, fromStrin return err } + mayNeedReveal := len(op.Contents) > 0 && op.Contents[0].Kind() != tezos.OpTypeReveal // add reveal if necessary - if !state.IsRevealed() { + if mayNeedReveal && !state.IsRevealed() { key, err := c.getPubKeyFromSignatory(op.Source.String()) if err != nil { return err