Fixed where the keplr overides txn fees.

This commit is contained in:
klk1236 2022-07-06 18:25:08 +04:00
parent 61082b01ee
commit 9b7c304ebe
2 changed files with 6 additions and 0 deletions

View File

@ -33,6 +33,9 @@ const TransactionSigning = (props: Props) => {
try {
assert(state.chain.chainId, "chainId missing");
await window.keplr.enable(state.chain.chainId);
window.keplr.defaultOptions = {
sign: { preferNoSetFee: !0, preferNoSetMemo: !0, disableBalanceCheck: !0 },
};
const tempWalletAccount = await window.keplr.getKey(state.chain.chainId);
console.log(tempWalletAccount);
const tempHasSigned = props.signatures.some(

View File

@ -4,6 +4,9 @@ import { EncodeObject } from "@cosmjs/proto-signing";
declare global {
interface Window {
keplr: {
defaultOptions: {
sign: { preferNoSetFee: boolean; preferNoSetMemo: boolean; disableBalanceCheck: boolean };
};
// eslint-disable-next-line @typescript-eslint/no-explicit-any
enable: (chainId: string) => any;
getKey: (chainId: string) => Promise<WalletAccount>;