Skip to content

Commit f5bb85b

Browse files
committed
refactor: use getSigningAgoricClientOptions()
1 parent 9f7fe5c commit f5bb85b

File tree

1 file changed

+4
-18
lines changed

1 file changed

+4
-18
lines changed

packages/web-components/src/wallet-connection/connectKeplr.js

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,7 @@
11
// @ts-check
2-
import { Registry } from '@cosmjs/proto-signing';
3-
import {
4-
SigningStargateClient,
5-
AminoTypes,
6-
defaultRegistryTypes,
7-
createBankAminoConverters,
8-
createAuthzAminoConverters,
9-
} from '@cosmjs/stargate';
2+
import { getSigningAgoricClientOptions } from '@agoric/cosmic-proto';
3+
import { SigningStargateClient } from '@cosmjs/stargate';
104
import { Errors } from './errors.js';
11-
import { agoricConverters, agoricRegistryTypes } from './signerOptions.js';
12-
135
/** @typedef {import('@keplr-wallet/types').Keplr} Keplr */
146

157
/**
@@ -44,14 +36,8 @@ export const connectKeplr = async (chainId, rpc) => {
4436
const signingClient = await SigningStargateClient.connectWithSigner(
4537
rpc,
4638
offlineSigner,
47-
{
48-
aminoTypes: new AminoTypes({
49-
...agoricConverters,
50-
...createBankAminoConverters(),
51-
...createAuthzAminoConverters(),
52-
}),
53-
registry: new Registry([...defaultRegistryTypes, ...agoricRegistryTypes]),
54-
},
39+
// @ts-expect-error version mismatch of private 'types' field
40+
getSigningAgoricClientOptions(),
5541
);
5642

5743
return {

0 commit comments

Comments
 (0)