Skip to content

Commit

Permalink
fix: cosmostation walletconnect api changes
Browse files Browse the repository at this point in the history
  • Loading branch information
AaronCQL committed Aug 24, 2023
1 parent 688f648 commit 19bd5ba
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/wallet/wallets/cosmostation/CosmostationController.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Secp256k1PubKey } from "cosmes/client";
import { fromHexToUint8Array } from "cosmes/codec";
import { fromBase64ToUint8Array } from "cosmes/codec";

import { WalletName } from "../../constants/WalletName";
import { WalletType } from "../../constants/WalletType";
Expand Down Expand Up @@ -36,17 +36,17 @@ export class CosmostationController extends WalletController {
await this.wc.connect(chains.map(({ chainId }) => chainId));
for (let i = 0; i < chains.length; i++) {
const { chainId, rpc, gasPrice } = chains[i];
const { pubkey, algo } = await this.wc.getAccount(chainId);
const { pubkey, address } = await this.wc.getAccount(chainId);
const key = new Secp256k1PubKey({
key: fromHexToUint8Array(pubkey),
key: fromBase64ToUint8Array(pubkey),
});
wallets.set(
chainId,
new CosmostationWalletConnectV2(
this.wc,
chainId,
key,
algo, // ! cosmostatation mixed up the `algo` and `address` keys...
address,
rpc,
gasPrice
)
Expand Down

0 comments on commit 19bd5ba

Please sign in to comment.