diff options
author | Whymarrh Whitby <whymarrh.whitby@gmail.com> | 2019-08-01 04:17:11 +0800 |
---|---|---|
committer | Frankie <frankie.diamond@gmail.com> | 2019-08-01 04:17:11 +0800 |
commit | 4d88e1cf862c3ae174780cd888d7703685db23e7 (patch) | |
tree | 93f7cd0e7bbcb42c7be310f0e6b12230eace9492 /ui/app/pages/send/send-content | |
parent | e9c7df28ed88f6dc3a5074cf873f3920429d1803 (diff) | |
download | tangerine-wallet-browser-4d88e1cf862c3ae174780cd888d7703685db23e7.tar tangerine-wallet-browser-4d88e1cf862c3ae174780cd888d7703685db23e7.tar.gz tangerine-wallet-browser-4d88e1cf862c3ae174780cd888d7703685db23e7.tar.bz2 tangerine-wallet-browser-4d88e1cf862c3ae174780cd888d7703685db23e7.tar.lz tangerine-wallet-browser-4d88e1cf862c3ae174780cd888d7703685db23e7.tar.xz tangerine-wallet-browser-4d88e1cf862c3ae174780cd888d7703685db23e7.tar.zst tangerine-wallet-browser-4d88e1cf862c3ae174780cd888d7703685db23e7.zip |
Enable indent linting via ESLint (#6936)
* Enable indent linting via ESLint
* yarn run lint:fix
Diffstat (limited to 'ui/app/pages/send/send-content')
6 files changed, 48 insertions, 48 deletions
diff --git a/ui/app/pages/send/send-content/add-recipient/add-recipient.selectors.js b/ui/app/pages/send/send-content/add-recipient/add-recipient.selectors.js index a6160d335..a39db7813 100644 --- a/ui/app/pages/send/send-content/add-recipient/add-recipient.selectors.js +++ b/ui/app/pages/send/send-content/add-recipient/add-recipient.selectors.js @@ -12,7 +12,7 @@ function getToDropdownOpen (state) { } function sendToIsInError (state) { - return Boolean(state.send.errors.to) + return Boolean(state.send.errors.to) } function sendToIsInWarning (state) { diff --git a/ui/app/pages/send/send-content/send-amount-row/amount-max-button/amount-max-button.component.js b/ui/app/pages/send/send-content/send-amount-row/amount-max-button/amount-max-button.component.js index 7901ccef6..05545669a 100644 --- a/ui/app/pages/send/send-content/send-amount-row/amount-max-button/amount-max-button.component.js +++ b/ui/app/pages/send/send-content/send-amount-row/amount-max-button/amount-max-button.component.js @@ -64,12 +64,12 @@ export default class AmountMaxButton extends Component { const { maxModeOn, buttonDataLoading, inError } = this.props return ( - <div className={'send-v2__amount-max'} onClick={buttonDataLoading || inError ? null : this.onMaxClick}> - <input type="checkbox" checked={maxModeOn} /> - <div className={classnames('send-v2__amount-max__button', { 'send-v2__amount-max__button__disabled': buttonDataLoading || inError })}> - {this.context.t('max')} - </div> - </div> - ) + <div className={'send-v2__amount-max'} onClick={buttonDataLoading || inError ? null : this.onMaxClick}> + <input type="checkbox" checked={maxModeOn} /> + <div className={classnames('send-v2__amount-max__button', { 'send-v2__amount-max__button__disabled': buttonDataLoading || inError })}> + {this.context.t('max')} + </div> + </div> + ) } } diff --git a/ui/app/pages/send/send-content/send-gas-row/gas-fee-display/gas-fee-display.component.js b/ui/app/pages/send/send-content/send-gas-row/gas-fee-display/gas-fee-display.component.js index 3f5587318..37af59e29 100644 --- a/ui/app/pages/send/send-content/send-gas-row/gas-fee-display/gas-fee-display.component.js +++ b/ui/app/pages/send/send-content/send-gas-row/gas-fee-display/gas-fee-display.component.js @@ -39,11 +39,11 @@ export default class GasFeeDisplay extends Component { ) : gasLoadingError ? <div className="currency-display.currency-display--message"> - {this.context.t('setGasPrice')} - </div> + {this.context.t('setGasPrice')} + </div> : <div className="currency-display"> - {this.context.t('loading')} - </div> + {this.context.t('loading')} + </div> } <button className="gas-fee-reset" diff --git a/ui/app/pages/send/send-content/send-gas-row/send-gas-row.component.js b/ui/app/pages/send/send-content/send-gas-row/send-gas-row.component.js index 4c09ed564..ed064695e 100644 --- a/ui/app/pages/send/send-content/send-gas-row/send-gas-row.component.js +++ b/ui/app/pages/send/send-content/send-gas-row/send-gas-row.component.js @@ -90,26 +90,26 @@ export default class SendGasRow extends Component { const { metricsEvent } = this.context const gasPriceButtonGroup = <div> - <GasPriceButtonGroup - className="gas-price-button-group--small" - showCheck={false} - {...gasPriceButtonGroupProps} - handleGasPriceSelection={async (...args) => { - metricsEvent({ - eventOpts: { - category: 'Transactions', - action: 'Edit Screen', - name: 'Changed Gas Button', - }, - }) - await gasPriceButtonGroupProps.handleGasPriceSelection(...args) - if (maxModeOn) { - this.setMaxAmount() - } - }} - /> - { this.renderAdvancedOptionsButton() } - </div> + <GasPriceButtonGroup + className="gas-price-button-group--small" + showCheck={false} + {...gasPriceButtonGroupProps} + handleGasPriceSelection={async (...args) => { + metricsEvent({ + eventOpts: { + category: 'Transactions', + action: 'Edit Screen', + name: 'Changed Gas Button', + }, + }) + await gasPriceButtonGroupProps.handleGasPriceSelection(...args) + if (maxModeOn) { + this.setMaxAmount() + } + }} + /> + { this.renderAdvancedOptionsButton() } + </div> const gasFeeDisplay = <GasFeeDisplay conversionRate={conversionRate} convertedCurrency={convertedCurrency} @@ -134,7 +134,7 @@ export default class SendGasRow extends Component { isSpeedUp={false} /> { this.renderAdvancedOptionsButton() } - </div> + </div> if (advancedInlineGasShown) { return advancedGasInputs diff --git a/ui/app/pages/send/send-content/send-row-wrapper/send-row-warning-message/send-row-warning-message.component.js b/ui/app/pages/send/send-content/send-row-wrapper/send-row-warning-message/send-row-warning-message.component.js index f1caa8f99..6ddddbb3d 100644 --- a/ui/app/pages/send/send-content/send-row-wrapper/send-row-warning-message/send-row-warning-message.component.js +++ b/ui/app/pages/send/send-content/send-row-wrapper/send-row-warning-message/send-row-warning-message.component.js @@ -18,7 +18,7 @@ export default class SendRowWarningMessage extends Component { const warningMessage = warningType in warnings && warnings[warningType] return ( - warningMessage + warningMessage ? <div className="send-v2__warning">{this.context.t(warningMessage)}</div> : null ) diff --git a/ui/app/pages/send/send-content/send-row-wrapper/tests/send-row-wrapper-component.test.js b/ui/app/pages/send/send-content/send-row-wrapper/tests/send-row-wrapper-component.test.js index 30280e1d0..533ca2ebe 100644 --- a/ui/app/pages/send/send-content/send-row-wrapper/tests/send-row-wrapper-component.test.js +++ b/ui/app/pages/send/send-content/send-row-wrapper/tests/send-row-wrapper-component.test.js @@ -54,25 +54,25 @@ describe('SendContent Component', function () { it('should render its second child as a child of the send-v2__form-field, if it has two children', () => { wrapper = shallow(<SendRowWrapper - errorType={'mockErrorType'} - label={'mockLabel'} - showError={false} - > - <span>Mock Custom Label Content</span> - <span>Mock Form Field</span> - </SendRowWrapper>) + errorType={'mockErrorType'} + label={'mockLabel'} + showError={false} + > + <span>Mock Custom Label Content</span> + <span>Mock Form Field</span> + </SendRowWrapper>) assert.equal(wrapper.find('.send-v2__form-row > .send-v2__form-field').childAt(0).text(), 'Mock Form Field') }) it('should render its first child as the last child of the send-v2__form-label, if it has two children', () => { wrapper = shallow(<SendRowWrapper - errorType={'mockErrorType'} - label={'mockLabel'} - showError={false} - > - <span>Mock Custom Label Content</span> - <span>Mock Form Field</span> - </SendRowWrapper>) + errorType={'mockErrorType'} + label={'mockLabel'} + showError={false} + > + <span>Mock Custom Label Content</span> + <span>Mock Form Field</span> + </SendRowWrapper>) assert.equal(wrapper.find('.send-v2__form-row > .send-v2__form-label').childAt(1).text(), 'Mock Custom Label Content') }) }) |