ANocturnalGuy / proxy-api

Avoid use of == and != JS-0050
Anti-pattern
Minor
a year agoa year old
Expected '===' and instead saw '=='
 98                try {
 99                    await Model.findOneAndUpdate({_id: data[i]._id}, {used: true}, {new: true})
100                    let response = await web3.eth.sendSignedTransaction('0x' + signedTx.serialize().toString('hex'))
101                    if(response.transactionHash == null) {102                        console.error('trascation not minded')
103                    }
104                    response.hash = response.transactionHash
Expected '===' and instead saw '=='
238    console.log('log->signedTx', signedTx)
239    try {
240        let response = await web3.eth.sendSignedTransaction('0x' + signedTx.serialize().toString('hex'))
241        if(response.transactionHash == null) {242            res.status(500).json({ message: `Transaction not mined` })
243        }
244        response.hash = response.transactionHash
Expected '===' and instead saw '=='
182
183                try {
184                    let response = await web3.eth.sendSignedTransaction('0x' + signedTx.serialize().toString('hex'))
185                    if(response.transactionHash == null) {186                        res.status(500).json({ message: `Transaction  not mined` })
187                    }
188                    response.hash = response.transactionHash