diff --git a/.changeset/chilled-jobs-swim.md b/.changeset/chilled-jobs-swim.md new file mode 100644 index 000000000..6f2a7b955 --- /dev/null +++ b/.changeset/chilled-jobs-swim.md @@ -0,0 +1,27 @@ +--- +"@swapkit/wallet-evm-extensions": patch +"@swapkit/wallet-keepkey-bex": patch +"@swapkit/wallet-polkadotjs": patch +"@swapkit/plugin-chainflip": patch +"@swapkit/toolbox-cosmos": patch +"@swapkit/wallet-coinbase": patch +"@swapkit/wallet-keystore": patch +"@swapkit/wallet-talisman": patch +"@swapkit/helpers": patch +"@swapkit/wallet-phantom": patch +"@swapkit/tokens": patch +"@swapkit/wizard": patch +"@swapkit/toolbox-utxo": patch +"@swapkit/wallet-bitget": patch +"@swapkit/wallet-exodus": patch +"@swapkit/wallet-ledger": patch +"@swapkit/wallet-trezor": patch +"@swapkit/toolbox-evm": patch +"@swapkit/wallet-keplr": patch +"@swapkit/wallet-ctrl": patch +"@swapkit/api": patch +"@swapkit/wallet-okx": patch +"@swapkit/wallet-wc": patch +--- + +nightly bump diff --git a/packages/toolboxes/cosmos/src/thorchainUtils/types/client-types.ts b/packages/toolboxes/cosmos/src/thorchainUtils/types/client-types.ts index d9bd040b6..33a0367db 100644 --- a/packages/toolboxes/cosmos/src/thorchainUtils/types/client-types.ts +++ b/packages/toolboxes/cosmos/src/thorchainUtils/types/client-types.ts @@ -1,4 +1,9 @@ -import type { MultisigThresholdPubkey, Pubkey, Secp256k1HdWallet } from "@cosmjs/amino"; +import type { + MultisigThresholdPubkey, + OfflineAminoSigner, + Pubkey, + Secp256k1HdWallet, +} from "@cosmjs/amino"; import type { EncodeObject, OfflineDirectSigner, Registry } from "@cosmjs/proto-signing"; import type { AminoTypes, Account as CosmosAccount } from "@cosmjs/stargate"; import type { Asset, AssetValue, Chain, ChainId, SwapKitNumber } from "@swapkit/helpers"; @@ -33,7 +38,7 @@ export type NodeUrl = { }; export type DepositParam = { - signer?: OfflineDirectSigner; + signer?: OfflineDirectSigner | OfflineAminoSigner; walletIndex?: number; assetValue: AssetValue; memo: string; diff --git a/packages/wallets/keplr/src/index.ts b/packages/wallets/keplr/src/index.ts index ee4555f24..b4565db2e 100644 --- a/packages/wallets/keplr/src/index.ts +++ b/packages/wallets/keplr/src/index.ts @@ -10,6 +10,7 @@ import { filterSupportedChains, setRequestClientConfig, } from "@swapkit/helpers"; +import type { ThorchainToolboxType } from "@swapkit/toolbox-cosmos"; import { chainRegistry } from "./chainRegistry"; declare global { @@ -71,8 +72,26 @@ function connectKeplr({ from: params.from || address, }); + const deposit = + chain === Chain.THORChain + ? { + deposit: (params: { + from?: string; + assetValue: AssetValue; + memo?: string; + }) => + (toolbox as ThorchainToolboxType).deposit({ + ...params, + signer: offlineSigner, + from: params.from || address, + memo: params.memo || "", + }), + } + : {}; + addChain({ ...toolbox, + ...deposit, chain, transfer, address,