From 55de998aed46eb730d904eb85a941f4ada844747 Mon Sep 17 00:00:00 2001 From: Milad Zahedi Date: Mon, 2 Oct 2023 13:03:43 +0330 Subject: [PATCH] fix linter and added error check to cli --- x/asset/ft/client/cli/tx.go | 2 ++ x/asset/ft/types/burn_authorization.go | 1 + x/asset/ft/types/mint_authorization.go | 1 + 3 files changed, 4 insertions(+) diff --git a/x/asset/ft/client/cli/tx.go b/x/asset/ft/client/cli/tx.go index 02ec64ac5..1842a5388 100644 --- a/x/asset/ft/client/cli/tx.go +++ b/x/asset/ft/client/cli/tx.go @@ -558,6 +558,8 @@ $ %s tx grant burn --burn-limit 100ucore --expiration 1667979596 return fmt.Errorf("burn-limit should be greater than zero") } authorization = types.NewBurnAuthorization(limitCoins) + default: + return errors.Errorf("invalid authorization types, %s", args[1]) } expire, err := getExpireTime(cmd) diff --git a/x/asset/ft/types/burn_authorization.go b/x/asset/ft/types/burn_authorization.go index 70c0149fc..96b438a0f 100644 --- a/x/asset/ft/types/burn_authorization.go +++ b/x/asset/ft/types/burn_authorization.go @@ -1,3 +1,4 @@ +//nolint:dupl // this code is identical to the mint part, but they should not be merged. package types import ( diff --git a/x/asset/ft/types/mint_authorization.go b/x/asset/ft/types/mint_authorization.go index 54ded9c16..aa0d4b7d7 100644 --- a/x/asset/ft/types/mint_authorization.go +++ b/x/asset/ft/types/mint_authorization.go @@ -1,3 +1,4 @@ +//nolint:dupl // this code is identical to the burn part, but they should not be merged. package types import (