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
1 changed files with 8 additions and 5 deletions

View File

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