From 5cdfb1d84609303aed0ddfb89af05ba5b95c7712 Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Sat, 30 Mar 2024 01:03:43 +0000 Subject: [PATCH] add token symbols --- components/Prices.tsx | 20 +++++++++++++------ components/Result.module.css | 38 +++++++++++++++++++++++++++++++++++- components/Result.tsx | 25 +++++++++++++++++++++--- next.config.mjs | 14 +++++++++++-- 4 files changed, 85 insertions(+), 12 deletions(-) diff --git a/components/Prices.tsx b/components/Prices.tsx index 938d53b..9c13584 100644 --- a/components/Prices.tsx +++ b/components/Prices.tsx @@ -24,12 +24,14 @@ export function Prices() { `/api/prices/?tokens=${tokens.toString()}`, fetcher ) + const { data: dataSwapOceanToAgix } = useSWR( `/api/quote/?src=${tokens[0]}&dst=${tokens[2]}&amount=${ debouncedAmountSwap * 1e18 }`, fetcher ) + console.log(dataSwapOceanToAgix) const { data: dataSwapOceanToFet } = useSWR( `/api/quote/?src=${tokens[0]}&dst=${tokens[1]}&amount=${ @@ -49,7 +51,8 @@ export function Prices() {

Buying with ${exampleBuyInUsd} right now gets you:

-

{formatNumber(amount, symbol)}

+ + {tokenSymbol} + + + {formatNumber(amount, tokenSymbol)} +

+

→{' '} {formatNumber(amountAsi, 'ASI')}{' '} = {formatNumber(amountFiat, 'USD')} diff --git a/next.config.mjs b/next.config.mjs index 4678774..9ffb9f7 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -1,4 +1,14 @@ /** @type {import('next').NextConfig} */ -const nextConfig = {}; +const nextConfig = { + images: { + remotePatterns: [ + { + protocol: 'https', + hostname: 'tokens.1inch.io', + pathname: '/**' + } + ] + } +} -export default nextConfig; +export default nextConfig