Skip to content

Nor able to pass validation of address #3

Description

@nitinsinghit

var cs = require('coinstring');
cs.isValid(req.param('address') , 0x00) .

This check fails on me. Weird thing is that this check works on other laptops. Function below error out only on my laptop where versionCompare and version comparison is not buffer but on other machines comparison is buffer. Not sure whats going on. Please advice

function decode(base58str, version) {
var buf = base58.decode(base58str)
var versionLength

if (version == null)
versionLength = 0
else {
if (typeof version == 'number')
version = new Buffer([version])

versionLength = version.length
var versionCompare = buf.slice(0, versionLength)
if (versionCompare !== version) ///on debug I see on other machines that versionCompare and version are buffer
  throw new Error('Invalid version')

}
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions