From 82773ec740d49f1b781fba85a019adde01be5051 Mon Sep 17 00:00:00 2001 From: Senna46 <29295263+Senna46@users.noreply.github.com> Date: Fri, 31 Jan 2025 23:26:52 +0900 Subject: [PATCH 1/4] fix: cosmos client v0.52 --- ignite/pkg/cosmosclient/cosmosclient.go | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/ignite/pkg/cosmosclient/cosmosclient.go b/ignite/pkg/cosmosclient/cosmosclient.go index 0d65ad754d..5e2d47556d 100644 --- a/ignite/pkg/cosmosclient/cosmosclient.go +++ b/ignite/pkg/cosmosclient/cosmosclient.go @@ -364,8 +364,6 @@ func New(ctx context.Context, options ...Option) (Client, error) { if c.signer == nil { c.signer = signer{} } - // set address prefix in SDK global config - c.SetConfigAddressPrefix() return c, nil } @@ -468,16 +466,6 @@ func (c Client) Context() client.Context { return c.context } -// SetConfigAddressPrefix sets the account prefix in the SDK global config. -func (c Client) SetConfigAddressPrefix() { - // TODO find a better way if possible. - // https://github.com/ignite/cli/issues/2744 - mconf.Lock() - defer mconf.Unlock() - config := sdktypes.GetConfig() - config.SetBech32PrefixForAccount(c.addressPrefix, c.addressPrefix+"pub") -} - // Response of your broadcasted transaction. type Response struct { Codec codec.Codec From 97e42cfd4c9dbf963e48b6dedb041375b142a336 Mon Sep 17 00:00:00 2001 From: Senna46 <29295263+Senna46@users.noreply.github.com> Date: Fri, 31 Jan 2025 23:32:04 +0900 Subject: [PATCH 2/4] feat: with address prefix --- ignite/pkg/cosmosclient/cosmosclient.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ignite/pkg/cosmosclient/cosmosclient.go b/ignite/pkg/cosmosclient/cosmosclient.go index 5e2d47556d..c7d34d600a 100644 --- a/ignite/pkg/cosmosclient/cosmosclient.go +++ b/ignite/pkg/cosmosclient/cosmosclient.go @@ -837,7 +837,8 @@ func (c Client) newContext() client.Context { WithGenerateOnly(c.generateOnly). WithAddressCodec(addressCodec). WithValidatorAddressCodec(validatorAddressCodec). - WithConsensusAddressCodec(consensusAddressCodec) + WithConsensusAddressCodec(consensusAddressCodec). + WithAddressPrefix(c.addressPrefix) } func newFactory(clientCtx client.Context) tx.Factory { From c4960ad6d9638d2856f40a34d9cbd5a9b5e5132f Mon Sep 17 00:00:00 2001 From: Senna46 <29295263+Senna46@users.noreply.github.com> Date: Fri, 31 Jan 2025 23:41:32 +0900 Subject: [PATCH 3/4] feat: changelog --- changelog.md | 1 + 1 file changed, 1 insertion(+) diff --git a/changelog.md b/changelog.md index 85836e1843..593eab3f6a 100644 --- a/changelog.md +++ b/changelog.md @@ -56,6 +56,7 @@ - [#4402](https://github.com/ignite/cli/pull/4402) Fix gentx parser into the cosmosutil package - [#4474](https://github.com/ignite/cli/pull/4474) Fix issue in `build --release` command - [#4479](https://github.com/ignite/cli/pull/4479) Scaffold an `uint64 type crashs Ignite +- [#4486](https://github.com/ignite/cli/pull/4486) Fix issue when set account prefix with sdk v0.52 ## [`v28.7.0`](https://github.com/ignite/cli/releases/tag/v28.7.0) From bcda14999ab7bd6350e163705e6623a0f7c3f900 Mon Sep 17 00:00:00 2001 From: Senna46 <29295263+Senna46@users.noreply.github.com> Date: Fri, 31 Jan 2025 23:42:32 +0900 Subject: [PATCH 4/4] chore: changes --- changelog.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changelog.md b/changelog.md index 593eab3f6a..51431c74b4 100644 --- a/changelog.md +++ b/changelog.md @@ -47,6 +47,7 @@ - [#4361](https://github.com/ignite/cli/pull/4361) Remove unused `KeyPrefix` method - [#4384](https://github.com/ignite/cli/pull/4384) Compare genesis params into chain genesis tests - [#4463](https://github.com/ignite/cli/pull/4463) Run `chain simulation` with any simulation test case +- [#4486](https://github.com/ignite/cli/pull/4486) Fix issue when set account prefix with sdk v0.52 ### Fixes @@ -56,7 +57,6 @@ - [#4402](https://github.com/ignite/cli/pull/4402) Fix gentx parser into the cosmosutil package - [#4474](https://github.com/ignite/cli/pull/4474) Fix issue in `build --release` command - [#4479](https://github.com/ignite/cli/pull/4479) Scaffold an `uint64 type crashs Ignite -- [#4486](https://github.com/ignite/cli/pull/4486) Fix issue when set account prefix with sdk v0.52 ## [`v28.7.0`](https://github.com/ignite/cli/releases/tag/v28.7.0)