Close and not Cancel on deploy contract #3393
This commit is contained in:
parent
2b30d4b75f
commit
723005635a
@ -46,7 +46,8 @@ function stringToBytes (input) {
|
||||
if (isArray(input)) {
|
||||
return input;
|
||||
} else if (input.substr(0, 2) === '0x') {
|
||||
return input.substr(2).toLowerCase().match(/.{1,2}/g).map((value) => parseInt(value, 16));
|
||||
const matches = input.substr(2).toLowerCase().match(/.{1,2}/g) || [];
|
||||
return matches.map((value) => parseInt(value, 16));
|
||||
} else {
|
||||
return input.split('').map((char) => char.charCodeAt(0));
|
||||
}
|
||||
|
@ -119,6 +119,13 @@ export default class DeployContract extends Component {
|
||||
onClick={ this.onClose } />
|
||||
);
|
||||
|
||||
const closeBtn = (
|
||||
<Button
|
||||
icon={ <ActionDoneAll /> }
|
||||
label='Close'
|
||||
onClick={ this.onClose } />
|
||||
);
|
||||
|
||||
if (deployError) {
|
||||
return cancelBtn;
|
||||
}
|
||||
@ -135,17 +142,10 @@ export default class DeployContract extends Component {
|
||||
];
|
||||
|
||||
case 1:
|
||||
return [
|
||||
cancelBtn
|
||||
];
|
||||
return [ closeBtn ];
|
||||
|
||||
case 2:
|
||||
return [
|
||||
<Button
|
||||
icon={ <ActionDoneAll /> }
|
||||
label='Close'
|
||||
onClick={ this.onClose } />
|
||||
];
|
||||
return [ closeBtn ];
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user