Load the sources immediatly in Contract Dev (#5575)

This commit is contained in:
Nicolas Gotchac 2017-05-09 12:56:35 +02:00 committed by Jaco Greeff
parent d83d938ee3
commit e5ff36f1f1

View File

@ -139,9 +139,10 @@ export default class WriteContractStore {
this.worker = worker;
this
.fetchSolidityVersions()
.then(() => this.reloadContracts());
return Promise.all([
this.fetchSolidityVersions(),
this.reloadContracts(undefined, undefined, false)
]);
}
fetchSolidityVersions () {
@ -492,7 +493,7 @@ export default class WriteContractStore {
this.reloadContracts(cId);
}
@action reloadContracts = (id, sourcecode) => {
@action reloadContracts = (id, sourcecode, recompile = true) => {
const localStore = store.get(WRITE_CONTRACT_STORE_KEY) || {};
this.savedContracts = localStore.saved || {};
@ -512,8 +513,10 @@ export default class WriteContractStore {
this.resizeEditor();
if (recompile) {
return this.handleCompile();
}
}
@action handleLoadContract = (contract) => {
const { sourcecode, id } = contract;