From ca7aba9ff92f346ef977e708b56af6c73cacfe7e Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Tue, 2 Apr 2024 10:57:15 +0100 Subject: [PATCH] use complete ratios for calculations --- constants.ts | 4 ++-- .../prices/components/MarketData/MarketData.module.css | 5 ----- features/prices/components/MarketData/MarketData.tsx | 8 ++++++-- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/constants.ts b/constants.ts index a384df9..1f040a2 100644 --- a/constants.ts +++ b/constants.ts @@ -4,8 +4,8 @@ export const title = 'ASI Calculator' export const description = 'See how much ASI you get for your OCEAN, AGIX, or FET.' -export const ratioOceanToAsi = 0.433226 -export const ratioAgixToAsi = 0.43335 +export const ratioOceanToAsi = 0.43322638231018 +export const ratioAgixToAsi = 0.43335018345744 export const ratioFetToAsi = 1 export const tokens: Token[] = [ diff --git a/features/prices/components/MarketData/MarketData.module.css b/features/prices/components/MarketData/MarketData.module.css index 4ed8231..a909e13 100644 --- a/features/prices/components/MarketData/MarketData.module.css +++ b/features/prices/components/MarketData/MarketData.module.css @@ -16,11 +16,6 @@ font-size: 0.9rem; } -.marketData p { - display: flex; - align-items: center; -} - .fiat { color: var(--text-dimmed); } diff --git a/features/prices/components/MarketData/MarketData.tsx b/features/prices/components/MarketData/MarketData.tsx index c388866..ec1c38f 100644 --- a/features/prices/components/MarketData/MarketData.tsx +++ b/features/prices/components/MarketData/MarketData.tsx @@ -37,7 +37,9 @@ export function MarketData() {
  • - 1 OCEAN = {ratioOceanToAsi} ASI + 1 OCEAN ={' '} + {ratioOceanToAsi.toFixed(6)}{' '} + ASI

    @@ -48,7 +50,9 @@ export function MarketData() {

  • - 1 AGIX = {ratioAgixToAsi} ASI + 1 AGIX ={' '} + {ratioAgixToAsi.toFixed(5)}{' '} + ASI