From 24a9e72dcd39ac90f421c43e2e8ea6c0f7803af6 Mon Sep 17 00:00:00 2001 From: zkdice-akira Date: Mon, 1 Apr 2024 01:11:50 +0530 Subject: [PATCH] fix build issues --- next.config.mjs | 16 ++++++++-------- src/app/strategy/page.tsx | 6 ++++-- src/app/template.tsx | 2 +- src/components/Deposit.tsx | 8 ++++---- src/strategies/simple.stable.strat.ts | 2 +- 5 files changed, 18 insertions(+), 16 deletions(-) diff --git a/next.config.mjs b/next.config.mjs index bb1bbf84..cf09adaf 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -6,14 +6,14 @@ const nextConfig = { exclude: ['error', 'warn'], }, }, - async rewrites() { - return [ - { - source: '/rpc-api', - destination: 'https://rpc.nethermind.io/mainnet-juno?apikey=t1HPjhplOyEQpxqVMhpwLGuwmOlbXN0XivWUiPAxIBs0kHVK', - }, - ] - }, + // async rewrites() { + // return [ + // { + // source: '/rpc-api', + // destination: 'https://rpc.nethermind.io/mainnet-juno?apikey=t1HPjhplOyEQpxqVMhpwLGuwmOlbXN0XivWUiPAxIBs0kHVK', + // }, + // ] + // }, }; export default nextConfig; diff --git a/src/app/strategy/page.tsx b/src/app/strategy/page.tsx index 93ba38d3..c24343a8 100644 --- a/src/app/strategy/page.tsx +++ b/src/app/strategy/page.tsx @@ -43,6 +43,8 @@ export default function Strategy() { mixpanel.track('Strategy page open', {name: searchParams.get('name')}) }, []) + const colSpan1: any = {base: '5', md: '3'} + const colSpan2: any = {base: '5', md: '2'} return ( @@ -51,7 +53,7 @@ export default function Strategy() { {strategy && - + @@ -79,7 +81,7 @@ export default function Strategy() { - + diff --git a/src/app/template.tsx b/src/app/template.tsx index 14d4a085..bb7168d9 100644 --- a/src/app/template.tsx +++ b/src/app/template.tsx @@ -98,7 +98,7 @@ export default function Template({ children }: { children: React.ReactNode }) { const chains = [sepolia]; const provider = jsonRpcProvider({ rpc: (chain) => { - let args: RpcProviderOptions = {nodeUrl: 'http://localhost:3000/rpc-api', chainId: constants.StarknetChainId.SN_MAIN }; + let args: RpcProviderOptions = {nodeUrl: 'https://rpc.nethermind.io/mainnet-juno?apikey=t1HPjhplOyEQpxqVMhpwLGuwmOlbXN0XivWUiPAxIBs0kHVK', chainId: constants.StarknetChainId.SN_MAIN }; return args; } }); diff --git a/src/components/Deposit.tsx b/src/components/Deposit.tsx index 5a11277d..4806ad70 100644 --- a/src/components/Deposit.tsx +++ b/src/components/Deposit.tsx @@ -36,8 +36,8 @@ export default function Deposit(props: DepositProps) { console.log('hookkkAmount', amount.toEtherStr(), calls) }, [amount, calls]) - function getBalanceComponent(token: TokenInfo) { - const { balance, isLoading, isError} = useERC20Balance(token); + function BalanceComponent(props: {token: TokenInfo}) { + const { balance, isLoading, isError} = useERC20Balance(props.token); return Available balance: - {balance.toEtherToFixedDecimals(token.displayDecimals)} + {balance.toEtherToFixedDecimals(props.token.displayDecimals)} } @@ -77,7 +77,7 @@ export default function Deposit(props: DepositProps) { - {getBalanceComponent(selectedMarket)} + diff --git a/src/strategies/simple.stable.strat.ts b/src/strategies/simple.stable.strat.ts index 15d1345c..d809ba24 100644 --- a/src/strategies/simple.stable.strat.ts +++ b/src/strategies/simple.stable.strat.ts @@ -27,7 +27,7 @@ export class SimpleStableStrategy extends IStrategy { constructor() { const rewardTokens = [{logo: CONSTANTS.LOGOS.STRK}, {logo: CONSTANTS.LOGOS.USDC}, {logo: CONSTANTS.LOGOS.USDT}]; - super('SSStrt', "Loop stable-coins to maximize yield", rewardTokens); + super('SSStrt', "Loop stable-coins to maximize yield", rewardTokens, []); this.steps = [{ name: "Deposit to best pool",