diff options
author | Fabio Berger <me@fabioberger.com> | 2018-07-14 02:12:37 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-14 02:12:37 +0800 |
commit | e2438330f588eba03d50c18943b24d6e7f9e9479 (patch) | |
tree | 33ba5ae3919d67c6a5faa7b0ed07249fa5b8d694 /packages/website/ts/components | |
parent | 9b387b8ec3c543b5c96d1887550797a2bb90fe94 (diff) | |
parent | 2f0a9148387b66d75b9ee3856e68f0ed3aa149de (diff) | |
download | dexon-sol-tools-e2438330f588eba03d50c18943b24d6e7f9e9479.tar dexon-sol-tools-e2438330f588eba03d50c18943b24d6e7f9e9479.tar.gz dexon-sol-tools-e2438330f588eba03d50c18943b24d6e7f9e9479.tar.bz2 dexon-sol-tools-e2438330f588eba03d50c18943b24d6e7f9e9479.tar.lz dexon-sol-tools-e2438330f588eba03d50c18943b24d6e7f9e9479.tar.xz dexon-sol-tools-e2438330f588eba03d50c18943b24d6e7f9e9479.tar.zst dexon-sol-tools-e2438330f588eba03d50c18943b24d6e7f9e9479.zip |
Merge pull request #874 from 0xProject/fix/request-timeout-issue
Fix Fetch Timeout Issue
Diffstat (limited to 'packages/website/ts/components')
-rw-r--r-- | packages/website/ts/components/order_json.tsx | 4 | ||||
-rw-r--r-- | packages/website/ts/components/token_balances.tsx | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/packages/website/ts/components/order_json.tsx b/packages/website/ts/components/order_json.tsx index 35188c024..7a732de6a 100644 --- a/packages/website/ts/components/order_json.tsx +++ b/packages/website/ts/components/order_json.tsx @@ -1,5 +1,5 @@ import { ECSignature } from '@0xproject/types'; -import { BigNumber, logUtils } from '@0xproject/utils'; +import { BigNumber, fetchAsync, logUtils } from '@0xproject/utils'; import * as _ from 'lodash'; import Paper from 'material-ui/Paper'; import TextField from 'material-ui/TextField'; @@ -148,7 +148,7 @@ You can see and fill it here: ${this.state.shareLink}`); const bitlyRequestUrl = `${constants.URL_BITLY_API}/v3/shorten?access_token=${ configs.BITLY_ACCESS_TOKEN }&longUrl=${longUrl}`; - const response = await fetch(bitlyRequestUrl); + const response = await fetchAsync(bitlyRequestUrl); const responseBody = await response.text(); const bodyObj = JSON.parse(responseBody); if (response.status !== 200 || bodyObj.status_code !== 200) { diff --git a/packages/website/ts/components/token_balances.tsx b/packages/website/ts/components/token_balances.tsx index 3fae83c00..1f2dfccb0 100644 --- a/packages/website/ts/components/token_balances.tsx +++ b/packages/website/ts/components/token_balances.tsx @@ -5,7 +5,7 @@ import { Styles, utils as sharedUtils, } from '@0xproject/react-shared'; -import { BigNumber, errorUtils, logUtils } from '@0xproject/utils'; +import { BigNumber, errorUtils, fetchAsync, logUtils } from '@0xproject/utils'; import { Web3Wrapper } from '@0xproject/web3-wrapper'; import * as _ from 'lodash'; import Dialog from 'material-ui/Dialog'; @@ -548,7 +548,7 @@ export class TokenBalances extends React.Component<TokenBalancesProps, TokenBala await utils.sleepAsync(ARTIFICIAL_FAUCET_REQUEST_DELAY); const segment = isEtherRequest ? 'ether' : 'zrx'; - const response = await fetch( + const response = await fetchAsync( `${constants.URL_TESTNET_FAUCET}/${segment}/${this.props.userAddress}?networkId=${this.props.networkId}`, ); const responseBody = await response.text(); |