From 8cd990e11d58eed93a4042cae5f45e4beb079e85 Mon Sep 17 00:00:00 2001 From: C0D3O <75484297+C0D3O@users.noreply.github.com> Date: Sat, 1 Jun 2024 19:46:20 +0300 Subject: [PATCH 1/3] fixed typo ( switched comments lines ) --- examples/single-price.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/single-price.js b/examples/single-price.js index bb81e17a..d97363b1 100644 --- a/examples/single-price.js +++ b/examples/single-price.js @@ -21,7 +21,7 @@ offchainOracle.getRateToEth( const numerator = 10 ** token.decimals; const denominator = 1e18; // eth decimals const price = parseFloat(rate) * numerator / denominator / 1e18; - console.log(price.toString()); // USDT in ETH - console.log((1 / price).toString()); // ETH in USDT + console.log(price.toString()); // ETH in USDT + console.log((1 / price).toString()); // USDT in ETH }) .catch(console.log); From 9d93d4c3f244acac589944cdae1d14ba8184c521 Mon Sep 17 00:00:00 2001 From: zZoMROT Date: Tue, 25 Jun 2024 02:13:49 +0100 Subject: [PATCH 2/3] Update examples/single-price.js --- examples/single-price.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/single-price.js b/examples/single-price.js index d97363b1..1e06d53e 100644 --- a/examples/single-price.js +++ b/examples/single-price.js @@ -21,7 +21,7 @@ offchainOracle.getRateToEth( const numerator = 10 ** token.decimals; const denominator = 1e18; // eth decimals const price = parseFloat(rate) * numerator / denominator / 1e18; - console.log(price.toString()); // ETH in USDT - console.log((1 / price).toString()); // USDT in ETH + console.log(price.toString()); // how much ETH needed for 1 USDT + console.log((1 / price).toString()); // how much USDT needed for 1 ETH }) .catch(console.log); From 2033c2002eba0dff91ec761f4d8338828656e10e Mon Sep 17 00:00:00 2001 From: zZoMROT Date: Tue, 25 Jun 2024 02:13:55 +0100 Subject: [PATCH 3/3] Update examples/single-price.js --- examples/single-price.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/single-price.js b/examples/single-price.js index 1e06d53e..07461cb8 100644 --- a/examples/single-price.js +++ b/examples/single-price.js @@ -19,7 +19,7 @@ offchainOracle.getRateToEth( ) .then((rate) => { const numerator = 10 ** token.decimals; - const denominator = 1e18; // eth decimals + const denominator = 1e18; // ETH decimals const price = parseFloat(rate) * numerator / denominator / 1e18; console.log(price.toString()); // how much ETH needed for 1 USDT console.log((1 / price).toString()); // how much USDT needed for 1 ETH