Update requests (#5324)
This commit is contained in:
parent
7134b44f5b
commit
8930f510fc
@ -252,13 +252,11 @@ export default class TypedInput extends Component {
|
||||
);
|
||||
}
|
||||
|
||||
getNumberValue (value) {
|
||||
getNumberValue (value, readOnly = this.props.readOnly) {
|
||||
if (!value) {
|
||||
return value;
|
||||
}
|
||||
|
||||
const { readOnly } = this.props;
|
||||
|
||||
const rawValue = typeof value === 'string'
|
||||
? value.replace(/,/g, '')
|
||||
: value;
|
||||
@ -278,7 +276,7 @@ export default class TypedInput extends Component {
|
||||
|
||||
return (
|
||||
<Input
|
||||
allowCopy={ allowCopy ? value : undefined }
|
||||
allowCopy={ allowCopy ? this.getNumberValue(value, false) : undefined }
|
||||
className={ className }
|
||||
label={ label }
|
||||
hint={ hint }
|
||||
@ -309,7 +307,7 @@ export default class TypedInput extends Component {
|
||||
|
||||
return (
|
||||
<Input
|
||||
allowCopy={ allowCopy ? value : undefined }
|
||||
allowCopy={ allowCopy ? this.getNumberValue(value, false) : undefined }
|
||||
className={ className }
|
||||
label={ label }
|
||||
hint={ hint }
|
||||
|
@ -36,7 +36,7 @@ class MethodDecoding extends Component {
|
||||
};
|
||||
|
||||
static propTypes = {
|
||||
address: PropTypes.string.isRequired,
|
||||
address: PropTypes.string,
|
||||
compact: PropTypes.bool,
|
||||
token: PropTypes.object,
|
||||
transaction: PropTypes.object,
|
||||
@ -44,6 +44,7 @@ class MethodDecoding extends Component {
|
||||
};
|
||||
|
||||
static defaultProps = {
|
||||
address: '',
|
||||
compact: false,
|
||||
historic: false
|
||||
};
|
||||
@ -653,9 +654,9 @@ class MethodDecoding extends Component {
|
||||
|
||||
function mapStateToProps (initState, initProps) {
|
||||
const { tokens } = initState.balances;
|
||||
const { address } = initProps;
|
||||
const { transaction } = initProps;
|
||||
|
||||
const token = (tokens || {})[address];
|
||||
const token = (tokens || {})[transaction.to];
|
||||
|
||||
return () => {
|
||||
return { token };
|
||||
|
@ -119,14 +119,14 @@ export default class MethodDecodingStore {
|
||||
* signature: String
|
||||
* }
|
||||
*/
|
||||
lookup (address, transaction) {
|
||||
lookup (currentAddress, transaction) {
|
||||
const result = {};
|
||||
|
||||
if (!transaction) {
|
||||
return Promise.resolve(result);
|
||||
}
|
||||
|
||||
const isReceived = transaction.to === address;
|
||||
const isReceived = transaction.to === currentAddress;
|
||||
const contractAddress = isReceived ? transaction.from : transaction.to;
|
||||
const input = transaction.input || transaction.data;
|
||||
|
||||
|
@ -79,6 +79,7 @@ class Application extends Component {
|
||||
: this.renderApp()
|
||||
}
|
||||
<Connection />
|
||||
<Requests />
|
||||
<ParityBar dapp={ isMinimized } />
|
||||
</div>
|
||||
);
|
||||
@ -104,7 +105,6 @@ class Application extends Component {
|
||||
}
|
||||
<Extension />
|
||||
<Snackbar />
|
||||
<Requests />
|
||||
</Container>
|
||||
);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user