+
{!!protocolInfo ? (
{protocolInfo?.name}
) : (
@@ -248,6 +266,7 @@ const Message = (props: any) => {
fromToken : {text.fromToken}
toToken : {text.toToken}
amount : {text.amount}
+
gas(fee) : {formatEther(gas)}
))}
{
+ setMounted(true);
+ }, []);
return (
-
-
-
-
-
-
- {" "}
-
-
-
-
-
+ <>
+ {mounted && (
+
+
+
+
+
+
+ {" "}
+
+
+
+
+
+ )}
+ >
);
}
diff --git a/src/pages/api/1inch/quote.ts b/src/pages/api/1inch/quote.ts
index dd0dae6..d33a462 100644
--- a/src/pages/api/1inch/quote.ts
+++ b/src/pages/api/1inch/quote.ts
@@ -10,7 +10,7 @@ export default async function handler(
const chainId = req.query.chainId;
try {
const response = await fetch(
- `https://api.1inch.dev/swap/v5.2/${chainId}/quote?src=${src}&dst=${dst}&amount=${amount}`,
+ `https://api.1inch.dev/swap/v5.2/${chainId}/quote?src=${src}&dst=${dst}&amount=${amount}&includeProtocols=true&includeGas=true `,
{
method: "GET",
headers: {
diff --git a/src/pages/api/1inch/route.ts b/src/pages/api/1inch/route.ts
index 40ef056..d482222 100644
--- a/src/pages/api/1inch/route.ts
+++ b/src/pages/api/1inch/route.ts
@@ -10,7 +10,7 @@ export default async function handler(
const chainId = req.query.chainId;
try {
const response = await fetch(
- `https://api.1inch.dev/swap/v5.2/${chainId}/quote?src=${src}&dst=${dst}&amount=${amount}&includeProtocols=true`,
+ `https://api.1inch.dev/swap/v5.2/${chainId}/quote?src=${src}&dst=${dst}&amount=${amount}`,
{
method: "GET",
headers: {