2023-11-28 01:30:36 +01:00
|
|
|
#include <array>
|
|
|
|
#include <string>
|
|
|
|
#include <cmath>
|
2023-11-28 02:05:04 +01:00
|
|
|
#include <cstdint>
|
|
|
|
|
2023-11-28 01:30:36 +01:00
|
|
|
#include "utils.hpp"
|
|
|
|
|
2024-08-15 00:37:50 +02:00
|
|
|
const char CURRENCY_USD = '$';
|
|
|
|
const char CURRENCY_EUR = '[';
|
2024-08-31 23:11:48 +02:00
|
|
|
const char CURRENCY_GBP = ']';
|
|
|
|
const char CURRENCY_JPY = '^';
|
|
|
|
const char CURRENCY_AUD = '_';
|
2024-08-15 00:37:50 +02:00
|
|
|
const char CURRENCY_CAD = '`';
|
|
|
|
|
2024-09-05 14:00:15 +02:00
|
|
|
const std::string CURRENCY_CODE_USD = "USD";
|
|
|
|
const std::string CURRENCY_CODE_EUR = "EUR";
|
|
|
|
const std::string CURRENCY_CODE_GBP = "GBP";
|
|
|
|
const std::string CURRENCY_CODE_JPY = "JPY";
|
|
|
|
const std::string CURRENCY_CODE_AUD = "AUD";
|
|
|
|
const std::string CURRENCY_CODE_CAD = "CAD";
|
|
|
|
|
2024-08-15 00:37:50 +02:00
|
|
|
std::array<std::string, NUM_SCREENS> parsePriceData(std::uint32_t price, char currency, bool useSuffixFormat = false);
|
2024-03-10 12:35:20 +01:00
|
|
|
std::array<std::string, NUM_SCREENS> parseSatsPerCurrency(std::uint32_t price, char currencySymbol, bool withSatsSymbol);
|
2023-11-28 02:05:04 +01:00
|
|
|
std::array<std::string, NUM_SCREENS> parseBlockHeight(std::uint32_t blockHeight);
|
2024-03-10 12:35:20 +01:00
|
|
|
std::array<std::string, NUM_SCREENS> parseHalvingCountdown(std::uint32_t blockHeight, bool asBlocks);
|
2024-03-10 20:24:55 +01:00
|
|
|
std::array<std::string, NUM_SCREENS> parseMarketCap(std::uint32_t blockHeight, std::uint32_t price, char currencySymbol, bool bigChars);
|
|
|
|
std::array<std::string, NUM_SCREENS> parseBlockFees(std::uint16_t blockFees);
|
2024-08-15 00:37:50 +02:00
|
|
|
|
|
|
|
char getCurrencySymbol(char input);
|
2024-09-05 14:00:15 +02:00
|
|
|
std::string getCurrencyCode(char input);
|
|
|
|
char getCurrencyChar(const std::string& input);
|