From d542942072042db9f5c296cb9b8b1ccbc7570be5 Mon Sep 17 00:00:00 2001 From: Nur Fikri Date: Sat, 28 Sep 2024 17:56:15 +0700 Subject: [PATCH 1/2] fix: remove derived bech32 address --- .../src/actions/wallet/wallet-connect/index.ts | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/packages/graz/src/actions/wallet/wallet-connect/index.ts b/packages/graz/src/actions/wallet/wallet-connect/index.ts index c8a5886..dee34ac 100644 --- a/packages/graz/src/actions/wallet/wallet-connect/index.ts +++ b/packages/graz/src/actions/wallet/wallet-connect/index.ts @@ -1,5 +1,4 @@ import type { AminoSignResponse } from "@cosmjs/amino"; -import { fromBech32, toBech32 } from "@cosmjs/encoding"; import type { AccountData, Algo, DirectSignResponse } from "@cosmjs/proto-signing"; import type { Keplr, Key } from "@keplr-wallet/types"; import { SignClient } from "@walletconnect/sign-client"; @@ -250,13 +249,15 @@ export const getWalletConnect = (params?: GetWalletConnectParams): Wallet => { const acc = _acc[0]; if (!acc) return reject(new Error("No accounts")); const resAcc: Record = {}; - chainId.forEach((x) => { - resAcc[x] = { - ...acc, - bech32Address: toBech32( - chains!.find((y) => y.chainId === x)!.bech32Config.bech32PrefixAccAddr, - fromBech32(_acc[0]!.bech32Address).data, - ), + _acc.forEach((x) => { + resAcc[x.chainId!] = { + address: x.address, + algo: x.algo as Algo, + bech32Address: x.bech32Address, + isNanoLedger: x.isNanoLedger, + isKeystone: x.isKeystone, + name: x.name, + pubKey: x.pubKey, }; }); From c460ea140f503b140fe5efa3cc68bcccfdebb834 Mon Sep 17 00:00:00 2001 From: Nur Fikri Date: Sat, 28 Sep 2024 17:56:41 +0700 Subject: [PATCH 2/2] chore: release 0.1.25 --- packages/graz/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/graz/package.json b/packages/graz/package.json index 418aba1..842677c 100644 --- a/packages/graz/package.json +++ b/packages/graz/package.json @@ -1,7 +1,7 @@ { "name": "graz", "description": "React hooks for Cosmos", - "version": "0.1.24", + "version": "0.1.25", "author": "Griko Nibras ", "repository": "https://github.com/graz-sh/graz.git", "homepage": "https://github.com/graz-sh/graz",