Extended the decimal precision of the converted XMR value from 8 to 12 places. This ensures more accurate representation of conversion rates, especially critical for high-precision financial calculations.
Unified the decimal places to 8 for all cryptocurrency conversions in
fiatConvert function. This simplifies the logic and ensures consistent
precision across all supported cryptocurrencies.
Start fetching exchange rates immediately upon initialization, ensuring the most current data is available from the outset. This prevents potential inaccuracies during initial use if rates are only fetched after the interval delay.
Refactored event listeners for XMR and fiat input fields, consolidating common logic and improving maintainability. Introduced explicit copy button IDs and enhanced their functionality by moving inline click handlers to addEventListener. These changes streamline form control interactions and ensure consistent behavior across different user inputs.
Additionally, removed redundant onchange handlers from the PHP file to simplify code and mitigate potential conflicts.
- Switched to using cURL for fetching data from CoinGecko API, with added error handling for failed requests. This reduces the chances of runtime errors and ensures fallback to previous data.
- Implemented periodic updates to exchange rates every 5 seconds in `main.js` to keep the rates current.
- Added OpenGraph meta tags on `index.php` for better social media integration.
- Minor CSS adjustments for better table rendering.
- Moved `import` statements for Bootstrap CSS and JS to the top in `main.js`.