diff --git a/merkle-tree/src/db/common/adminDbConnection.js b/merkle-tree/src/db/common/adminDbConnection.js index 01cd3a4..c1de11e 100644 --- a/merkle-tree/src/db/common/adminDbConnection.js +++ b/merkle-tree/src/db/common/adminDbConnection.js @@ -10,8 +10,13 @@ else url = `mongodb://${host}:${port}`; dbConnections.admin = mongoose.createConnection(`${url}/${databaseName}`, { useNewUrlParser: true, useCreateIndex: true, + authSource: "admin", + user: "admin", + pass: "admin", + useUnifiedTopology: true, + useFindAndModify: false }); const adminDbConnection = dbConnections.admin; -export default adminDbConnection; +export default adminDbConnection; \ No newline at end of file diff --git a/merkle-tree/src/utils-web3.js b/merkle-tree/src/utils-web3.js index 54472c9..f499f9b 100644 --- a/merkle-tree/src/utils-web3.js +++ b/merkle-tree/src/utils-web3.js @@ -206,10 +206,8 @@ async function subscribeToEvent( type: 'event', signature: '0x881cc8af0159324ccea314ad98a0cf26fe0e460c2afa693c92f591613d4de7b2' } */ - const eventJsonInterface = web3.utils._.find( - contractInstance._jsonInterface, // eslint-disable-line no-underscore-dangle - o => o.name === eventName && o.type === 'event', - ); + + const eventJsonInterface = contractInstance._jsonInterface.find(o => o.name === eventName && o.type === 'event'); logger.silly(`eventJsonInterface: ${JSON.stringify(eventJsonInterface, null, 2)}`);