@0x/instant
: Fix for changed asset-swapper configs.
This commit is contained in:
parent
95bebd6d1d
commit
847a7f470c
@ -9,6 +9,10 @@
|
|||||||
{
|
{
|
||||||
"note": "Fix ERC721 asset support",
|
"note": "Fix ERC721 asset support",
|
||||||
"pr": 2491
|
"pr": 2491
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"note": "Remove `bridgeSlippage` SwapQuoter config.",
|
||||||
|
"pr": 2513
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
@ -30,8 +30,6 @@ export const ONE_SECOND_MS = 1000;
|
|||||||
export const ONE_MINUTE_MS = ONE_SECOND_MS * 60;
|
export const ONE_MINUTE_MS = ONE_SECOND_MS * 60;
|
||||||
export const GIT_SHA = process.env.GIT_SHA;
|
export const GIT_SHA = process.env.GIT_SHA;
|
||||||
export const NODE_ENV = process.env.NODE_ENV;
|
export const NODE_ENV = process.env.NODE_ENV;
|
||||||
export const ERC20_SWAP_QUOTE_SLIPPAGE_PERCENTAGE = 0.2;
|
|
||||||
export const ERC721_SWAP_QUOTE_SLIPPAGE_PERCENTAGE = 0;
|
|
||||||
export const NPM_PACKAGE_VERSION = process.env.NPM_PACKAGE_VERSION;
|
export const NPM_PACKAGE_VERSION = process.env.NPM_PACKAGE_VERSION;
|
||||||
export const DEFAULT_UNKOWN_ASSET_NAME = '???';
|
export const DEFAULT_UNKOWN_ASSET_NAME = '???';
|
||||||
export const ACCOUNT_UPDATE_INTERVAL_TIME_MS = ONE_SECOND_MS * 5;
|
export const ACCOUNT_UPDATE_INTERVAL_TIME_MS = ONE_SECOND_MS * 5;
|
||||||
|
@ -4,7 +4,6 @@ import { BigNumber } from '@0x/utils';
|
|||||||
import { Web3Wrapper } from '@0x/web3-wrapper';
|
import { Web3Wrapper } from '@0x/web3-wrapper';
|
||||||
import { Dispatch } from 'redux';
|
import { Dispatch } from 'redux';
|
||||||
|
|
||||||
import { ERC20_SWAP_QUOTE_SLIPPAGE_PERCENTAGE, ERC721_SWAP_QUOTE_SLIPPAGE_PERCENTAGE } from '../constants';
|
|
||||||
import { Action, actions } from '../redux/actions';
|
import { Action, actions } from '../redux/actions';
|
||||||
import { Asset, QuoteFetchOrigin } from '../types';
|
import { Asset, QuoteFetchOrigin } from '../types';
|
||||||
|
|
||||||
@ -37,10 +36,6 @@ export const swapQuoteUpdater = {
|
|||||||
}
|
}
|
||||||
const wethAssetData = await swapQuoter.getEtherTokenAssetDataOrThrowAsync();
|
const wethAssetData = await swapQuoter.getEtherTokenAssetDataOrThrowAsync();
|
||||||
let newSwapQuote: MarketBuySwapQuote | undefined;
|
let newSwapQuote: MarketBuySwapQuote | undefined;
|
||||||
const slippagePercentage =
|
|
||||||
asset.metaData.assetProxyId === AssetProxyId.ERC20
|
|
||||||
? ERC20_SWAP_QUOTE_SLIPPAGE_PERCENTAGE
|
|
||||||
: ERC721_SWAP_QUOTE_SLIPPAGE_PERCENTAGE;
|
|
||||||
try {
|
try {
|
||||||
const gasInfo = await gasPriceEstimator.getGasInfoAsync();
|
const gasInfo = await gasPriceEstimator.getGasInfoAsync();
|
||||||
newSwapQuote = await swapQuoter.getMarketBuySwapQuoteForAssetDataAsync(
|
newSwapQuote = await swapQuoter.getMarketBuySwapQuoteForAssetDataAsync(
|
||||||
@ -48,7 +43,6 @@ export const swapQuoteUpdater = {
|
|||||||
wethAssetData,
|
wethAssetData,
|
||||||
baseUnitValue,
|
baseUnitValue,
|
||||||
{
|
{
|
||||||
slippagePercentage,
|
|
||||||
gasPrice: gasInfo.gasPriceInWei,
|
gasPrice: gasInfo.gasPriceInWei,
|
||||||
// Only use native orders
|
// Only use native orders
|
||||||
// excludedSources: [ERC20BridgeSource.Eth2Dai, ERC20BridgeSource.Kyber, ERC20BridgeSource.Uniswap],
|
// excludedSources: [ERC20BridgeSource.Eth2Dai, ERC20BridgeSource.Kyber, ERC20BridgeSource.Uniswap],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user