ethereum-emissions-calculator
Advanced tools
Comparing version 1.8.2-7 to 1.8.2-8
@@ -27,2 +27,3 @@ "use strict"; | ||
const calculateAddressEmissions = (options) => __awaiter(void 0, void 0, void 0, function* () { | ||
var _a, _b, _c, _d; | ||
validateCalculatorOptions_1.validateCalculatorOptions(options); | ||
@@ -37,4 +38,4 @@ const { transactions, done } = yield getAddressTransactions_1.getAddressTransactions(options); | ||
gasUsed, | ||
highestBlockNumber: Number(transactions[0].blockNumber), | ||
lowestBlockNumber: Number(transactions[transactions.length - 1].blockNumber), | ||
highestBlockNumber: Number((_b = (_a = transactions[0]) === null || _a === void 0 ? void 0 : _a.blockNumber) !== null && _b !== void 0 ? _b : "0"), | ||
lowestBlockNumber: Number((_d = (_c = transactions[transactions.length - 1]) === null || _c === void 0 ? void 0 : _c.blockNumber) !== null && _d !== void 0 ? _d : "0"), | ||
done, | ||
@@ -48,2 +49,3 @@ }; | ||
const calculateContractEmissions = (options) => __awaiter(void 0, void 0, void 0, function* () { | ||
var _e, _f, _g, _h; | ||
validateCalculatorOptions_1.validateCalculatorOptions(options); | ||
@@ -58,4 +60,4 @@ const { transactions, done } = yield getAddressTransactions_1.getAddressTransactions(options); | ||
gasUsed, | ||
highestBlockNumber: Number(transactions[0].blockNumber), | ||
lowestBlockNumber: Number(transactions[transactions.length - 1].blockNumber), | ||
highestBlockNumber: Number((_f = (_e = transactions[0]) === null || _e === void 0 ? void 0 : _e.blockNumber) !== null && _f !== void 0 ? _f : "0"), | ||
lowestBlockNumber: Number((_h = (_g = transactions[transactions.length - 1]) === null || _g === void 0 ? void 0 : _g.blockNumber) !== null && _h !== void 0 ? _h : "0"), | ||
done, | ||
@@ -62,0 +64,0 @@ }; |
{ | ||
"name": "ethereum-emissions-calculator", | ||
"version": "1.8.2-7", | ||
"version": "1.8.2-8", | ||
"description": "TypeScript utils to calculate the CO2 emissions of an Ethereum wallet. Powered by the Etherscan.io API.", | ||
@@ -5,0 +5,0 @@ "main": "./lib/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
21689
329