Merge pull request #1764 from mempool/nymkappa/bugfix/fx-rate-db-disable

Only attempt to save fx rate if database is enabled
This commit is contained in:
wiz 2022-06-01 03:47:05 +09:00 committed by GitHub
commit 260f883d02
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -343,7 +343,7 @@ class Blocks {
await blocksRepository.$saveBlockInDatabase(blockExtended);
}
}
if (fiatConversion.ratesInitialized === true) {
if (fiatConversion.ratesInitialized === true && config.DATABASE.ENABLED === true) {
await RatesRepository.$saveRate(blockExtended.height, fiatConversion.getConversionRates());
}