Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Commit

Permalink
fix: increase deadline (#341)
Browse files Browse the repository at this point in the history
  • Loading branch information
luizstacio authored Jun 23, 2022
1 parent f696780 commit 7a6473c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/app/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export const SLIPPAGE_TOLERANCE = 0.005;
/** Small network fee */
export const NETWORK_FEE = 1;
/** Default deadline */
export const DEADLINE = 5000;
export const DEADLINE = 99999999999;
/** Max presentation units to avoid show 9 decimals on screen */
export const FIXED_UNITS = 3;
/** Min gas price required from the fuel-core */
Expand Down
3 changes: 1 addition & 2 deletions packages/app/src/systems/Swap/utils/queries.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import type { SwapState } from '../types';
import { ActiveInput } from '../types';

import { DEADLINE } from '~/config';
import { COIN_ETH } from '~/systems/Core';
import type { TransactionCost } from '~/systems/Core/utils/gas';
import { getOverrides } from '~/systems/Core/utils/gas';
Expand Down Expand Up @@ -57,7 +58,6 @@ export const swapTokens = async (
{ coinFrom, direction, amount }: SwapState,
txCost: TransactionCost
) => {
const DEADLINE = 1000;
if (direction === ActiveInput.to && amount) {
const forwardAmount = await getSwapWithMaximumRequiredAmount(
contract,
Expand Down Expand Up @@ -96,7 +96,6 @@ export const swapTokens = async (
};

export const queryNetworkFee = (contract: ExchangeContractAbi, direction?: ActiveInput) => {
const DEADLINE = 1000;
const directionValue = direction || ActiveInput.from;
if (directionValue === ActiveInput.to) {
return contract.prepareCall.swap_with_maximum(1, DEADLINE, {
Expand Down

0 comments on commit 7a6473c

Please sign in to comment.