aboutsummaryrefslogtreecommitdiffstats
path: root/packages/instant/src/components
diff options
context:
space:
mode:
authorSteve Klebanoff <steve.klebnaoff@gmail.com>2018-10-30 11:06:31 +0800
committerSteve Klebanoff <steve.klebnaoff@gmail.com>2018-10-30 11:06:31 +0800
commitf9eba65aee8e71de609801e640de4101af9645e6 (patch)
treede01bf0d4e72f45bcd02aa864f9bb68e92d48e55 /packages/instant/src/components
parent5901ee7e963a4413f49fffdd9477085229e7623f (diff)
downloaddexon-0x-contracts-f9eba65aee8e71de609801e640de4101af9645e6.tar.gz
dexon-0x-contracts-f9eba65aee8e71de609801e640de4101af9645e6.tar.zst
dexon-0x-contracts-f9eba65aee8e71de609801e640de4101af9645e6.zip
return estimated state
Diffstat (limited to 'packages/instant/src/components')
-rw-r--r--packages/instant/src/components/buy_button.tsx4
-rw-r--r--packages/instant/src/components/zero_ex_instant.tsx2
2 files changed, 3 insertions, 3 deletions
diff --git a/packages/instant/src/components/buy_button.tsx b/packages/instant/src/components/buy_button.tsx
index 93bd8e635..36cc32dbc 100644
--- a/packages/instant/src/components/buy_button.tsx
+++ b/packages/instant/src/components/buy_button.tsx
@@ -57,9 +57,9 @@ export class BuyButton extends React.Component<BuyButtonProps> {
}
let txHash: string | undefined;
- const gasPrice = await gasPriceEstimator.getFastAmountInWeiAsync();
+ const gasInfo = await gasPriceEstimator.getGasInfoAsync();
try {
- txHash = await assetBuyer.executeBuyQuoteAsync(buyQuote, { takerAddress, gasPrice });
+ txHash = await assetBuyer.executeBuyQuoteAsync(buyQuote, { takerAddress, gasPrice: gasInfo.gasPriceInWei });
} catch (e) {
if (e instanceof Error) {
if (e.message === AssetBuyerError.SignatureRequestDenied) {
diff --git a/packages/instant/src/components/zero_ex_instant.tsx b/packages/instant/src/components/zero_ex_instant.tsx
index d54dfc153..365c1610f 100644
--- a/packages/instant/src/components/zero_ex_instant.tsx
+++ b/packages/instant/src/components/zero_ex_instant.tsx
@@ -83,7 +83,7 @@ export class ZeroExInstant extends React.Component<ZeroExInstantProps> {
// warm up the gas price estimator cache just in case we can't
// grab the gas price estimate when submitting the transaction
// tslint:disable-next-line:no-floating-promises
- gasPriceEstimator.getFastAmountInWeiAsync();
+ gasPriceEstimator.getGasInfoAsync();
// tslint:disable-next-line:no-floating-promises
this._flashErrorIfWrongNetwork();