An unexpected error occurred while trying to request test Ether from our faucet. Please refresh
@@ -476,13 +476,13 @@ export class TokenBalances extends React.Component
);
- case BalanceErrs.faucetQueueIsFull:
+ case BalanceErrs.FaucetQueueIsFull:
return Our test Ether faucet queue is full. Please try requesting test Ether again later.
;
- case BalanceErrs.mintingFailed:
+ case BalanceErrs.MintingFailed:
return Minting your test tokens failed unexpectedly. Please refresh the page and try again.
;
- case BalanceErrs.allowanceSettingFailed:
+ case BalanceErrs.AllowanceSettingFailed:
return (
An unexpected error occurred while trying to set your test token allowance. Please refresh the
@@ -521,7 +521,7 @@ export class TokenBalances extends React.Component ${responseBody}`);
const errorType =
response.status === constants.UNAVAILABLE_STATUS
- ? BalanceErrs.faucetQueueIsFull
- : BalanceErrs.faucetRequestFailed;
+ ? BalanceErrs.FaucetQueueIsFull
+ : BalanceErrs.FaucetRequestFailed;
this.setState({
errorType,
});
diff --git a/packages/website/ts/components/ui/alert.tsx b/packages/website/ts/components/ui/alert.tsx
index 32e0f1be8..c7a5b9030 100644
--- a/packages/website/ts/components/ui/alert.tsx
+++ b/packages/website/ts/components/ui/alert.tsx
@@ -8,7 +8,7 @@ interface AlertProps {
}
export const Alert = (props: AlertProps) => {
- const isAlert = props.type === AlertTypes.ERROR;
+ const isAlert = props.type === AlertTypes.Error;
const errMsgStyles = {
background: isAlert ? colors.red200 : colors.lightestGreen,
color: colors.white,
diff --git a/packages/website/ts/components/ui/lifecycle_raised_button.tsx b/packages/website/ts/components/ui/lifecycle_raised_button.tsx
index a8daf4102..f004dd47f 100644
--- a/packages/website/ts/components/ui/lifecycle_raised_button.tsx
+++ b/packages/website/ts/components/ui/lifecycle_raised_button.tsx
@@ -6,9 +6,9 @@ import * as React from 'react';
const COMPLETE_STATE_SHOW_LENGTH_MS = 2000;
enum ButtonState {
- READY,
- LOADING,
- COMPLETE,
+ Ready,
+ Loading,
+ Complete,
}
interface LifeCycleRaisedButtonProps {
@@ -38,7 +38,7 @@ export class LifeCycleRaisedButton extends React.Component
);
}
public async onClickAsync(): Promise {
this.setState({
- buttonState: ButtonState.LOADING,
+ buttonState: ButtonState.Loading,
});
const didSucceed = await this.props.onClickAsyncFn();
if (this._didUnmount) {
@@ -86,16 +86,16 @@ export class LifeCycleRaisedButton extends React.Component {
this.setState({
- buttonState: ButtonState.READY,
+ buttonState: ButtonState.Ready,
});
}, COMPLETE_STATE_SHOW_LENGTH_MS);
} else {
this.setState({
- buttonState: ButtonState.READY,
+ buttonState: ButtonState.Ready,
});
}
}
diff --git a/packages/website/ts/types.ts b/packages/website/ts/types.ts
index 50114e2d6..9492da5a5 100644
--- a/packages/website/ts/types.ts
+++ b/packages/website/ts/types.ts
@@ -83,12 +83,12 @@ export interface Fill {
}
export enum BalanceErrs {
- incorrectNetworkForFaucet,
- faucetRequestFailed,
- faucetQueueIsFull,
- mintingFailed,
- sendFailed,
- allowanceSettingFailed,
+ IncorrectNetworkForFaucet,
+ FaucetRequestFailed,
+ FaucetQueueIsFull,
+ MintingFailed,
+ SendFailed,
+ AllowanceSettingFailed,
}
export enum ActionTypes {
@@ -209,8 +209,8 @@ export enum ScreenWidths {
}
export enum AlertTypes {
- ERROR,
- SUCCESS,
+ Error,
+ Success,
}
export enum BlockchainErrs {
@@ -228,11 +228,11 @@ export enum BlockchainCallErrs {
}
export enum Environments {
- DEVELOPMENT = 'DEVELOPMENT',
- DOGFOOD = 'DOGFOOD',
- STAGING = 'STAGING',
- PRODUCTION = 'PRODUCTION',
- UNKNOWN = 'UNKNOWN',
+ Development = 'DEVELOPMENT',
+ Dogfood = 'DOGFOOD',
+ Staging = 'STAGING',
+ Production = 'PRODUCTION',
+ Unknown = 'UNKNOWN',
}
export type ContractInstance = any; // TODO: add type definition for Contract
@@ -323,9 +323,9 @@ export interface DialogConfigs {
}
export enum TokenVisibility {
- ALL = 'ALL',
- UNTRACKED = 'UNTRACKED',
- TRACKED = 'TRACKED',
+ All = 'ALL',
+ Untracked = 'UNTRACKED',
+ Tracked = 'TRACKED',
}
export interface VersionToFilePath {
@@ -350,7 +350,7 @@ export enum WebsitePaths {
Docs = '/docs',
ZeroExJs = '/docs/0x.js',
Home = '/',
- FAQ = '/faq',
+ FAQ = '/faq', // tslint:disable-line:enum-naming
About = '/about',
AboutMission = '/about/mission',
AboutTeam = '/about/team',
@@ -629,7 +629,7 @@ export enum BrowserType {
export enum OperatingSystemType {
Android = 'Android',
- iOS = 'iOS',
+ iOS = 'iOS', // tslint:disable-line:enum-naming
Mac = 'Mac',
Windows = 'Windows',
WindowsPhone = 'WindowsPhone',
diff --git a/packages/website/ts/utils/utils.ts b/packages/website/ts/utils/utils.ts
index 8cc0061de..890f1553a 100644
--- a/packages/website/ts/utils/utils.ts
+++ b/packages/website/ts/utils/utils.ts
@@ -342,18 +342,18 @@ export const utils = {
},
getEnvironment(): Environments {
if (utils.isDogfood()) {
- return Environments.DOGFOOD;
+ return Environments.Dogfood;
}
if (utils.isDevelopment()) {
- return Environments.DEVELOPMENT;
+ return Environments.Development;
}
if (utils.isStaging()) {
- return Environments.STAGING;
+ return Environments.Staging;
}
if (utils.isProduction()) {
- return Environments.PRODUCTION;
+ return Environments.Production;
}
- return Environments.UNKNOWN;
+ return Environments.Unknown;
},
getEthToken(tokenByAddress: TokenByAddress): Token {
return utils.getTokenBySymbol(constants.ETHER_TOKEN_SYMBOL, tokenByAddress);
--
cgit v1.2.3