-
Notifications
You must be signed in to change notification settings - Fork 313
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature/transaction history multi asset (#461)
* Create Transaction component for rendering txid link * Updated transaction history to include all assets in transactions * Fixed TransactionHistoryType definition * Fixes all flow errors (#462) * Fixes all flow errors * Fix type * Use BigNumber instead numeral * Fix flow * fix flow issues
- Loading branch information
1 parent
0724d26
commit 6d37c38
Showing
14 changed files
with
150 additions
and
80 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
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,30 @@ | ||
// @flow | ||
import React from 'react' | ||
import classNames from 'classnames' | ||
|
||
import { openExplorerTx } from '../../../core/explorer' | ||
import styles from './Transaction.scss' | ||
|
||
type Props = { | ||
className?: string, | ||
txid: string, | ||
net: NetworkType, | ||
explorer: ExplorerType | ||
} | ||
|
||
export default class Transaction extends React.Component<Props> { | ||
render = () => { | ||
const { txid, className } = this.props | ||
|
||
return ( | ||
<span className={classNames(styles.transaction, className)} onClick={this.handleClick}> | ||
{txid.substring(0, 32)} | ||
</span> | ||
) | ||
} | ||
|
||
handleClick = () => { | ||
const { net, explorer, txid } = this.props | ||
openExplorerTx(net, explorer, txid) | ||
} | ||
} |
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,6 @@ | ||
@import '../../../styles/variables'; | ||
|
||
.transaction { | ||
color: $link-color; | ||
cursor: pointer; | ||
} |
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,12 @@ | ||
// @flow | ||
import { connect } from 'react-redux' | ||
|
||
import Transaction from './Transaction' | ||
import { getBlockExplorer, getNetwork } from '../../../modules/metadata' | ||
|
||
const mapStateToProps = (state: Object) => ({ | ||
net: getNetwork(state), | ||
explorer: getBlockExplorer(state) | ||
}) | ||
|
||
export default connect(mapStateToProps, () => ({}))(Transaction) |
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
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