diff --git a/old-ui/app/components/account-dropdowns.js b/old-ui/app/components/account-dropdowns.js index 1ca406632..44f8e46cf 100644 --- a/old-ui/app/components/account-dropdowns.js +++ b/old-ui/app/components/account-dropdowns.js @@ -117,8 +117,7 @@ class AccountDropdowns extends Component { ) } - ifHardwareAcc (address) { - const keyring = getCurrentKeyring(address, this.props.network, this.props.keyrings, this.props.identities) + ifHardwareAcc (keyring) { if (keyring && keyring.type.search('Hardware') !== -1) { return true } @@ -130,6 +129,8 @@ class AccountDropdowns extends Component { let label if (ifContractAcc(keyring)) { label = 'CONTRACT' + } else if (this.ifHardwareAcc(keyring)) { + label = 'HARDWARE' } else { label = 'IMPORTED' } @@ -287,7 +288,7 @@ class AccountDropdowns extends Component { }, 'Copy address to clipboard', ), - (!this.ifHardwareAcc(selected) && !(ifContractAcc(keyring))) ? h( + (!this.ifHardwareAcc(keyring) && !(ifContractAcc(keyring))) ? h( DropdownMenuItem, { closeMenu: () => {}, diff --git a/old-ui/app/components/send/send-contract.js b/old-ui/app/components/send/send-contract.js index 221ca1775..4312054aa 100644 --- a/old-ui/app/components/send/send-contract.js +++ b/old-ui/app/components/send/send-contract.js @@ -174,6 +174,16 @@ class SendTransactionScreen extends PersistentForm { /> : null} ) + // 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 = (