-
Notifications
You must be signed in to change notification settings - Fork 312
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
hotfix: fix activity defects (#2378)
* Fixes numerous defects associated with activity tab * Bump version * lint * Fix pending count styles on legacy
- Loading branch information
1 parent
26266a2
commit e2ed93f
Showing
8 changed files
with
135 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
84 changes: 84 additions & 0 deletions
84
app/components/Blockchain/Transaction/N3PendingAbstract.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
// @flow | ||
import React, { Fragment } from 'react' | ||
import { injectIntl } from 'react-intl' | ||
import classNames from 'classnames' | ||
|
||
import styles from './Transaction.scss' | ||
import SendIcon from '../../../assets/icons/send-tx.svg' | ||
import { pluralize } from '../../../util/pluralize' | ||
|
||
type Props = { | ||
findContact: (address: string) => React$Node | null, | ||
asset: { | ||
symbol: string, | ||
image?: string, | ||
}, | ||
blocktime: number, | ||
amount: string | number, | ||
to: string, | ||
confirmations: number, | ||
|
||
renderTxDate: (time: number) => React$Node | null, | ||
} | ||
|
||
class N3PendingAbstract extends React.Component<Props> { | ||
render = () => { | ||
const { | ||
asset, | ||
amount, | ||
to, | ||
blocktime, | ||
findContact, | ||
confirmations, | ||
renderTxDate, | ||
} = this.props | ||
const contactTo = findContact(to) | ||
const logo = asset.image && ( | ||
<img src={asset.image} alt={`${asset.symbol} logo`} /> | ||
) | ||
|
||
return ( | ||
<Fragment> | ||
<div className={classNames(styles.transactionContainerN3)}> | ||
<div className={styles.abstractContainerN3}> | ||
<div className={styles.txTypeIconContainerN3}> | ||
<div className={styles.sendIconContainer}> | ||
<SendIcon /> | ||
</div> | ||
</div> | ||
{!blocktime ? ( | ||
<div className={styles.pendingTxDate}> | ||
awaiting confirmations... | ||
</div> | ||
) : ( | ||
renderTxDate(blocktime) | ||
)} | ||
<div className={styles.txLabelContainerN3}>Transfer</div> | ||
</div> | ||
|
||
<div className={styles.txToContainerN3}> | ||
<div className={styles.txTransferContainerN3}> | ||
<div className={styles.txTokenContainerN3}> | ||
{logo} | ||
{asset.symbol} | ||
</div> | ||
<div className={styles.txAmountContainerN3}>{amount}</div> | ||
</div> | ||
<div className={styles.txSubjectContainerN3}> | ||
<p>{contactTo}</p> | ||
</div> | ||
</div> | ||
<div | ||
className={styles.confirmationsContainer} | ||
style={{ marginLeft: 100 }} | ||
> | ||
<b>{confirmations || 0}</b>{' '} | ||
{pluralize('Confirmation', confirmations || 0)} | ||
</div> | ||
</div> | ||
</Fragment> | ||
) | ||
} | ||
} | ||
|
||
export default injectIntl(N3PendingAbstract) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters