From 8d550cb1a99c3b95d6ba066b5ca9379ed0aec059 Mon Sep 17 00:00:00 2001 From: "jaeseung.bae" Date: Mon, 13 May 2024 09:55:21 +0900 Subject: [PATCH 1/4] fix: add missing router register --- x/fswap/module.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/x/fswap/module.go b/x/fswap/module.go index d561bbe296..acca5b9976 100644 --- a/x/fswap/module.go +++ b/x/fswap/module.go @@ -1,6 +1,7 @@ package fswap import ( + "context" "encoding/json" "fmt" @@ -65,7 +66,9 @@ func (AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, _ client.TxEncodingCo // RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the module. func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *runtime.ServeMux) { - // this line is used by starport scaffolding # 2 + if err := types.RegisterQueryHandlerClient(context.Background(), mux, types.NewQueryClient(clientCtx)); err != nil { + panic(err) + } } // GetTxCmd returns the fswap module's root tx command. From 7d4b9828909d644e748e3529c7a1865132143514 Mon Sep 17 00:00:00 2001 From: "jaeseung.bae" Date: Mon, 13 May 2024 09:57:56 +0900 Subject: [PATCH 2/4] chore: update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 04ff53deb7..f44d5736f0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -87,6 +87,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ * (x/server) [\#1337](https://github.com/Finschia/finschia-sdk/pull/1337) fix panic when defining minimum gas config as `100stake;100uatom`. Use a `,` delimiter instead of `;`. Fixes the server config getter to use the correct delimiter (backport cosmos/cosmos-sdk#18537) * (x/fbridge) [\#1361](https://github.com/Finschia/finschia-sdk/pull/1361) Fixes fbridge auth checking bug * (x/fswap) [\#1365](https://github.com/Finschia/finschia-sdk/pull/1365) fix update swap keys for possibly overlapped keys(`(hello,world) should be different to (hel,loworld)`) +* (x/fswap) [\#1379](https://github.com/Finschia/finschia-sdk/pull/1379) add missing router registration ### Removed From fdc1f492d37997238f99436c0946e7c1cf7f8e5d Mon Sep 17 00:00:00 2001 From: "jaeseung.bae" Date: Mon, 13 May 2024 10:48:52 +0900 Subject: [PATCH 3/4] chore: lint fix --- crypto/keys/multisig/codec.go | 1 - x/fswap/keeper/keeper.go | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/crypto/keys/multisig/codec.go b/crypto/keys/multisig/codec.go index 2153acfb79..7a18b51aed 100644 --- a/crypto/keys/multisig/codec.go +++ b/crypto/keys/multisig/codec.go @@ -15,7 +15,6 @@ const ( PubKeyAminoRoute = "tendermint/PubKeyMultisigThreshold" ) -// nolint // Deprecated: Amino is being deprecated in the SDK. But even if you need to // use Amino for some reason, please use `codec/legacy.Cdc` instead. var AminoCdc = codec.NewLegacyAmino() diff --git a/x/fswap/keeper/keeper.go b/x/fswap/keeper/keeper.go index 6b153150a1..7686c3af5d 100644 --- a/x/fswap/keeper/keeper.go +++ b/x/fswap/keeper/keeper.go @@ -319,7 +319,7 @@ func (k Keeper) increaseSwapCount(ctx sdk.Context) error { } prev := stats.SwapCount - stats.SwapCount += 1 + stats.SwapCount++ if stats.SwapCount < prev { return types.ErrInvalidState.Wrap("overflow detected") } From 77872fe973ac609582ff90ab8de002cf78b7d74b Mon Sep 17 00:00:00 2001 From: "jaeseung.bae" Date: Mon, 13 May 2024 11:06:39 +0900 Subject: [PATCH 4/4] chore: lint fix --- crypto/keys/multisig/codec.go | 1 + 1 file changed, 1 insertion(+) diff --git a/crypto/keys/multisig/codec.go b/crypto/keys/multisig/codec.go index 7a18b51aed..2153acfb79 100644 --- a/crypto/keys/multisig/codec.go +++ b/crypto/keys/multisig/codec.go @@ -15,6 +15,7 @@ const ( PubKeyAminoRoute = "tendermint/PubKeyMultisigThreshold" ) +// nolint // Deprecated: Amino is being deprecated in the SDK. But even if you need to // use Amino for some reason, please use `codec/legacy.Cdc` instead. var AminoCdc = codec.NewLegacyAmino()