From b8149d052da4828e0ac7edba77afc04a1965fdef Mon Sep 17 00:00:00 2001 From: Silja Petasch <78182344+siljapetasch@users.noreply.github.com> Date: Wed, 24 Jul 2024 10:28:46 +0000 Subject: [PATCH] add red x to error message when user wants to add a address to the allowlist that already has a role --- pkg/vm/allowlist.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pkg/vm/allowlist.go b/pkg/vm/allowlist.go index 8babd356b..f3f49b6a3 100644 --- a/pkg/vm/allowlist.go +++ b/pkg/vm/allowlist.go @@ -10,6 +10,7 @@ import ( "github.com/ava-labs/avalanche-cli/pkg/application" "github.com/ava-labs/avalanche-cli/pkg/utils" + "github.com/ava-labs/avalanche-cli/pkg/ux" "github.com/ava-labs/avalanchego/utils/logging" "github.com/ethereum/go-ethereum/common" @@ -59,11 +60,11 @@ func getNewAddresses( for _, address := range addresses { switch { case utils.Belongs(adminAddresses, address): - fmt.Println(address.Hex() + " is already allowed as admin role") + ux.Logger.RedXToUser(address.Hex() + " is already allowed as admin role") case utils.Belongs(managerAddresses, address): - fmt.Println(address.Hex() + " is already allowed as manager role") + ux.Logger.RedXToUser(address.Hex() + " is already allowed as manager role") case utils.Belongs(enabledAddresses, address): - fmt.Println(address.Hex() + " is already allowed as enabled role") + ux.Logger.RedXToUser(address.Hex() + " is already allowed as enabled role") default: newAddresses = append(newAddresses, address) }