Skip to content

Commit

Permalink
Merge pull request #224 from poanetwork/bytes-is-not-mandatory
Browse files Browse the repository at this point in the history
(Fix) Bytes is not a mandatory input
  • Loading branch information
vbaranov authored Dec 21, 2018
2 parents afa4bce + ba833b5 commit 1e04e83
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions old-ui/app/components/send/send-contract.js
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,16 @@ class SendTransactionScreen extends PersistentForm {
/> : null}
</h3>
)
// bytes field is not mandatory to fill: 0x is by default
if (params.type.startsWith('bytes') && !Array.isArray(params.type)) {
const inputValues = this.props.inputValues || {}
if (!inputValues[ind]) {
inputValues[ind] = '0x'
this.setState({
inputValues,
})
}
}
const field = (
<SendTransactionField
key={Math.random()}
Expand Down

0 comments on commit 1e04e83

Please sign in to comment.