Comparing version 0.2.5 to 0.2.6
31
index.js
@@ -230,12 +230,12 @@ const axios = require('axios') | ||
this.chains.map(el => { | ||
this.amount[el] = (amount / this.rates[this.nativeCurrency[el]]).toString() | ||
}) | ||
await this.getWalletsOfMerchantById() | ||
if (currency) { | ||
let __amount = (Number(amount) / this.rates[currency]) | ||
if (__amount == NaN || Infinity || undefined) | ||
__amount = 0 | ||
list.push([ | ||
currency, | ||
(amount / this.rates[currency]).toString(), | ||
__amount.toString(), | ||
this.companyAccount[this.currency_to_chain[currency]][0], | ||
@@ -253,6 +253,10 @@ payload, | ||
Object.keys(this.companyAccount).map((el) => { | ||
let __amount = (Number(amount) / this.rates[this.nativeCurrency[el]]) | ||
if (__amount == NaN || Infinity || undefined) | ||
__amount = 0 | ||
if (this.companyAccount[el].length) { | ||
list.push([ | ||
this.nativeCurrency[el], | ||
(amount / this.rates[this.nativeCurrency[el]]).toString(), | ||
__amount.toString(), | ||
this.companyAccount[el][0], | ||
@@ -268,2 +272,4 @@ payload, | ||
console.log(list) | ||
resolve(true) | ||
@@ -292,5 +298,9 @@ }) | ||
if (currency) { | ||
let __amount = (Number(amount) / this.rates[currency]) | ||
if (__amount == NaN || Infinity || undefined) | ||
__amount = 0 | ||
list.push([ | ||
currency, | ||
(amount / this.rates[currency]).toString(), | ||
__amount.toString(), | ||
this.companyAccount[this.currency_to_chain[currency]], | ||
@@ -306,5 +316,10 @@ payload, | ||
if (this.companyAccount[el].length) { | ||
let __amount = Number(amount) / this.rates[this.nativeCurrency[el]] | ||
if (__amount == NaN || Infinity || undefined) | ||
__amount = 0 | ||
list.push([ | ||
this.nativeCurrency[el], | ||
(amount / this.rates[this.nativeCurrency[el]]).toString(), | ||
__amount.toString(), | ||
this.companyAccount[el], | ||
@@ -311,0 +326,0 @@ payload, |
{ | ||
"name": "crypttp", | ||
"version": "0.2.5", | ||
"version": "0.2.6", | ||
"description": "Module to call APIs of crypttp powered by alemey", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
14122
333