Skip to content

Commit

Permalink
refactor: use getSigningAgoricClientOptions()
Browse files Browse the repository at this point in the history
  • Loading branch information
turadg committed Mar 6, 2024
1 parent 9f7fe5c commit f5bb85b
Showing 1 changed file with 4 additions and 18 deletions.
22 changes: 4 additions & 18 deletions packages/web-components/src/wallet-connection/connectKeplr.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,7 @@
// @ts-check
import { Registry } from '@cosmjs/proto-signing';
import {
SigningStargateClient,
AminoTypes,
defaultRegistryTypes,
createBankAminoConverters,
createAuthzAminoConverters,
} from '@cosmjs/stargate';
import { getSigningAgoricClientOptions } from '@agoric/cosmic-proto';
import { SigningStargateClient } from '@cosmjs/stargate';
import { Errors } from './errors.js';
import { agoricConverters, agoricRegistryTypes } from './signerOptions.js';

/** @typedef {import('@keplr-wallet/types').Keplr} Keplr */

/**
Expand Down Expand Up @@ -44,14 +36,8 @@ export const connectKeplr = async (chainId, rpc) => {
const signingClient = await SigningStargateClient.connectWithSigner(
rpc,
offlineSigner,
{
aminoTypes: new AminoTypes({
...agoricConverters,
...createBankAminoConverters(),
...createAuthzAminoConverters(),
}),
registry: new Registry([...defaultRegistryTypes, ...agoricRegistryTypes]),
},
// @ts-expect-error version mismatch of private 'types' field
getSigningAgoricClientOptions(),
);

return {
Expand Down

0 comments on commit f5bb85b

Please sign in to comment.