aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website
diff options
context:
space:
mode:
Diffstat (limited to 'packages/website')
-rw-r--r--packages/website/package.json13
-rw-r--r--packages/website/ts/components/token_balances.tsx69
-rw-r--r--packages/website/ts/globals.d.ts3
3 files changed, 0 insertions, 85 deletions
diff --git a/packages/website/package.json b/packages/website/package.json
index d3c5566d1..7d0c68b47 100644
--- a/packages/website/package.json
+++ b/packages/website/package.json
@@ -28,10 +28,7 @@
"accounting": "^0.4.1",
"basscss": "^8.0.3",
"blockies": "^0.0.2",
- "dateformat": "^2.0.0",
"deep-equal": "^1.0.1",
- "dharma-loan-frame": "^0.0.12",
- "ethereumjs-tx": "^1.3.3",
"ethereumjs-util": "^5.1.1",
"find-versions": "^2.0.0",
"jsonschema": "^1.2.0",
@@ -39,25 +36,17 @@
"lodash": "^4.17.4",
"material-ui": "^0.17.1",
"moment": "2.21.0",
- "query-string": "^5.0.1",
"react": "15.6.1",
"react-copy-to-clipboard": "^4.2.3",
"react-document-title": "^2.0.3",
"react-dom": "15.6.1",
"react-ga": "^2.4.1",
- "react-html5video": "^2.1.0",
- "react-inlinesvg": "^0.5.5",
- "react-markdown": "^3.2.2",
- "react-recaptcha": "^2.3.2",
"react-redux": "^5.0.3",
"react-router-dom": "^4.1.1",
- "react-router-hash-link": "^1.1.0",
"react-scroll": "^1.5.2",
"react-tap-event-plugin": "^2.0.1",
"react-tooltip": "^3.2.7",
- "react-waypoint": "^7.0.4",
"redux": "^3.6.0",
- "scroll-to-element": "^2.0.0",
"semver-sort": "0.0.4",
"thenby": "^1.2.3",
"truffle-contract": "2.0.1",
@@ -68,13 +57,11 @@
},
"devDependencies": {
"@types/accounting": "^0.4.1",
- "@types/dateformat": "^1.0.1",
"@types/deep-equal": "^1.0.0",
"@types/jsonschema": "^1.1.1",
"@types/lodash": "4.14.104",
"@types/material-ui": "0.18.0",
"@types/node": "^8.0.53",
- "@types/query-string": "^5.0.1",
"@types/react": "^16.0.34",
"@types/react-copy-to-clipboard": "^4.2.0",
"@types/react-dom": "^16.0.3",
diff --git a/packages/website/ts/components/token_balances.tsx b/packages/website/ts/components/token_balances.tsx
index b4a710ef4..618b5fe8f 100644
--- a/packages/website/ts/components/token_balances.tsx
+++ b/packages/website/ts/components/token_balances.tsx
@@ -8,7 +8,6 @@ import {
utils as sharedUtils,
} from '@0xproject/react-shared';
import { BigNumber, logUtils } from '@0xproject/utils';
-import DharmaLoanFrame from 'dharma-loan-frame';
import * as _ from 'lodash';
import Dialog from 'material-ui/Dialog';
import Divider from 'material-ui/Divider';
@@ -79,7 +78,6 @@ interface TokenBalancesProps {
interface TokenBalancesState {
errorType: BalanceErrs;
isBalanceSpinnerVisible: boolean;
- isDharmaDialogVisible: boolean;
isZRXSpinnerVisible: boolean;
isTokenPickerOpen: boolean;
isAddingToken: boolean;
@@ -96,7 +94,6 @@ export class TokenBalances extends React.Component<TokenBalancesProps, TokenBala
errorType: undefined,
isBalanceSpinnerVisible: false,
isZRXSpinnerVisible: false,
- isDharmaDialogVisible: DharmaLoanFrame.isAuthTokenPresent(),
isTokenPickerOpen: false,
isAddingToken: false,
trackedTokenStateByAddress: initialTrackedTokenStateByAddress,
@@ -168,20 +165,8 @@ export class TokenBalances extends React.Component<TokenBalancesProps, TokenBala
onTouchTap={this._onErrorDialogToggle.bind(this, false)}
/>,
];
- const dharmaDialogActions = [
- <FlatButton
- key="dharmaCloseBtn"
- label="Close"
- primary={true}
- onTouchTap={this._onDharmaDialogToggle.bind(this, false)}
- />,
- ];
const isTestNetwork = utils.isTestNetwork(this.props.networkId);
const isKovanTestNetwork = this.props.networkId === constants.NETWORK_ID_KOVAN;
- const dharmaButtonColumnStyle = {
- paddingLeft: 3,
- display: isKovanTestNetwork ? 'table-cell' : 'none',
- };
const stubColumnStyle = {
display: isTestNetwork ? 'none' : 'table-cell',
};
@@ -190,11 +175,6 @@ export class TokenBalances extends React.Component<TokenBalancesProps, TokenBala
allTokenRowHeight < MAX_TOKEN_TABLE_HEIGHT ? allTokenRowHeight : MAX_TOKEN_TABLE_HEIGHT;
const isSmallScreen = this.props.screenWidth === ScreenWidths.Sm;
const tokenColSpan = isSmallScreen ? TOKEN_COL_SPAN_SM : TOKEN_COL_SPAN_LG;
- const dharmaLoanExplanation =
- 'If you need access to larger amounts of ether,<br> \
- you can request a loan from the Dharma Loan<br> \
- network. Your loan should be funded in 5<br> \
- minutes or less.';
const allowanceExplanation =
'0x smart contracts require access to your<br> \
token balances in order to execute trades.<br> \
@@ -226,12 +206,6 @@ export class TokenBalances extends React.Component<TokenBalancesProps, TokenBala
{isSmallScreen ? 'Faucet' : 'Request from faucet'}
</TableHeaderColumn>
)}
- {isKovanTestNetwork && (
- <TableHeaderColumn style={dharmaButtonColumnStyle}>
- {isSmallScreen ? 'Loan' : 'Request Dharma loan'}
- <HelpTooltip style={{ paddingLeft: 4 }} explanation={dharmaLoanExplanation} />
- </TableHeaderColumn>
- )}
</TableRow>
</TableHeader>
<TableBody displayRowCheckbox={false}>
@@ -258,15 +232,6 @@ export class TokenBalances extends React.Component<TokenBalancesProps, TokenBala
/>
</TableRowColumn>
)}
- {isKovanTestNetwork && (
- <TableRowColumn style={dharmaButtonColumnStyle}>
- <RaisedButton
- label="Request"
- style={{ width: '100%' }}
- onTouchTap={this._onDharmaDialogToggle.bind(this)}
- />
- </TableRowColumn>
- )}
</TableRow>
</TableBody>
</Table>
@@ -315,17 +280,6 @@ export class TokenBalances extends React.Component<TokenBalancesProps, TokenBala
>
{this._renderErrorDialogBody()}
</Dialog>
- <Dialog
- title="Request Dharma Loan"
- titleStyle={{ fontWeight: 100, backgroundColor: colors.white }}
- bodyStyle={{ backgroundColor: colors.dharmaDarkGrey }}
- actionsContainerStyle={{ backgroundColor: colors.white }}
- autoScrollBodyContent={true}
- actions={dharmaDialogActions}
- open={this.state.isDharmaDialogVisible}
- >
- {this._renderDharmaLoanFrame()}
- </Dialog>
<AssetPicker
userAddress={this.props.userAddress}
networkId={this.props.networkId}
@@ -545,24 +499,6 @@ export class TokenBalances extends React.Component<TokenBalancesProps, TokenBala
throw utils.spawnSwitchErr('errorType', this.state.errorType);
}
}
- private _renderDharmaLoanFrame() {
- if (sharedUtils.isUserOnMobile()) {
- return (
- <h4 style={{ textAlign: 'center' }}>
- We apologize -- Dharma loan requests are not available on mobile yet. Please try again through your
- desktop browser.
- </h4>
- );
- } else {
- return (
- <DharmaLoanFrame
- partner="0x"
- env={utils.getCurrentEnvironment()}
- screenWidth={this.props.screenWidth}
- />
- );
- }
- }
private _onErrorOccurred(errorType: BalanceErrs) {
this.setState({
errorType,
@@ -646,11 +582,6 @@ export class TokenBalances extends React.Component<TokenBalancesProps, TokenBala
errorType: undefined,
});
}
- private _onDharmaDialogToggle() {
- this.setState({
- isDharmaDialogVisible: !this.state.isDharmaDialogVisible,
- });
- }
private _onAddTokenClicked() {
this.setState({
isTokenPickerOpen: true,
diff --git a/packages/website/ts/globals.d.ts b/packages/website/ts/globals.d.ts
index fcf4c2434..2c2140485 100644
--- a/packages/website/ts/globals.d.ts
+++ b/packages/website/ts/globals.d.ts
@@ -1,12 +1,9 @@
declare module 'react-tooltip';
-declare module 'react-router-hash-link';
declare module 'truffle-contract';
declare module 'keccak';
declare module 'whatwg-fetch';
-declare module 'react-html5video';
declare module 'web3-provider-engine/subproviders/filters';
declare module 'thenby';
-declare module 'react-recaptcha';
declare module 'react-document-title';
declare module 'react-ga';