Fix broken contract deployment function (#1643)

* Fix contract deployment after contracts runtime module change <https://github.com/paritytech/substrate/pull/3649>

* Fix style warning detected by ci
This commit is contained in:
Kai 2019-09-22 00:41:32 +08:00 committed by Jaco Greeff
parent 6fb8916e6f
commit 41a7a07602

View File

@ -210,7 +210,7 @@ class Deploy extends ContractModal<Props, State> {
onFailed={this.toggleBusy(false)}
onSuccess={this.onSuccess}
params={this.constructCall}
tx={api.tx.contracts ? 'contracts.create' : 'contract.create'}
tx={api.tx.contracts ? (api.tx.contracts.instantiate ? 'contracts.instantiate' : 'contracts.create') : 'contract.create'}
ref={this.button}
/>
</Button.Group>