Skip to content
This repository was archived by the owner on Jan 22, 2018. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 7 additions & 12 deletions src/MethodDecoding/methodDecoding.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import { connect } from 'react-redux';

import { TypedInput, InputAddress } from '../Form';
import Loading from '../Loading';
import TokenValue from './tokenValue';
import MethodDecodingStore from './methodDecodingStore';

import { ASCII_INPUT, TOKEN_METHODS } from './constants';
Expand Down Expand Up @@ -334,7 +335,7 @@ class MethodDecoding extends Component {
}

renderTokenAction () {
const { historic } = this.props;
const { historic, token } = this.props;
const { methodSignature, methodInputs } = this.state;
const [to, value] = methodInputs;
const address = to.value;
Expand All @@ -351,7 +352,11 @@ class MethodDecoding extends Component {
historic,
value: (
<span className={styles.highlight}>
{ this.renderTokenValue(value.value) }
<TokenValue
id={token.id}
token={token}
value={value.value}
/>
</span>
),
address: this.renderAddressName(address)
Expand Down Expand Up @@ -595,16 +600,6 @@ class MethodDecoding extends Component {
return inputs;
}

renderTokenValue (value) {
const { token } = this.props;

return (
<span className={styles.tokenValue}>
{ value.div(token.format).toFormat(5) }<small> { token.tag }</small>
</span>
);
}

renderEtherValue (value) {
const { api } = this.context;
const ether = api.util.fromWei(value);
Expand Down