Skip to content
This repository has been archived by the owner on Sep 16, 2021. It is now read-only.

Invalid address: Address has mismatched network type.. Code:1 #8

Open
Lalitpatadiya12 opened this issue May 21, 2020 · 0 comments
Open

Comments

@Lalitpatadiya12
Copy link

Lalitpatadiya12 commented May 21, 2020

While fetching the details of the address, it will give error as below

Invalid address: Address has mismatched network type... Code:1

Here is my code for fetching the information of the litecoin address.

var explorers = require('litecore-explorers');
 var request_network_type = 'mainnet';
 var insight = new explorers.Insight();
 var postaddress = req.body.address;
 var responseSet = {};
 insight.address(postaddress, function (err, resultset) {
     if (err) {
         responseSet = { status: 400, message: 'There is some error while fetching details', data: err }
     } else {
         responseSet = { status: 200, message: 'Fetch information successfully.', data: resultset }
     }
     res.send(JSON.stringify(responseSet));
 });

My valid litecoin address :

LW6aLDFxHgchA7QQmaniNemrBG8VqacunE

Does any has an idea why it will give error

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant