Skip to content

Commit

Permalink
Update default timeout height offset
Browse files Browse the repository at this point in the history
  • Loading branch information
mattupham committed Sep 12, 2024
1 parent 7659ef0 commit 6c3b8fc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
3 changes: 0 additions & 3 deletions packages/stores/src/account/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,6 @@ import { WalletConnectionInProgressError } from "./wallet-errors";

export const GasMultiplier = 1.5;

const ONE_CLICK_TRADING_TIMEOUT_HEIGHT = BigInt(50); // 50 blocks for 1CT

export class AccountStore<Injects extends Record<string, any>[] = []> {
protected accountSetCreators: ChainedFunctionifyTuple<
AccountStore<Injects>,
Expand Down Expand Up @@ -921,7 +919,6 @@ export class AccountStore<Injects extends Record<string, any>[] = []> {
const txBodyBytes = registry.encodeTxBody({
messages,
memo,
timeoutHeight: ONE_CLICK_TRADING_TIMEOUT_HEIGHT,
nonCriticalExtensionOptions: [
{
typeUrl: "/osmosis.smartaccount.v1beta1.TxExtension",
Expand Down
4 changes: 2 additions & 2 deletions packages/stores/src/account/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,9 @@ export const UseOneClickTradingLocalStorageKey = "use-one-click-enabled";
export const HasUsedOneClickTradingLocalStorageKey = "has-used-one-click";

// The number of heights from current before transaction times out.
// 30 heights * 5 second block time = 150 seconds before transaction
// 75 heights * 2 second block time = 150 seconds before transaction
// timeout and mempool eviction.
const defaultTimeoutHeightOffset = 30;
const defaultTimeoutHeightOffset = 75;

export const NEXT_TX_TIMEOUT_HEIGHT_OFFSET: bigint = BigInt(
process.env.TIMEOUT_HEIGHT_OFFSET
Expand Down

0 comments on commit 6c3b8fc

Please sign in to comment.