Fixed address string length

This commit is contained in:
Andy Tudhope 2018-03-21 07:22:37 +02:00
parent d49e372fbd
commit e69d267cba

View File

@ -51,7 +51,8 @@ function hasAddress (req) {
function getAddress (req) { function getAddress (req) {
const commentBody = req.body.comment.body const commentBody = req.body.comment.body
const index = commentBody.search(contractAddressString) + contractAddressString.length const index = commentBody.search(contractAddressString) + contractAddressString.length + 1
console.log("address: ", commentBody.substring(index, index + 42))
return commentBody.substring(index, index + 42) return commentBody.substring(index, index + 42)
} }