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