Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cashaccounts

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cashaccounts - npm Package Compare versions

Comparing version 0.3.2 to 0.3.3

94

index.js

@@ -43,11 +43,13 @@ const EmojiList = require('./emoji_names.json');

async performTrustedSearch(url) {
const data = await axios
.get(url)
.then(x => {
return x.data;
})
.catch(err => {
console.log('error in performTrustedSearch', ' url', url, err.response);
});
const data = await axios.get(url).then(x => {
if (x.data === undefined) {
throw new Error('error in search');
}
return x.data;
});
// .catch(err => {
// console.log('error in performTrustedSearch', ' url', url, err.response);
// });
return data;

@@ -77,11 +79,13 @@ }

const resp = await axios
.post(url, data)
.then(x => {
return x.data;
})
.catch(err => {
console.log('error in trustedRegistration', err);
});
const resp = await axios.post(url, data).then(x => {
if (x.data === undefined) {
throw new Error('error with registration');
}
return x.data;
});
// .catch(err => {
// console.log('error in trustedRegistration', err);
// });
return resp;

@@ -145,11 +149,13 @@ }

const data = await axios
.get(url)
.then(x => {
return x.data;
})
.catch(err => {
console.log('error in getAddressByCashAccount', err.response);
});
const data = await axios.get(url).then(x => {
if (x.data === undefined) {
throw new Error('error with lookup');
}
return x.data;
});
// .catch(err => {
// console.log('error in getAddressByCashAccount', err.response);
// });
return data;

@@ -447,8 +453,11 @@ }

const urlString = this.bufferString(query);
const response = await axios
.get(`https://bitdb.bch.sx/q/${urlString}`)
.catch(e => {
console.error('err in getNumberofTxs', e);
});
const response = await axios.get(`https://bitdb.bch.sx/q/${urlString}`);
if (response.data === undefined) {
throw new Error('error bitdb lookup');
}
// .catch(e => {
// console.error('err in getNumberofTxs', e);
// });
return response.data;

@@ -479,7 +488,11 @@ }

const urlString = this.bufferString(query);
const response = await axios
.get(`https://bitdb.bch.sx/q/${urlString}`)
.catch(e => {
console.error('err in getNumberofTxs', e);
});
const response = await axios.get(`https://bitdb.bch.sx/q/${urlString}`);
if (response.data === undefined) {
throw new Error('error with account lookup');
}
// .catch(e => {
// console.error('err in getNumberofTxs', e);
// });
return response.data.c[0];

@@ -510,8 +523,11 @@ }

const urlString = this.bufferString(query);
const response = await axios
.get(`https://bitdb.bch.sx/q/${urlString}`)
.catch(e => {
console.error('err in getNumberofTxs', e);
});
const response = await axios.get(`https://bitdb.bch.sx/q/${urlString}`);
if (response.data === undefined) {
throw new Error('error with registration lookup');
}
// .catch(e => {
// console.error('err in getNumberofTxs', e);
// });
return response.data.u[0];

@@ -518,0 +534,0 @@ }

{
"name": "cashaccounts",
"version": "0.3.2",
"version": "0.3.3",
"description": "decentralized identity system for bitcoin cash by Jonathan Silverblood",

@@ -5,0 +5,0 @@ "main": "index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc