mirror of
https://github.com/LBRYFoundation/lbry-wunderbot.git
synced 2025-09-02 10:15:17 +00:00
Merge pull request #187 from lbryio/filipnyquist-patch-2
Fixed more errors with CMC v2 API
This commit is contained in:
commit
e920d83324
1 changed files with 2 additions and 4 deletions
|
@ -32,7 +32,7 @@ exports.stats = {
|
||||||
let json = response.body[0];
|
let json = response.body[0];
|
||||||
let newjson = parse_obj(json);
|
let newjson = parse_obj(json);
|
||||||
let parse = JSON.stringify(newjson);
|
let parse = JSON.stringify(newjson);
|
||||||
let volume24_usd = parse.replace(/[^0-9]/g, '');
|
let volume24_usd = Number(data.quotes.USD.volume_24h);
|
||||||
let dt = new Date();
|
let dt = new Date();
|
||||||
let timestamp = dt.toUTCString();
|
let timestamp = dt.toUTCString();
|
||||||
let hr_indicator = ':thumbsup:';
|
let hr_indicator = ':thumbsup:';
|
||||||
|
@ -56,8 +56,6 @@ exports.stats = {
|
||||||
} else {
|
} else {
|
||||||
data = response.body.data;
|
data = response.body.data;
|
||||||
let price_eur = Number(data.quotes.EUR.price);
|
let price_eur = Number(data.quotes.EUR.price);
|
||||||
data = response.body[0];
|
|
||||||
price_eur = Number(data.price_eur);
|
|
||||||
let description =
|
let description =
|
||||||
'**Rank: [' +
|
'**Rank: [' +
|
||||||
rank +
|
rank +
|
||||||
|
@ -76,7 +74,7 @@ exports.stats = {
|
||||||
statsurl +
|
statsurl +
|
||||||
')\n' +
|
')\n' +
|
||||||
'Circulating Supply: [' +
|
'Circulating Supply: [' +
|
||||||
numberWithCommas(available_supply) +
|
numberWithCommas(circulating_supply) +
|
||||||
' LBC](' +
|
' LBC](' +
|
||||||
statsurl +
|
statsurl +
|
||||||
')\n' +
|
')\n' +
|
||||||
|
|
Loading…
Add table
Reference in a new issue