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
|
||||
.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;
|
||||
|
Loading…
Reference in New Issue
Block a user