diff --git a/api/v2/service/coin_info.go b/api/v2/service/coin_info.go index 655d2fbd4..4bca3f252 100644 --- a/api/v2/service/coin_info.go +++ b/api/v2/service/coin_info.go @@ -65,7 +65,7 @@ func (s *Service) CoinInfoById(ctx context.Context, req *pb.CoinIdRequest) (*pb. coin := cState.Coins().GetCoin(types.CoinID(req.Id)) if coin == nil { - return new(pb.CoinInfoResponse), s.createError(status.New(codes.NotFound, "Coin not found"), transaction.EncodeError(transaction.EncodeError(code.NewCoinNotExists("", strconv.Itoa(int(req.Id)))))) + return new(pb.CoinInfoResponse), s.createError(status.New(codes.NotFound, "Coin not found"), transaction.EncodeError(code.NewCoinNotExists("", strconv.Itoa(int(req.Id))))) } if timeoutStatus := s.checkTimeout(ctx); timeoutStatus != nil { diff --git a/api/v2/service/estimate_coin_sell_all.go b/api/v2/service/estimate_coin_sell_all.go index 41b352afb..31eb26b17 100644 --- a/api/v2/service/estimate_coin_sell_all.go +++ b/api/v2/service/estimate_coin_sell_all.go @@ -44,7 +44,7 @@ func (s *Service) EstimateCoinSellAll(ctx context.Context, req *pb.EstimateCoinS } else { coinToBuy = types.CoinID(req.GetCoinIdToBuy()) if !cState.Coins().Exists(coinToBuy) { - return new(pb.EstimateCoinSellAllResponse), s.createError(status.New(codes.NotFound, "Coin to buy not exists"), transaction.EncodeError(transaction.EncodeError(code.NewCoinNotExists("", coinToBuy.String())))) + return new(pb.EstimateCoinSellAllResponse), s.createError(status.New(codes.NotFound, "Coin to buy not exists"), transaction.EncodeError(code.NewCoinNotExists("", coinToBuy.String()))) } } diff --git a/api/v2/service/frozen.go b/api/v2/service/frozen.go index e11d4c084..a566e4dc1 100644 --- a/api/v2/service/frozen.go +++ b/api/v2/service/frozen.go @@ -30,7 +30,7 @@ func (s *Service) Frozen(ctx context.Context, req *pb.FrozenRequest) (*pb.Frozen coinID := types.CoinID(req.CoinId.GetValue()) reqCoin = cState.Coins().GetCoin(coinID) if reqCoin == nil { - return new(pb.FrozenResponse), s.createError(status.New(codes.NotFound, "Coin not found"), transaction.EncodeError(transaction.EncodeError(code.NewCoinNotExists("", coinID.String())))) + return new(pb.FrozenResponse), s.createError(status.New(codes.NotFound, "Coin not found"), transaction.EncodeError(code.NewCoinNotExists("", coinID.String()))) } } var frozen []*pb.FrozenResponse_Frozen diff --git a/core/transaction/unbond.go b/core/transaction/unbond.go index a283a845d..10692b5d9 100644 --- a/core/transaction/unbond.go +++ b/core/transaction/unbond.go @@ -66,7 +66,7 @@ func (data UnbondData) BasicCheck(tx *Transaction, context *state.CheckState) *R return &Response{ Code: code.StakeNotFound, Log: fmt.Sprintf("Stake of current user not found"), - Info: EncodeError(EncodeError(code.NewStakeNotFound(data.PubKey.String(), sender.String(), data.Coin.String(), context.Coins().GetCoin(data.Coin).GetFullSymbol()))), + Info: EncodeError(code.NewStakeNotFound(data.PubKey.String(), sender.String(), data.Coin.String(), context.Coins().GetCoin(data.Coin).GetFullSymbol())), } } diff --git a/go.mod b/go.mod index 68a39d716..f38d1d075 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/MinterTeam/minter-go-node go 1.15 require ( - github.com/MinterTeam/node-grpc-gateway v1.1.3-0.20200920180544-2bc88646bf02 + github.com/MinterTeam/node-grpc-gateway v1.1.3-0.20200921073010-0e0331cde460 github.com/btcsuite/btcd v0.20.1-beta github.com/c-bata/go-prompt v0.2.3 github.com/go-kit/kit v0.10.0 diff --git a/go.sum b/go.sum index 02d54cec6..2e70ca8c2 100644 --- a/go.sum +++ b/go.sum @@ -7,8 +7,8 @@ github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d h1:nalkkPQcITbvhmL4+C4cKA87NW0tfm3Kl9VXRoPywFg= github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d/go.mod h1:URdX5+vg25ts3aCh8H5IFZybJYKWhJHYMTnf+ULtoC4= github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= -github.com/MinterTeam/node-grpc-gateway v1.1.3-0.20200920180544-2bc88646bf02 h1:HJBzwDqs7xSCYRkJ6ehUJ3+ScLzFY2gg8mo3aRptsPs= -github.com/MinterTeam/node-grpc-gateway v1.1.3-0.20200920180544-2bc88646bf02/go.mod h1:LZ+Y8IYfSBx0IQZY+a9pHLjztMwmlaCQX2ncTejoE2o= +github.com/MinterTeam/node-grpc-gateway v1.1.3-0.20200921073010-0e0331cde460 h1:joYzlUOfkSr2j+jmkMxXqLF5HguzwlYx6lfJmE6/brs= +github.com/MinterTeam/node-grpc-gateway v1.1.3-0.20200921073010-0e0331cde460/go.mod h1:LZ+Y8IYfSBx0IQZY+a9pHLjztMwmlaCQX2ncTejoE2o= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI=