Skip to content

Commit 236e50f

Browse files
committed
fixup! tapgarden: add delegation key filtering for mint supply commits
1 parent b1b0ad7 commit 236e50f

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

tapgarden/caretaker.go

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1514,6 +1514,13 @@ func (b *BatchCaretaker) sendSupplyCommitEvents(ctx context.Context,
15141514
return fmt.Errorf("unable to get leaf proof: %w", err)
15151515
}
15161516

1517+
// Encode just the leaf proof, not the entire file.
1518+
var leafProofBuf bytes.Buffer
1519+
if err := leafProof.Encode(&leafProofBuf); err != nil {
1520+
return fmt.Errorf("unable to encode leaf proof: %w", err)
1521+
}
1522+
leafProofBytes := leafProofBuf.Bytes()
1523+
15171524
// With the proof extracted, we can now create the universe
15181525
// key and leaf.
15191526
universeKey := universe.BaseLeafKey{
@@ -1529,7 +1536,7 @@ func (b *BatchCaretaker) sendSupplyCommitEvents(ctx context.Context,
15291536
Genesis: mintedAsset.Genesis,
15301537
GroupKey: mintedAsset.GroupKey,
15311538
},
1532-
RawProof: proofBlob,
1539+
RawProof: leafProofBytes,
15331540
Asset: &leafProof.Asset,
15341541
Amt: mintedAsset.Amount,
15351542
}

0 commit comments

Comments
 (0)