Skip to content

Commit

Permalink
lint fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ashisherc committed Nov 23, 2020
1 parent 62a63de commit 320e9f9
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 60 deletions.
109 changes: 55 additions & 54 deletions app/components/wallet/staking/dashboard/UserSummary.js
Expand Up @@ -185,7 +185,7 @@ export default class UserSummary extends Component<Props, State> {
<div className={styles.sectionActions}>
{this.props.withdrawRewards != null && (
<Button
className='secondary'
className="secondary"
label={intl.formatMessage(globalMessages.withdrawLabel)}
onClick={this.props.withdrawRewards}
skin={ButtonSkin}
Expand Down Expand Up @@ -246,60 +246,60 @@ export default class UserSummary extends Component<Props, State> {
</div>
)}
<div className={styles.mangledSection}>
{mangledWarningIcon}
{this.state.mangledPopupOpen && (
<div className={styles.mangledPopup}>
<TooltipBox onClose={() => this.setState(() => ({ mangledPopupOpen: false }))}>
<p>
{this.formatWithAmount(
messages.mangledPopupDialogLine1,
this.props.canUnmangleSum.plus(this.props.cannotUnmangleSum),
this.props.meta.decimalPlaces
)}
</p>
{this.props.cannotUnmangleSum.gt(0) && (
<ul>
<li>
{this.formatWithAmount(
messages.canUnmangleLine,
this.props.canUnmangleSum,
this.props.meta.decimalPlaces
)}
</li>
<li>
{this.formatWithAmount(
messages.cannotUnmangleLine,
this.props.cannotUnmangleSum,
this.props.meta.decimalPlaces
)}
</li>
</ul>
)}
{this.props.canUnmangleSum.gt(0) && (
{mangledWarningIcon}
{this.state.mangledPopupOpen && (
<div className={styles.mangledPopup}>
<TooltipBox onClose={() => this.setState(() => ({ mangledPopupOpen: false }))}>
<p>
<FormattedMessage
{...messages.mangledPopupDialogLine2}
values={{
ticker: this.props.meta.primaryTicker,
transactionMessage: (
<span
className={styles.link}
onClick={this.props.onUnmangle}
role="button"
tabIndex={0}
onKeyPress={this.props.onUnmangle}
>
{intl.formatMessage(messages.makeTransaction)}
</span>
),
}}
/>
{this.formatWithAmount(
messages.mangledPopupDialogLine1,
this.props.canUnmangleSum.plus(this.props.cannotUnmangleSum),
this.props.meta.decimalPlaces
)}
</p>
)}
</TooltipBox>
</div>
)}
</div>
{this.props.cannotUnmangleSum.gt(0) && (
<ul>
<li>
{this.formatWithAmount(
messages.canUnmangleLine,
this.props.canUnmangleSum,
this.props.meta.decimalPlaces
)}
</li>
<li>
{this.formatWithAmount(
messages.cannotUnmangleLine,
this.props.cannotUnmangleSum,
this.props.meta.decimalPlaces
)}
</li>
</ul>
)}
{this.props.canUnmangleSum.gt(0) && (
<p>
<FormattedMessage
{...messages.mangledPopupDialogLine2}
values={{
ticker: this.props.meta.primaryTicker,
transactionMessage: (
<span
className={styles.link}
onClick={this.props.onUnmangle}
role="button"
tabIndex={0}
onKeyPress={this.props.onUnmangle}
>
{intl.formatMessage(messages.makeTransaction)}
</span>
),
}}
/>
</p>
)}
</TooltipBox>
</div>
)}
</div>
</div>
<div className={styles.icon}>
<IconDelegated />
Expand Down Expand Up @@ -328,7 +328,8 @@ export default class UserSummary extends Component<Props, State> {
const adaAmount = adaValue.split('.');
return (
<span>
{adaAmount[0]}<span className={styles.decimal}>.{adaAmount[1]} </span>{' '}
{adaAmount[0]}
<span className={styles.decimal}>.{adaAmount[1]} </span>{' '}
</span>
);
};
Expand Down
8 changes: 5 additions & 3 deletions app/containers/wallet/staking/StakingDashboardPage.js
Expand Up @@ -523,7 +523,7 @@ export default class StakingDashboardPage extends Component<Props> {
if (meta == null) {
return { id: pool };
}
return { id: pool, ticker: meta.info?.ticker, name: meta.info?.name };
return { id: pool, ticker: meta.info?.ticker, name: meta.info?.name };
});
return {
pools: miniPoolInfo,
Expand Down Expand Up @@ -654,7 +654,8 @@ export default class StakingDashboardPage extends Component<Props> {
currentPools.length === 1 && isJormungandr(publicDeriver.getParent().getNetworkInfo())
? async () => {
this.generated.actions.dialogs.open.trigger({ dialog: UndelegateDialog });
await this.generated.actions.jormungandr.delegationTransaction.createTransaction.trigger(
await this.generated.actions.jormungandr.delegationTransaction.
createTransaction.trigger(
{
publicDeriver,
poolRequest: undefined,
Expand Down Expand Up @@ -824,7 +825,8 @@ export default class StakingDashboardPage extends Component<Props> {
if (!isCardanoHaskell(publicDeriver.getParent().getNetworkInfo())) {
return undefined;
}
const adaDelegationRequests = this.generated.stores.substores.ada.delegation.getDelegationRequests(
const adaDelegationRequests = this.generated.stores.substores.ada.
delegation.getDelegationRequests(
publicDeriver
);
if (adaDelegationRequests == null) return undefined;
Expand Down
3 changes: 0 additions & 3 deletions app/stores/toplevel/TransactionsStore.js
Expand Up @@ -22,7 +22,6 @@ import {
asGetBalance, asHasLevels, asGetPublicKey,
} from '../../api/ada/lib/storage/models/PublicDeriver/traits';
import type {
IPublicDeriver,
IGetLastSyncInfo,
IGetLastSyncInfoResponse,
} from '../../api/ada/lib/storage/models/PublicDeriver/interfaces';
Expand All @@ -37,9 +36,7 @@ import {
stringifyError
} from '../../utils/logging';
import type { TransactionRowsToExportRequest } from '../../actions/common/transactions-actions';
import { isWithinSupply } from '../../utils/validations';
import globalMessages from '../../i18n/global-messages';
import type { IHasLevels } from '../../api/ada/lib/storage/models/ConceptualWallet/interfaces';
import * as timeUtils from '../../api/ada/lib/storage/bridge/timeUtils';
import { getCardanoHaskellBaseConfig, isCardanoHaskell } from '../../api/ada/lib/storage/database/prepackaged/networks';

Expand Down

0 comments on commit 320e9f9

Please sign in to comment.