Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Commit

Permalink
Fix linting fro JSX
Browse files Browse the repository at this point in the history
  • Loading branch information
ngotchac committed Dec 29, 2016
1 parent 53f1bd8 commit daf3d84
Show file tree
Hide file tree
Showing 4 changed files with 72 additions and 43 deletions.
36 changes: 22 additions & 14 deletions js/src/modals/AddContract/types.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,56 +21,64 @@ import { eip20, wallet } from '~/contracts/abi';

const ABI_TYPES = [
{
description:
description: (
<FormattedMessage
id='addContract.abiType.token.description'
defaultMessage='A standard {erc20} token'
values={ {
erc20:
erc20: (
<a href='https://github.com/ethereum/EIPs/issues/20' target='_blank'>
<FormattedMessage
id='addContract.abiType.token.erc20'
defaultMessage='ERC 20' />
</a>
} } />,
label:
)
} } />
),
label: (
<FormattedMessage
id='addContract.abiType.token.label'
defaultMessage='Token' />,
defaultMessage='Token' />
),
readOnly: true,
type: 'token',
value: JSON.stringify(eip20)
},
{
description:
description: (
<FormattedMessage
id='addContract.abiType.multisigWallet.description'
defaultMessage='Ethereum Multisig contract {link}'
values={ {
link:
link: (
<a href='https://github.com/ethereum/dapp-bin/blob/master/wallet/wallet.sol' target='_blank'>
<FormattedMessage
id='addContract.abiType.multisigWallet.link'
defaultMessage='see contract code' />
</a>
} } />,
label:
)
} } />
),
label: (
<FormattedMessage
id='addContract.abiType.multisigWallet.label'
defaultMessage='Multisig Wallet' />,
defaultMessage='Multisig Wallet' />
),
readOnly: true,
type: 'multisig',
value: JSON.stringify(wallet)
},
{
description:
description: (
<FormattedMessage
id='addContract.abiType.custom.description'
defaultMessage='Contract created from custom ABI' />,
label:
defaultMessage='Contract created from custom ABI' />
),
label: (
<FormattedMessage
id='addContract.abiType.custom.label'
defaultMessage='Custom Contract' />,
defaultMessage='Custom Contract' />
),
type: 'custom',
value: ''
}
Expand Down
23 changes: 14 additions & 9 deletions js/src/modals/CreateAccount/errors.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,28 +18,33 @@ import React from 'react';
import { FormattedMessage } from 'react-intl';

export default {
noFile:
noFile: (
<FormattedMessage
id='createAccount.error.noFile'
defaultMessage='select a valid wallet file to import' />,
defaultMessage='select a valid wallet file to import' />
),

noKey:
noKey: (
<FormattedMessage
id='createAccount.error.noKey'
defaultMessage='you need to provide the raw private key' />,
defaultMessage='you need to provide the raw private key' />
),

noMatchPassword:
noMatchPassword: (
<FormattedMessage
id='createAccount.error.noMatchPassword'
defaultMessage='the supplied passwords does not match' />,
defaultMessage='the supplied passwords does not match' />
),

noName:
noName: (
<FormattedMessage
id='createAccount.error.noName'
defaultMessage='you need to specify a valid name for the account' />,
defaultMessage='you need to specify a valid name for the account' />
),

invalidKey:
invalidKey: (
<FormattedMessage
id='createAccount.error.invalidKey'
defaultMessage='the raw key needs to be hex, 64 characters in length and contain the prefix "0x"' />
)
};
27 changes: 18 additions & 9 deletions js/src/modals/DeployContract/deployContract.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,29 +34,33 @@ import { ERROR_CODES } from '~/api/transport/error';

const STEPS = {
CONTRACT_DETAILS: {
title:
title: (
<FormattedMessage
id='deployContract.title.details'
defaultMessage='contract details' />
)
},
CONTRACT_PARAMETERS: {
title:
title: (
<FormattedMessage
id='deployContract.title.parameters'
defaultMessage='contract parameters' />
)
},
DEPLOYMENT: {
waiting: true,
title:
title: (
<FormattedMessage
id='deployContract.title.deployment'
defaultMessage='deployment' />
)
},
COMPLETED: {
title:
title: (
<FormattedMessage
id='deployContract.title.completed'
defaultMessage='completed' />
)
}
};

Expand Down Expand Up @@ -495,48 +499,53 @@ class DeployContract extends Component {
case 'estimateGas':
case 'postTransaction':
this.setState({
deployState:
deployState: (
<FormattedMessage
id='deployContract.state.preparing'
defaultMessage='Preparing transaction for network transmission' />
)
});
return;

case 'checkRequest':
this.setState({
deployState:
deployState: (
<FormattedMessage
id='deployContract.state.waitSigner'
defaultMessage='Waiting for confirmation of the transaction in the Parity Secure Signer' />
)
});
return;

case 'getTransactionReceipt':
this.setState({
txhash: data.txhash,
deployState:
deployState: (
<FormattedMessage
id='deployContract.state.waitReceipt'
defaultMessage='Waiting for the contract deployment transaction receipt' />
)
});
return;

case 'hasReceipt':
case 'getCode':
this.setState({
deployState:
deployState: (
<FormattedMessage
id='deployContract.state.validatingCode'
defaultMessage='Validating the deployed contract code' />
)
});
return;

case 'completed':
this.setState({
deployState:
deployState: (
<FormattedMessage
id='deployContract.state.completed'
defaultMessage='The contract deployment has been completed' />
)
});
return;

Expand Down
29 changes: 18 additions & 11 deletions js/src/modals/ExecuteContract/executeContract.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,26 +39,31 @@ const STEP_BUSY_OR_ADVANCED = 1;
const STEP_BUSY = 2;

const TITLES = {
transfer:
transfer: (
<FormattedMessage
id='executeContract.steps.transfer'
defaultMessage='function details' />,
sending:
defaultMessage='function details' />
),
sending: (
<FormattedMessage
id='executeContract.steps.sending'
defaultMessage='sending' />,
complete:
defaultMessage='sending' />
),
complete: (
<FormattedMessage
id='executeContract.steps.complete'
defaultMessage='complete' />,
advanced:
defaultMessage='complete' />
),
advanced: (
<FormattedMessage
id='executeContract.steps.advanced'
defaultMessage='advanced options' />,
rejected:
defaultMessage='advanced options' />
),
rejected: (
<FormattedMessage
id='executeContract.steps.rejected'
defaultMessage='rejected' />
)
};
const STAGES_BASIC = [TITLES.transfer, TITLES.sending, TITLES.complete];
const STAGES_ADVANCED = [TITLES.transfer, TITLES.advanced, TITLES.sending, TITLES.complete];
Expand Down Expand Up @@ -398,10 +403,11 @@ class ExecuteContract extends Component {
.postTransaction(options, values)
.then((requestId) => {
this.setState({
busyState:
busyState: (
<FormattedMessage
id='executeContract.busy.waitAuth'
defaultMessage='Waiting for authorization in the Parity Signer' />
)
});

return api
Expand All @@ -420,10 +426,11 @@ class ExecuteContract extends Component {
sending: false,
step: finalstep,
txhash,
busyState:
busyState: (
<FormattedMessage
id='executeContract.busy.posted'
defaultMessage='Your transaction has been posted to the network' />
)
});
})
.catch((error) => {
Expand Down

0 comments on commit daf3d84

Please sign in to comment.