diff --git a/.env.development b/.env.development index 6a19a711..a83253f6 100644 --- a/.env.development +++ b/.env.development @@ -1,5 +1,5 @@ NODE_ENV=development -VUE_APP_API_URI=https://hope.better-call.dev/v1 +VUE_APP_API_URI=https://api.better-call.dev/v1 VUE_APP_IPFS_NODE=https://cloudflare-ipfs.com/ VUE_APP_SEARCH_SERVICE_URI=https://search.dipdup.net VUE_APP_TOKEN_METADATA_API=https://metadata.dipdup.net diff --git a/src/utils/diff.js b/src/utils/diff.js index 6b40c9a7..c04e62d5 100644 --- a/src/utils/diff.js +++ b/src/utils/diff.js @@ -34,7 +34,7 @@ function formatValue(val, typ) { } function formatInt(x) { - return x.replace(/\B(?=(\d{3})+(?!\d))/g, ","); + return x ? x.replace(/\B(?=(\d{3})+(?!\d))/g, ",") : '0'; } function getValue(x) { @@ -48,7 +48,7 @@ function valueDiff(x) { if (!x.type) return ''; if (x.type === 'nat' || x.type === 'int') { - let value = parseInt(x.value, 10) - parseInt(x.from, 10); + let value = parseInt(x.value, 10) - parseInt(x.from ? x.from : 0, 10); return ` (${value > 0 ? '+' : ''}${value.toLocaleString(undefined)})` } else if (x.type === 'timestamp') { let from = parseTimestamp(x.from);