ignore newline in xpub

This commit is contained in:
Matthew Zipkin 2022-03-06 11:38:41 -05:00
parent c85ef390d9
commit 654549897a
No known key found for this signature in database
GPG Key ID: E7E2984B6289C93A
2 changed files with 2 additions and 0 deletions

View File

@ -27,6 +27,7 @@ try {
} catch (e) {
throw new Error('xpub file missing');
}
xpub = xpub.split('\n')[0];
if (xpub === 'xpub6DBMpym6PM3qe7Ug7BwG6zo7dinMMjpk8nmb73czsjkzPTzfQ1d5ZvqDea4uNmMVv1Y9DT6v17GuDL1x2km9FQuKqWMdnrDfRiDNrG1nTMr')
throw new Error('Example xpub must not be used! Repalce with your own account xpub.');

View File

@ -19,6 +19,7 @@ try {
} catch (e) {
throw new Error('xpub file missing');
}
xpub = xpub.split('\n')[0];
if (xpub === 'xpub6DBMpym6PM3qe7Ug7BwG6zo7dinMMjpk8nmb73czsjkzPTzfQ1d5ZvqDea4uNmMVv1Y9DT6v17GuDL1x2km9FQuKqWMdnrDfRiDNrG1nTMr')
throw new Error('Example xpub must not be used! Repalce with your own account xpub.');