Merge pull request #732 from embark-framework/feature/hide-ens-transaction-log
Hide ENS Transaction log
This commit is contained in:
commit
26cde59fcb
|
@ -8,7 +8,11 @@ class ConsoleListener {
|
|||
this.addressToContract = [];
|
||||
this.contractsConfig = embark.config.contractsConfig;
|
||||
this.contractsDeployed = false;
|
||||
this.outputDone = false;
|
||||
this._listenForLogRequests();
|
||||
this.events.on('outputDone', () => {
|
||||
this.outputDone = true;
|
||||
});
|
||||
|
||||
this.events.on("contractsDeployed", () => {
|
||||
this.contractsDeployed = true;
|
||||
|
@ -44,7 +48,8 @@ class ConsoleListener {
|
|||
|
||||
this.addressToContract[address] = {
|
||||
name: contract.className,
|
||||
functions: funcSignatures
|
||||
functions: funcSignatures,
|
||||
silent: contract.silent
|
||||
};
|
||||
}
|
||||
});
|
||||
|
@ -58,14 +63,19 @@ class ConsoleListener {
|
|||
if (!this.contractsDeployed) return;
|
||||
|
||||
let {address, data, transactionHash, blockNumber, gasUsed, status} = request;
|
||||
if (!this.addressToContract[address]) {
|
||||
const contract = this.addressToContract[address];
|
||||
|
||||
if (!contract) {
|
||||
this._updateContractList();
|
||||
return;
|
||||
}
|
||||
if (!this.addressToContract[address]) return;
|
||||
|
||||
const {name, silent} = contract;
|
||||
if (silent && !this.outputDone) {
|
||||
return;
|
||||
}
|
||||
|
||||
const name = this.addressToContract[address].name;
|
||||
const func = this.addressToContract[address].functions[data.substring(0, 10)];
|
||||
const func = contract.functions[data.substring(0, 10)];
|
||||
const functionName = func.functionName;
|
||||
|
||||
const decodedParameters = utils.decodeParams(func.abi.inputs, data.substring(10));
|
||||
|
|
Loading…
Reference in New Issue