Skip to content

Commit

Permalink
fix: keplr tc signer (#1189)
Browse files Browse the repository at this point in the history
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
towanTG and github-actions[bot] authored Feb 12, 2025
1 parent b08df80 commit e6a17eb
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/tricky-steaks-train.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@swapkit/wallet-keplr": patch
---

Fixes Keplr THORChain deposit signer
19 changes: 19 additions & 0 deletions packages/wallets/keplr/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {
filterSupportedChains,
setRequestClientConfig,
} from "@swapkit/helpers";
import type { ThorchainToolboxType } from "@swapkit/toolbox-cosmos";
import { chainRegistry } from "./chainRegistry";

declare global {
Expand Down Expand Up @@ -73,8 +74,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,
Expand Down

0 comments on commit e6a17eb

Please sign in to comment.