From 428d175930ce3c9da8a0b2c3d9d8d414b72c2fb6 Mon Sep 17 00:00:00 2001 From: David Colon <38386583+Da-Colon@users.noreply.github.com> Date: Fri, 15 Nov 2024 10:33:03 -0500 Subject: [PATCH] don't mint if wearer isn't changing --- contracts/autonomous-admin/DecentAutonomousAdminV1.sol | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/contracts/autonomous-admin/DecentAutonomousAdminV1.sol b/contracts/autonomous-admin/DecentAutonomousAdminV1.sol index 3588fc2..1915b79 100644 --- a/contracts/autonomous-admin/DecentAutonomousAdminV1.sol +++ b/contracts/autonomous-admin/DecentAutonomousAdminV1.sol @@ -30,7 +30,9 @@ contract DecentAutonomousAdminV1 is // This will burn the hat since wearer is no longer eligible args.hatsProtocol.checkHatWearerStatus(args.hatId, args.currentWearer); // This will mint the hat to the nominated wearer - args.hatsProtocol.mintHat(args.hatId, args.nominatedWearer); + if (args.nominatedWearer != args.currentWearer) { + args.hatsProtocol.mintHat(args.hatId, args.nominatedWearer); + } } function supportsInterface(