diff --git a/public/firefox.manifest.json b/public/firefox.manifest.json index 989de1dd3..5c0580dff 100644 --- a/public/firefox.manifest.json +++ b/public/firefox.manifest.json @@ -1,7 +1,7 @@ { "manifest_version": 2, "name": "Station Wallet", - "version": "7.2.7", + "version": "7.2.8", "background": { "scripts": ["background.js"], "persistent": true diff --git a/public/manifest.json b/public/manifest.json index dc1a3c23e..d6e38703c 100644 --- a/public/manifest.json +++ b/public/manifest.json @@ -1,7 +1,7 @@ { "manifest_version": 3, "name": "Station Wallet", - "version": "7.2.7", + "version": "7.2.8", "background": { "service_worker": "background.js", "type": "module" diff --git a/src/auth/scripts/decrypt.ts b/src/auth/scripts/decrypt.ts index 2a98ddde5..e5b1d2760 100644 --- a/src/auth/scripts/decrypt.ts +++ b/src/auth/scripts/decrypt.ts @@ -21,7 +21,7 @@ const decrypt = (transitmessage: string, pass: string) => { const decoded = decrypted.toString(CryptoJS.enc.Utf8) - if (!decoded || decrypted.sigBytes < 16) throw new Error("Incorrect password") + if (!decoded || decrypted.sigBytes < 8) throw new Error("Incorrect password") return decoded } diff --git a/src/extension/modules/ConfirmTx.tsx b/src/extension/modules/ConfirmTx.tsx index 3192b4ce1..b99a50c42 100644 --- a/src/extension/modules/ConfirmTx.tsx +++ b/src/extension/modules/ConfirmTx.tsx @@ -18,12 +18,6 @@ import ExtensionPage from "../components/ExtensionPage" import ConfirmButtons from "../components/ConfirmButtons" import TxDetails from "./TxDetails" import OriginCard from "extension/components/OriginCard" -import { RefetchOptions, queryKey } from "data/query" -import { useQuery } from "react-query" -import { useInterchainAddresses } from "auth/hooks/useAddress" -import { useChainID, useNetwork } from "data/wallet" -import { useInterchainLCDClient } from "data/queries/lcdClient" -import { Fee } from "@terra-money/feather.js" interface Values { password: string @@ -35,12 +29,6 @@ const ConfirmTx = (props: TxRequest | SignBytesRequest) => { const { wallet, ...auth } = useAuth() const { actions } = useRequest() const passwordRequired = isWallet.single(wallet) - const addresses = useInterchainAddresses() - const network = useNetwork() - const lcd = useInterchainLCDClient() - const terraChainID = useChainID() - const chainID = - "tx" in props ? props.tx.chainID ?? terraChainID : terraChainID /* form */ const form = useForm({ @@ -72,61 +60,6 @@ const ConfirmTx = (props: TxRequest | SignBytesRequest) => { ? t("Enter password") : "" - const { data: estimatedGas, ...estimatedGasState } = useQuery( - [queryKey.tx.create, props, addresses?.[chainID], network[chainID]], - async () => { - if (!("tx" in props)) return 0 - const { tx } = props - - try { - if (!addresses || !addresses[tx.chainID] || !network[tx.chainID]) - return 0 - const { baseAsset, gasPrices } = network[tx.chainID] - - const feeDenom = - baseAsset in gasPrices ? baseAsset : Object.keys(gasPrices)[0] - - const unsignedTx = await lcd.tx.create( - [{ address: addresses[tx.chainID] }], - { - ...tx, - feeDenoms: [feeDenom], - } - ) - - return unsignedTx.auth_info.fee.gas_limit - } catch (error) { - console.error(error) - return 200_000 - } - }, - { - ...RefetchOptions.INFINITY, - // To handle sequence mismatch - retry: 3, - retryDelay: 1000, - refetchOnWindowFocus: false, - enabled: - "tx" in props && !props.tx.fee?.gas_limit && !!addresses?.[chainID], - } - ) - - let fee: Fee | undefined - - if ("tx" in props && network[props.tx.chainID]) { - const { tx } = props - fee = tx.fee - if (!tx.fee?.gas_limit) { - const { baseAsset, gasPrices, gasAdjustment } = network[tx.chainID] - const gas = (estimatedGas ?? 0) * gasAdjustment - - const feeDenom = - baseAsset in gasPrices ? baseAsset : Object.keys(gasPrices)[0] - - fee = new Fee(gas, { [feeDenom]: gasPrices[feeDenom] * gas }) - } - } - const navigate = useNavigate() const toPostMultisigTx = useToPostMultisigTx() const submit = async ({ password }: Values) => { @@ -134,7 +67,7 @@ const ConfirmTx = (props: TxRequest | SignBytesRequest) => { if ("tx" in props) { const { requestType, tx, signMode } = props - const txOptions = { ...tx, fee } + const txOptions = tx try { if (disabled) throw new Error(disabled) @@ -206,17 +139,6 @@ const ConfirmTx = (props: TxRequest | SignBytesRequest) => { const SIZE = { width: 100, height: 100 } const label = props.requestType === "post" ? t("Post") : t("Sign") - if (estimatedGasState.isLoading) { - return ( - - - {t("Estimating -

{t("Estimating fees...")}

-
-
- ) - } - return submitting ? ( @@ -227,7 +149,7 @@ const ConfirmTx = (props: TxRequest | SignBytesRequest) => { ) : ( }> - {"tx" in props && } + {"tx" in props && } {warning && {warning}} {error && {error}} diff --git a/src/pages/custom/ManageCustomTokens.tsx b/src/pages/custom/ManageCustomTokens.tsx index a728f285d..e227e0308 100644 --- a/src/pages/custom/ManageCustomTokens.tsx +++ b/src/pages/custom/ManageCustomTokens.tsx @@ -116,7 +116,6 @@ const Component = ({ whitelist, keyword }: Props) => { const ManageCustomTokens = () => { const { data: cw20, ...cw20WhitelistState } = useCW20Whitelist() - console.log(cw20) const { whitelist } = useWhitelist() const networkName = useNetworkName() diff --git a/src/pages/wallet/IbcSendBackTx.tsx b/src/pages/wallet/IbcSendBackTx.tsx index 545da3f59..0e345777b 100644 --- a/src/pages/wallet/IbcSendBackTx.tsx +++ b/src/pages/wallet/IbcSendBackTx.tsx @@ -129,12 +129,10 @@ function IbcSendBackTx({ token, chainID }: Props) { if (waitUntil) { ;(async () => { while (maxIterations--) { - console.log(waitUntil) const tokenBalance = await getBalance( waitUntil.denom, waitUntil.chainID ) - console.log(tokenBalance) if (Number(tokenBalance) > waitUntil.balance) { setWaitUntil(undefined) @@ -318,7 +316,7 @@ function IbcSendBackTx({ token, chainID }: Props) { {state.isLoading &&

{t("Loading...")}

} {isLoading && ( <> -

{t("Waiting fo on-chain confirmation...")}

+

{t("Waiting for on-chain confirmation...")}

{t("This may take a few minutes")}

)}