Skip to content

Commit f75ccb3

Browse files
authored
Merge pull request #58 from b-harvest/patch/issue-L-11
patch L-11
2 parents 23c9603 + 1b6ee57 commit f75ccb3

File tree

4 files changed

+7
-20
lines changed

4 files changed

+7
-20
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ require (
2929
github.com/cosmos/rosetta v0.0.0-20231205133638-3bc76705a1c6
3030
github.com/ethereum/go-ethereum v1.10.26
3131
github.com/evmos/ethermint v0.22.0
32-
github.com/gogo/protobuf v1.3.2
3332
github.com/golang/protobuf v1.5.4
3433
github.com/gorilla/mux v1.8.1
3534
github.com/grpc-ecosystem/grpc-gateway v1.16.0
@@ -88,6 +87,7 @@ require (
8887
github.com/go-ole/go-ole v1.2.6 // indirect
8988
github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect
9089
github.com/gogo/googleapis v1.4.1 // indirect
90+
github.com/gogo/protobuf v1.3.2 // indirect
9191
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
9292
github.com/golang/mock v1.6.0 // indirect
9393
github.com/google/go-cmp v0.6.0 // indirect

scripts/proto-tools-installer.sh

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -83,18 +83,6 @@ f_install_buf() {
8383
f_print_done
8484
}
8585

86-
f_install_protoc_gen_gocosmos() {
87-
f_print_installing_with_padding protoc-gen-gocosmos
88-
89-
if ! grep "github.com/gogo/protobuf => github.com/regen-network/protobuf" go.mod &>/dev/null ; then
90-
echo -e "\tPlease run this command from somewhere inside the canto folder."
91-
return 1
92-
fi
93-
94-
go get github.com/regen-network/cosmos-proto/protoc-gen-gocosmos 2>/dev/null
95-
f_print_done
96-
}
97-
9886
f_install_protoc_gen_grpc_gateway() {
9987
f_print_installing_with_padding protoc-gen-grpc-gateway
10088
f_needs_install "${DESTDIR}/${PREFIX}/bin/protoc-gen-grpc-gateway" || return 0
@@ -149,7 +137,6 @@ f_ensure_tools
149137
f_ensure_dirs
150138
f_install_protoc
151139
f_install_buf
152-
f_install_protoc_gen_gocosmos
153140
f_install_protoc_gen_grpc_gateway
154141
f_install_protoc_gen_swagger
155142
f_install_clang_format

x/coinswap/keeper/keeper.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import (
44
"fmt"
55
"strconv"
66

7-
gogotypes "github.com/gogo/protobuf/types"
7+
gogoprototypes "github.com/cosmos/gogoproto/types"
88

99
"cosmossdk.io/core/store"
1010
errorsmod "cosmossdk.io/errors"
@@ -352,7 +352,7 @@ func (k Keeper) SetParams(ctx sdk.Context, params types.Params) {
352352
// SetStandardDenom sets the standard denom for the coinswap module.
353353
func (k Keeper) SetStandardDenom(ctx sdk.Context, denom string) error {
354354
store := k.storeService.OpenKVStore(ctx)
355-
denomWrap := gogotypes.StringValue{Value: denom}
355+
denomWrap := gogoprototypes.StringValue{Value: denom}
356356
bz := k.cdc.MustMarshal(&denomWrap)
357357
err := store.Set(types.KeyStandardDenom, bz)
358358
if err != nil {
@@ -369,7 +369,7 @@ func (k Keeper) GetStandardDenom(ctx sdk.Context) (string, error) {
369369
return "", err
370370
}
371371

372-
var denomWrap = gogotypes.StringValue{}
372+
var denomWrap = gogoprototypes.StringValue{}
373373
k.cdc.MustUnmarshal(bz, &denomWrap)
374374
return denomWrap.Value, nil
375375
}

x/coinswap/keeper/pool.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package keeper
33
import (
44
"fmt"
55

6-
gogotypes "github.com/gogo/protobuf/types"
6+
gogoprototypes "github.com/cosmos/gogoproto/types"
77

88
errorsmod "cosmossdk.io/errors"
99
storetypes "cosmossdk.io/store/types"
@@ -64,7 +64,7 @@ func (k Keeper) GetPoolByLptDenom(ctx sdk.Context, lptDenom string) (types.Pool,
6464
return types.Pool{}, false
6565
}
6666

67-
poolId := &gogotypes.StringValue{}
67+
poolId := &gogoprototypes.StringValue{}
6868
k.cdc.MustUnmarshal(bz, poolId)
6969
return k.GetPool(ctx, poolId.Value)
7070
}
@@ -138,7 +138,7 @@ func (k Keeper) setPool(ctx sdk.Context, pool *types.Pool) {
138138
store.Set(types.GetPoolKey(pool.Id), bz)
139139

140140
// save by lpt denom
141-
poolId := &gogotypes.StringValue{Value: pool.Id}
141+
poolId := &gogoprototypes.StringValue{Value: pool.Id}
142142
poolIdBz := k.cdc.MustMarshal(poolId)
143143
store.Set(types.GetLptDenomKey(pool.LptDenom), poolIdBz)
144144
}

0 commit comments

Comments
 (0)