Skip to content

Commit

Permalink
using console.error
Browse files Browse the repository at this point in the history
  • Loading branch information
ashwinarora committed Nov 3, 2023
1 parent 72bff7d commit 5ba35bf
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions src/poolz/ThePoolz.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,94 +147,94 @@ class ThePoolz implements IThePoolzInterface {
.then(abi => {
this.lockedDealV2 = { ...lockedDealV2, contract: new this.web3.eth.Contract(abi as AbiItem[], lockedDealV2.address) }
})
.catch(e => {console.log(e)})
.catch(e => {console.error(e)})
);
}
if (delayVault) {
abifetchPromises.push(this.fetchContractAbi(delayVault.nameVersion)
.then(abi => {
this.delayVaultContract = { ...delayVault, contract: new this.web3.eth.Contract(abi as AbiItem[], delayVault.address) }
})
.catch(e => {console.log(e)})
.catch(e => {console.error(e)})
);
}
if (lockDealNFT) {
abifetchPromises.push(this.fetchContractAbi(lockDealNFT.nameVersion)
.then(abi => {
this.lockDealNFTContract = { ...lockDealNFT, contract: new this.web3.eth.Contract(abi as AbiItem[], lockDealNFT.address) }
})
.catch(e => {console.log(e)})
.catch(e => {console.error(e)})
);
}
if (vaultManager) {
abifetchPromises.push(this.fetchContractAbi(vaultManager.nameVersion)
.then(abi => {
this.vaultManagerContract = { ...vaultManager, contract: new this.web3.eth.Contract(abi as AbiItem[], vaultManager.address) }
})
.catch(e => {console.log(e)})
.catch(e => {console.error(e)})
);
}
if (dealProvider) {
abifetchPromises.push(this.fetchContractAbi(dealProvider.nameVersion)
.then(abi => {
this.dealProviderContract = { ...dealProvider, contract: new this.web3.eth.Contract(abi as AbiItem[], dealProvider.address) }
})
.catch(e => {console.log(e)})
.catch(e => {console.error(e)})
);
}
if (lockDealProvider) {
abifetchPromises.push(this.fetchContractAbi(lockDealProvider.nameVersion)
.then(abi => {
this.lockDealProviderContract = { ...lockDealProvider, contract: new this.web3.eth.Contract(abi as AbiItem[], lockDealProvider.address) }
})
.catch(e => {console.log(e)})
.catch(e => {console.error(e)})
);
}
if (timedDealProvider) {
abifetchPromises.push(this.fetchContractAbi(timedDealProvider.nameVersion)
.then(abi => {
this.timedDealProviderContract = { ...timedDealProvider, contract: new this.web3.eth.Contract(abi as AbiItem[], timedDealProvider.address) }
})
.catch(e => {console.log(e)})
.catch(e => {console.error(e)})
);
}
if (collateralProvider) {
abifetchPromises.push(this.fetchContractAbi(collateralProvider.nameVersion)
.then(abi => {
this.collateralProviderContract = { ...collateralProvider, contract: new this.web3.eth.Contract(abi as AbiItem[], collateralProvider.address) }
})
.catch(e => {console.log(e)})
.catch(e => {console.error(e)})
);
}
if (refundProvider) {
abifetchPromises.push(this.fetchContractAbi(refundProvider.nameVersion)
.then(abi => {
this.refundProviderContract = { ...refundProvider, contract: new this.web3.eth.Contract(abi as AbiItem[], refundProvider.address) }
})
.catch(e => {console.log(e)})
.catch(e => {console.error(e)})
);
}
if (simpleBuilder) {
abifetchPromises.push(this.fetchContractAbi(simpleBuilder.nameVersion)
.then(abi => {
this.simpleBuilderContract = { ...simpleBuilder, contract: new this.web3.eth.Contract(abi as AbiItem[], simpleBuilder.address) }
})
.catch(e => {console.log(e)})
.catch(e => {console.error(e)})
);
}
if (simpleRefundBuilder) {
abifetchPromises.push(this.fetchContractAbi(simpleRefundBuilder.nameVersion)
.then(abi => {
this.simpleRefundBuilderContract = { ...simpleRefundBuilder, contract: new this.web3.eth.Contract(abi as AbiItem[], simpleRefundBuilder.address) }
})
.catch(e => {console.log(e)})
.catch(e => {console.error(e)})
);
}

try {
await Promise.allSettled(abifetchPromises)
} catch (e) {
console.log(e)
console.error(e)
}
}

Expand Down

0 comments on commit 5ba35bf

Please sign in to comment.