Use keplr helpers on app

This commit is contained in:
abefernan
2024-06-19 17:01:16 +02:00
parent 4ed8512db5
commit 8912968600
6 changed files with 31 additions and 163 deletions
+2 -6
View File
@@ -2,6 +2,7 @@ import { Alert, AlertDescription } from "@/components/ui/alert";
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card";
import { isChainInfoFilled } from "@/context/ChainsContext/helpers";
import { checkAddress } from "@/lib/displayHelpers";
import { getKeplrKey } from "@/lib/keplr";
import {
HostedMultisig,
createMultisigFromCompressedSecp256k1Pubkeys,
@@ -44,12 +45,7 @@ export default function MultisigView() {
"Pubkey on chain is not of type MultisigThreshold",
);
await window.keplr.enable(chain.chainId);
window.keplr.defaultOptions = {
sign: { preferNoSetFee: true, preferNoSetMemo: true, disableBalanceCheck: true },
};
const { bech32Address: address } = await window.keplr.getKey(chain.chainId);
const { bech32Address: address } = await getKeplrKey(chain.chainId);
await createMultisigFromCompressedSecp256k1Pubkeys(
newHostedMultisig.accountOnChain.pubkey.value.pubkeys.map((p) => p.value),