diff --git a/next.config.js b/next.config.js index a02fbfb..d3b68c5 100644 --- a/next.config.js +++ b/next.config.js @@ -3,17 +3,6 @@ const withPWA = require("next-pwa"); /** @type {import('next').NextConfig} */ module.exports = withPWA({ - pwa: { - disable: - process.env.NODE_ENV === "development" || - process.env.NODE_ENV === "preview" || - process.env.NODE_ENV === "production", - // delete two lines above to enable PWA in production deployment - // add your own icons to public/manifest.json - // to re-generate manifest.json, you can visit https://tomitm.github.io/appmanifest/ - dest: "public", - register: true, - }, images: { domains: ['raw.githubusercontent.com'], }, diff --git a/src/assets/default.tokenlist.json b/src/assets/default.tokenlist.json index 81ad14a..590cfd8 100644 --- a/src/assets/default.tokenlist.json +++ b/src/assets/default.tokenlist.json @@ -15,32 +15,32 @@ "address": "", "symbol": "ETH", "decimals": 18, - "chainId": 1802203764, + "chainId": 920637907288165, "logoURI": "https://raw.githubusercontent.com/SetProtocol/uniswap-tokenlist/0d9233eef112388ef7e261cb88413894fd832679/assets/tokensets/coin-icons/eth.svg", "isNative": true }, { "name": "Wrapped Ethereum", - "address": "0x761612F0C8bdf8cF10e6F10045E2Ca7cbffBa8A3", + "address": "0xe7f1725e7734ce288f8367e1bb143e90bb3f0512", "symbol": "WETH", "decimals": 18, - "chainId": 1802203764, + "chainId": 920637907288165, "logoURI": "https://raw.githubusercontent.com/SetProtocol/uniswap-tokenlist/0d9233eef112388ef7e261cb88413894fd832679/assets/tokensets/coin-icons/eth.svg" }, { "name": "USD Coin", - "address": "0x3Ec72F6efE03e1f6E3e5Ac459d1fA8c86C7198Ae", - "symbol": "USDC", - "decimals": 18, - "chainId": 1802203764, + "address": "0x1B4C0bc8703D3af59322849bE01559fdb920c904", + "symbol": "kUSDC", + "decimals": 6, + "chainId": 920637907288165, "logoURI": "https://raw.githubusercontent.com/SetProtocol/uniswap-tokenlist/0d9233eef112388ef7e261cb88413894fd832679/assets/tokensets/coin-icons/usdc.svg" }, { "name": "Tether USD", - "address": "0xb0537C06a5DE57a17376b2Bb57641646028965e6", - "symbol": "USDT", - "decimals": 18, - "chainId": 1802203764, + "address": "0x2BF1004D9e80ca087BD1e089d75bc8c471995aC1", + "symbol": "kUSDT", + "decimals": 6, + "chainId": 920637907288165, "logoURI": "https://raw.githubusercontent.com/SetProtocol/uniswap-tokenlist/0d9233eef112388ef7e261cb88413894fd832679/assets/tokensets/coin-icons/usdt.svg" } ] diff --git a/src/components/layout/Layout.tsx b/src/components/layout/Layout.tsx index 39114a5..f698853 100644 --- a/src/components/layout/Layout.tsx +++ b/src/components/layout/Layout.tsx @@ -32,8 +32,9 @@ const Layout = ({ children }: LayoutProps) => { // Once user is connected, fetch is balance useEffect(() => { // Fetch balance when user connect - if (!init && pools.length === 0 && tokens.length > 0 && isConnected && walletProvider) { + if (!init && tokens.length > 0 && isConnected && walletProvider) { getTokenBalanceForAll(tokens, walletProvider); + getTokenAllowanceForAll(tokens, walletProvider); } if (!init && pools.length > 0 && isConnected && walletProvider) { diff --git a/src/components/wallet/web3-modal.tsx b/src/components/wallet/web3-modal.tsx index fbbf1b4..d71d538 100644 --- a/src/components/wallet/web3-modal.tsx +++ b/src/components/wallet/web3-modal.tsx @@ -5,11 +5,11 @@ const projectId = process.env.NEXT_PUBLIC_WALLET_CONNECT_PROJECT_ID || ""; // 2. Set chains export const kakarotSepolia = { - chainId: 1802203764, + chainId: 920637907288165, name: "Kakarot Sepolia", currency: "ETH", - explorerUrl: "https://sepolia.kakarotscan.org", - rpcUrl: "https://sepolia-rpc-priority.kakarot.org", + explorerUrl: "https://blockscout-kkrt-sepolia.karnot.xyz/", + rpcUrl: "https://sepolia-rpc.kakarot.org/", }; // 3. Create a metadata object diff --git a/src/context/WalletProvider/manager.ts b/src/context/WalletProvider/manager.ts index e5f8cbf..d90f9f0 100644 --- a/src/context/WalletProvider/manager.ts +++ b/src/context/WalletProvider/manager.ts @@ -156,7 +156,6 @@ const useWalletManager = (): WalletState => { // Need to init token list before call const getTokenBalanceForAll = React.useCallback( async (tokensToGetBalance: TokenState[], callerAccount: Eip1193Provider) => { - console.log("coucou"); tokensToGetBalance.forEach((token: TokenState) => { getTokenBalance(token, callerAccount); }); diff --git a/src/contracts/addresses.ts b/src/contracts/addresses.ts index 9449ca4..021251b 100644 --- a/src/contracts/addresses.ts +++ b/src/contracts/addresses.ts @@ -1,4 +1,4 @@ // Addresses on the kakarot testnet (TODO add testnet/mainnet environments) -export const KAKASWAP_ROUTER = "0x7c51B6E67a3a7deD9E61F555e1f9FFb9BdE7ae4d"; -export const KAKASWAP_FACTORY = "0xe4CEb28E1e3a6192542A778f1c7277b7267C00B8"; -export const WETH_ADDRESS = "0x761612F0C8bdf8cF10e6F10045E2Ca7cbffBa8A3"; +export const KAKASWAP_ROUTER = "0x85db84922b6B33E69FdA103828Dc777E818C9B28"; +export const KAKASWAP_FACTORY = "0x9447104d4c65B1aB700e9401B6934F7a92f6c032"; +export const WETH_ADDRESS = "0xe7f1725e7734ce288f8367e1bb143e90bb3f0512";