@ercworldio/blockchain-shared 1.0.5-dev.8-PLAT300.2 → 1.0.5-dev.8-PLAT300.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -30,9 +30,9 @@ AccountingServiceStatic.fetch_crypto_rate_task = (data) => __awaiter(void 0, voi
|
|
|
30
30
|
const result = yield pool.query(`
|
|
31
31
|
SELECT accounting.fn_get_crypto_rate($1::text)
|
|
32
32
|
`, [ticker]);
|
|
33
|
-
if (!result.rows) {
|
|
33
|
+
if (!result.rows || !result.rowCount) {
|
|
34
34
|
throw new Error("DB returned no rows for fn_get_crypto_rate");
|
|
35
35
|
}
|
|
36
|
-
return Number(result.rows);
|
|
36
|
+
return Number(result.rows[0].fn_get_crypto_rate);
|
|
37
37
|
});
|
|
38
38
|
exports.default = AccountingServiceStatic;
|