diff options
author | Brandon Millman <brandon.millman@gmail.com> | 2018-10-30 03:51:38 +0800 |
---|---|---|
committer | Brandon Millman <brandon.millman@gmail.com> | 2018-10-30 03:52:32 +0800 |
commit | aeec8f47ef9f72d73674f625a381f60df8a3246a (patch) | |
tree | 56639fa21ff4907defb8b30557ed02d951ebe675 /packages/instant/src/components/buy_button.tsx | |
parent | fdf9e860dedf5dbe7840951f304a33ac2d7b1b51 (diff) | |
download | dexon-sol-tools-aeec8f47ef9f72d73674f625a381f60df8a3246a.tar dexon-sol-tools-aeec8f47ef9f72d73674f625a381f60df8a3246a.tar.gz dexon-sol-tools-aeec8f47ef9f72d73674f625a381f60df8a3246a.tar.bz2 dexon-sol-tools-aeec8f47ef9f72d73674f625a381f60df8a3246a.tar.lz dexon-sol-tools-aeec8f47ef9f72d73674f625a381f60df8a3246a.tar.xz dexon-sol-tools-aeec8f47ef9f72d73674f625a381f60df8a3246a.tar.zst dexon-sol-tools-aeec8f47ef9f72d73674f625a381f60df8a3246a.zip |
feat(instant): add default gasPrice of 6 gwei to transactions
Diffstat (limited to 'packages/instant/src/components/buy_button.tsx')
-rw-r--r-- | packages/instant/src/components/buy_button.tsx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/packages/instant/src/components/buy_button.tsx b/packages/instant/src/components/buy_button.tsx index 129aedaf3..e65e62e47 100644 --- a/packages/instant/src/components/buy_button.tsx +++ b/packages/instant/src/components/buy_button.tsx @@ -2,7 +2,7 @@ import { AssetBuyer, AssetBuyerError, BuyQuote } from '@0x/asset-buyer'; import * as _ from 'lodash'; import * as React from 'react'; -import { WEB_3_WRAPPER_TRANSACTION_FAILED_ERROR_MSG_PREFIX } from '../constants'; +import { DEFAULT_GAS_PRICE, WEB_3_WRAPPER_TRANSACTION_FAILED_ERROR_MSG_PREFIX } from '../constants'; import { ColorOption } from '../style/theme'; import { ZeroExInstantError } from '../types'; import { getBestAddress } from '../util/address'; @@ -57,7 +57,8 @@ export class BuyButton extends React.Component<BuyButtonProps> { let txHash: string | undefined; try { - txHash = await assetBuyer.executeBuyQuoteAsync(buyQuote, { takerAddress }); + const gasPrice = DEFAULT_GAS_PRICE; + txHash = await assetBuyer.executeBuyQuoteAsync(buyQuote, { gasPrice, takerAddress }); } catch (e) { if (e instanceof Error) { if (e.message === AssetBuyerError.SignatureRequestDenied) { |