Fix default options merging in helpers/connect
This commit is contained in:
parent
47220aa12f
commit
36d3fbbca6
@ -30,7 +30,13 @@ const connect = async (
|
||||
client: SigningCosmWasmClient;
|
||||
address: string;
|
||||
}> => {
|
||||
const options: Options = { ...defaultOptions, ...opts };
|
||||
const options: Options = {
|
||||
bech32prefix: opts.bech32prefix ?? defaultOptions.bech32prefix,
|
||||
feeToken: opts.feeToken ?? defaultOptions.feeToken,
|
||||
gasPrice: opts.gasPrice ?? defaultOptions.gasPrice,
|
||||
httpUrl: opts.httpUrl ?? defaultOptions.httpUrl,
|
||||
networkId: opts.networkId ?? defaultOptions.networkId,
|
||||
};
|
||||
const gasPrice = GasPrice.fromString(`${options.gasPrice}${options.feeToken}`);
|
||||
const wallet = await Secp256k1HdWallet.fromMnemonic(mnemonic);
|
||||
const [{ address }] = await wallet.getAccounts();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user