-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add hex data input to send screen #4814
Conversation
shouldComponentUpdate (nextProps, nextState, nextContext) { | ||
const {data, inError} = this.props | ||
const {nextData, nextInError} = nextProps | ||
return data !== nextData || inError !== nextInError |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This shouldComponentUpdate
isn't needed because these are primitive values
|
||
return ( | ||
<SendRowWrapper | ||
label={`${this.context.t('hexData')}:`} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Destructure this.context
txParams: Object.assign( | ||
unapprovedTx.txParams, | ||
addHexPrefixToObjectValues({data}), | ||
addHexPrefixToObjectValues({data: unapprovedTx.txParams.data}), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't particularly clear and needs explanation—why is this needed?
onInput = (event) => { | ||
const {updateSendHexData} = this.props | ||
event.target.value = event.target.value.replace(/\n/g, '') | ||
updateSendHexData(event.target.value) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If value is an empty string we should be removing the data
Fixes #3430
This PR adds the ability to edit the hex data for a tx when sending it.