mirror of
https://github.com/embarklabs/embark.git
synced 2025-01-10 22:05:55 +00:00
Fix tests (CI) and debug button (#1443)
* fix(embark/tests): fix tests by not tampering with the contract addr * fix(cockpit/debugButtong): use deployedAddress instead address
This commit is contained in:
parent
f60c979c75
commit
b1881719e0
@ -17,9 +17,9 @@ class DebugButton extends React.Component {
|
||||
this.props.contracts &&
|
||||
this.props.contracts.find(contract => {
|
||||
const address = this.props.transaction.to || this.props.transaction.address;
|
||||
return contract.address &&
|
||||
return contract.deployedAddress &&
|
||||
address &&
|
||||
(contract.address.toLowerCase() === address.toLowerCase());
|
||||
(contract.deployedAddress.toLowerCase() === address.toLowerCase());
|
||||
}));
|
||||
}
|
||||
|
||||
|
@ -771,11 +771,11 @@ class BlockchainConnector {
|
||||
this.contractsSubscriptions = [];
|
||||
this.events.request("contracts:list", (_err, contractsList) => {
|
||||
contractsList.forEach(contractObject => {
|
||||
if (!contractObject.address){
|
||||
if (!contractObject.deployedAddress){
|
||||
return;
|
||||
}
|
||||
|
||||
const contract = this.ContractObject({abi: contractObject.abiDefinition, address: contractObject.address});
|
||||
const contract = this.ContractObject({abi: contractObject.abiDefinition, address: contractObject.deployedAddress});
|
||||
const eventEmitter = contract.events.allEvents();
|
||||
this.contractsSubscriptions.push(eventEmitter);
|
||||
eventEmitter.on('data', (data) => {
|
||||
|
@ -61,18 +61,6 @@ class ContractsManager {
|
||||
});
|
||||
|
||||
self.events.on("deploy:contract:deployed", (_contract) => {
|
||||
const contract = self.contracts[_contract.className];
|
||||
if (contract) {
|
||||
if (!_contract.address && _contract.deployedAddress) {
|
||||
_contract.address = _contract.deployedAddress;
|
||||
}
|
||||
if (!contract.address && _contract.address) {
|
||||
contract.address = _contract.address;
|
||||
}
|
||||
if (!contract.deployedAddress && _contract.deployedAddress) {
|
||||
contract.deployedAddress = _contract.deployedAddress;
|
||||
}
|
||||
}
|
||||
self.events.emit('contractsState', self.contractsState());
|
||||
});
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user