From 1c97d9f6cd83e6883384c29c10a15f0b52259cc5 Mon Sep 17 00:00:00 2001 From: brewmaster012 <88689859+brewmaster012@users.noreply.github.com> Date: Mon, 29 Jan 2024 15:27:27 -0800 Subject: [PATCH] fix: change WhitelistERC20 authorization from group1=>group2 (#1642) * change WhitelistERC20 authorization from group1=>group2 * changelog update * Update changelog.md --------- Co-authored-by: Lucas Bertrand --- changelog.md | 3 +++ x/crosschain/keeper/msg_server_whitelist_erc20.go | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/changelog.md b/changelog.md index edf96c140d..82a98252e3 100644 --- a/changelog.md +++ b/changelog.md @@ -3,6 +3,9 @@ ## Unreleased ### Fixes +### Fixes + +* [1642](https://github.com/zeta-chain/node/pull/1642) - Change WhitelistERC20 authorization from group1 to group2 * [1610](https://github.com/zeta-chain/node/issues/1610) - add pending outtx hash to tracker after monitoring for 10 minutes ## Version: v12.1.0 diff --git a/x/crosschain/keeper/msg_server_whitelist_erc20.go b/x/crosschain/keeper/msg_server_whitelist_erc20.go index 9dc082ec31..cadd5b51e0 100644 --- a/x/crosschain/keeper/msg_server_whitelist_erc20.go +++ b/x/crosschain/keeper/msg_server_whitelist_erc20.go @@ -25,7 +25,7 @@ import ( // Authorized: admin policy group 1. func (k msgServer) WhitelistERC20(goCtx context.Context, msg *types.MsgWhitelistERC20) (*types.MsgWhitelistERC20Response, error) { ctx := sdk.UnwrapSDKContext(goCtx) - if msg.Creator != k.zetaObserverKeeper.GetParams(ctx).GetAdminPolicyAccount(zetaObserverTypes.Policy_Type_group1) { + if msg.Creator != k.zetaObserverKeeper.GetParams(ctx).GetAdminPolicyAccount(zetaObserverTypes.Policy_Type_group2) { return nil, errorsmod.Wrap(sdkerrors.ErrUnauthorized, "Deploy can only be executed by the correct policy account") } erc20Addr := ethcommon.HexToAddress(msg.Erc20Address)