Add missing type definitions
This commit is contained in:
@@ -18,7 +18,7 @@ interface BlockchainErrDialogProps {
|
||||
}
|
||||
|
||||
export class BlockchainErrDialog extends React.Component<BlockchainErrDialogProps, undefined> {
|
||||
public render() {
|
||||
public render(): React.ReactNode {
|
||||
const dialogActions = [
|
||||
<FlatButton
|
||||
key="blockchainErrOk"
|
||||
@@ -45,7 +45,7 @@ export class BlockchainErrDialog extends React.Component<BlockchainErrDialogProp
|
||||
</Dialog>
|
||||
);
|
||||
}
|
||||
private _getTitle(hasWalletAddress: boolean) {
|
||||
private _getTitle(hasWalletAddress: boolean): string {
|
||||
if (this.props.blockchainErr === BlockchainErrs.AContractNotDeployedOnNetwork) {
|
||||
return '0x smart contracts not found';
|
||||
} else if (!hasWalletAddress) {
|
||||
@@ -58,7 +58,7 @@ export class BlockchainErrDialog extends React.Component<BlockchainErrDialogProp
|
||||
return 'Unexpected error';
|
||||
}
|
||||
}
|
||||
private _renderExplanation(hasWalletAddress: boolean) {
|
||||
private _renderExplanation(hasWalletAddress: boolean): React.ReactNode {
|
||||
if (this.props.blockchainErr === BlockchainErrs.AContractNotDeployedOnNetwork) {
|
||||
return this._renderContractsNotDeployedExplanation();
|
||||
} else if (!hasWalletAddress) {
|
||||
@@ -71,7 +71,7 @@ export class BlockchainErrDialog extends React.Component<BlockchainErrDialogProp
|
||||
return this._renderUnexpectedErrorExplanation();
|
||||
}
|
||||
}
|
||||
private _renderDisconnectedFromNode() {
|
||||
private _renderDisconnectedFromNode(): React.ReactNode {
|
||||
return (
|
||||
<div>
|
||||
You were disconnected from the backing Ethereum node. If using{' '}
|
||||
@@ -86,7 +86,7 @@ export class BlockchainErrDialog extends React.Component<BlockchainErrDialogProp
|
||||
</div>
|
||||
);
|
||||
}
|
||||
private _renderDefaultTokenNotInTokenRegistry() {
|
||||
private _renderDefaultTokenNotInTokenRegistry(): React.ReactNode {
|
||||
return (
|
||||
<div>
|
||||
The TokenRegistry deployed on your network does not contain the needed default tokens for 0x Portal to
|
||||
@@ -96,10 +96,10 @@ export class BlockchainErrDialog extends React.Component<BlockchainErrDialogProp
|
||||
</div>
|
||||
);
|
||||
}
|
||||
private _renderUnexpectedErrorExplanation() {
|
||||
private _renderUnexpectedErrorExplanation(): React.ReactNode {
|
||||
return <div>We encountered an unexpected error. Please try refreshing the page.</div>;
|
||||
}
|
||||
private _renderNoWalletFoundExplanation() {
|
||||
private _renderNoWalletFoundExplanation(): React.ReactNode {
|
||||
return (
|
||||
<div>
|
||||
<div>
|
||||
@@ -137,7 +137,7 @@ export class BlockchainErrDialog extends React.Component<BlockchainErrDialogProp
|
||||
</div>
|
||||
);
|
||||
}
|
||||
private _renderContractsNotDeployedExplanation() {
|
||||
private _renderContractsNotDeployedExplanation(): React.ReactNode {
|
||||
return (
|
||||
<div>
|
||||
<div>
|
||||
|
Reference in New Issue
Block a user