mirror of
https://github.com/status-im/embark-area-51.git
synced 2025-01-11 14:34:40 +00:00
Hide ENS Transaction log
This commit is contained in:
parent
fa551f67a3
commit
607c2657c4
@ -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…
x
Reference in New Issue
Block a user