Load the sources immediatly in Contract Dev (#5575)
This commit is contained in:
parent
d83d938ee3
commit
e5ff36f1f1
@ -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,8 +513,10 @@ export default class WriteContractStore {
|
|||||||
|
|
||||||
this.resizeEditor();
|
this.resizeEditor();
|
||||||
|
|
||||||
|
if (recompile) {
|
||||||
return this.handleCompile();
|
return this.handleCompile();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@action handleLoadContract = (contract) => {
|
@action handleLoadContract = (contract) => {
|
||||||
const { sourcecode, id } = contract;
|
const { sourcecode, id } = contract;
|
||||||
|
Loading…
Reference in New Issue
Block a user