diff --git a/package.json b/package.json index 8a88bd2..cb96657 100644 --- a/package.json +++ b/package.json @@ -7,8 +7,7 @@ "build": "next build", "start": "next start", "lint": "next lint", - "prepare": "husky", - "format": "prettier --write ." + "prepare": "husky" }, "dependencies": { "@argent/x-sessions": "^6.7.4", @@ -17,11 +16,11 @@ "@emotion/react": "^11.11.4", "@emotion/styled": "^11.11.5", "@starknet-io/types-js": "^0.7.7", - "@starknet-react/chains": "3.0.0-beta.3", - "@starknet-react/core": "3.0.0-beta.3", + "@starknet-react/chains": "^0.1.7", + "@starknet-react/core": "^2.8.2", "colord": "^2.9.3", "framer-motion": "^11.2.10", - "get-starknet-core": "^4.0.0", + "get-starknet-core": "^3.2.0", "jotai": "^2.8.2", "lodash-es": "^4.17.21", "next": "14.2.4", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index ef3a7fb..3005acc 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -13,7 +13,7 @@ importers: version: 6.7.5 '@argent/x-shared': specifier: ^1.32.1 - version: 1.34.2(@scure/base@1.1.8)(@scure/bip39@1.3.0)(lodash-es@4.17.21)(object-hash@3.0.0)(react-dom@18.3.1(react@18.3.1))(react-router-dom@6.26.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react@18.3.1)(swr@1.3.0(react@18.3.1))(typescript@5.5.4)(ua-parser-js@1.0.38)(zod@3.23.8) + version: 1.34.2(@scure/base@1.1.7)(@scure/bip39@1.3.0)(lodash-es@4.17.21)(object-hash@3.0.0)(react-dom@18.3.1(react@18.3.1))(react-router-dom@6.26.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react@18.3.1)(swr@1.3.0(react@18.3.1))(typescript@5.5.4)(ua-parser-js@1.0.38)(zod@3.23.8) '@chakra-ui/react': specifier: ^2.8.2 version: 2.8.2(@emotion/react@11.13.0(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.13.0(@emotion/react@11.13.0(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(framer-motion@11.3.28(@emotion/is-prop-valid@1.3.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1) @@ -27,11 +27,11 @@ importers: specifier: ^0.7.7 version: 0.7.7 '@starknet-react/chains': - specifier: 3.0.0-beta.3 - version: 3.0.0-beta.3 + specifier: ^0.1.7 + version: 0.1.7 '@starknet-react/core': - specifier: 3.0.0-beta.3 - version: 3.0.0-beta.3(get-starknet-core@4.0.0)(react@18.3.1)(starknet@6.11.0)(typescript@5.5.4) + specifier: ^2.8.2 + version: 2.9.0(get-starknet-core@3.3.3(starknet@6.11.0))(react@18.3.1)(starknet@6.11.0) colord: specifier: ^2.9.3 version: 2.9.3 @@ -39,8 +39,8 @@ importers: specifier: ^11.2.10 version: 11.3.28(@emotion/is-prop-valid@1.3.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) get-starknet-core: - specifier: ^4.0.0 - version: 4.0.0 + specifier: ^3.2.0 + version: 3.3.3(starknet@6.11.0) jotai: specifier: ^2.8.2 version: 2.9.3(@types/react@18.3.3)(react@18.3.1) @@ -67,7 +67,7 @@ importers: version: '@starknet-react/chains@3.0.0-beta.2' starknet-react-core-next: specifier: npm:@starknet-react/core@3.0.0-beta.2 - version: '@starknet-react/core@3.0.0-beta.2(get-starknet-core@4.0.0)(react@18.3.1)(starknet@6.11.0)(typescript@5.5.4)' + version: '@starknet-react/core@3.0.0-beta.2(get-starknet-core@3.3.3(starknet@6.11.0))(react@18.3.1)(starknet@6.11.0)(typescript@5.5.4)' starknetkit-latest: specifier: npm:starknetkit@^1.1.9 version: starknetkit@1.1.9(starknet@6.11.0) @@ -101,7 +101,7 @@ importers: version: 9.1.0(eslint@8.57.0) eslint-plugin-import: specifier: ^2.29.1 - version: 2.29.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0) + version: 2.29.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0) eslint-plugin-react: specifier: ^7.34.2 version: 7.35.0(eslint@8.57.0) @@ -988,9 +988,6 @@ packages: '@scure/base@1.1.7': resolution: {integrity: sha512-PPNYBslrLNNUQ/Yad37MHYsNQtK67EhWb6WtSvNLLPo7SdVZgkUjD6Dg+5On7zNwmskf8OX7I7Nx5oN+MIWE0g==} - '@scure/base@1.1.8': - resolution: {integrity: sha512-6CyAclxj3Nb0XT7GHK6K4zK6k2xJm6E4Ft0Ohjt4WgegiFUHEtFb2CGzmPmGBwoIhrLsqNLYfLr04Y1GePrzZg==} - '@scure/bip32@1.1.5': resolution: {integrity: sha512-XyNh1rB0SkEqd3tXcXMi+Xe1fvg+kUIcoRIEujP1Jgv7DqW2r9lg3Ah0NkFaCs9sTkQAQA8kw7xiRXzENi9Rtw==} @@ -1069,11 +1066,18 @@ packages: '@starknet-io/types-js@0.7.7': resolution: {integrity: sha512-WLrpK7LIaIb8Ymxu6KF/6JkGW1sso988DweWu7p5QY/3y7waBIiPvzh27D9bX5KIJNRDyOoOVoHVEKYUYWZ/RQ==} + '@starknet-react/chains@0.1.7': + resolution: {integrity: sha512-UNh97I1SvuJKaAhKOmpEk8JcWuZWMlPG/ba2HcvFYL9x/47BKndJ+Da9V+iJFtkHUjreVnajT1snsaz1XMG+UQ==} + '@starknet-react/chains@3.0.0-beta.2': resolution: {integrity: sha512-ig/IxmNPfaBWOGSBcMKqzElXt6ksNt4VjEgHrFO4oaRw0xl9YVQuw32GbN9ju37CxTyNC32eFX+DGOyOCGaBcg==} - '@starknet-react/chains@3.0.0-beta.3': - resolution: {integrity: sha512-Xq59vvSctzQmYLATRBdqouiW3bdI+dyYUviBIF0G2k70niPatJsSNa8N8NsJCk5yHo1xLnfoYvo9ufVp+BQrUQ==} + '@starknet-react/core@2.9.0': + resolution: {integrity: sha512-UdRo454/g2lb0YsNAUJohJ2w21LlahcEXQlkWrddoKFubRY6Q0b39hec0eZOCqfU0Z1Sh7kF1XYvI5t9xL4yTQ==} + peerDependencies: + get-starknet-core: ^3.2.0 + react: ^18.0 + starknet: ^5.25.0 '@starknet-react/core@3.0.0-beta.2': resolution: {integrity: sha512-6ETF7TjQFaFs3EMLhrACu9jd0ZJ0lvUeg6PmQ+W4KIHM2VjpvdmTqu8uwmxWDJmVCF4u7+Biy6DrQTAbPQAbJQ==} @@ -1082,13 +1086,6 @@ packages: react: ^18.0 starknet: ^6.12.1 - '@starknet-react/core@3.0.0-beta.3': - resolution: {integrity: sha512-J8VS4Ou4VRATDTpWwFjp2P7WzSkpSFc3qa7TA6mcHMaD50T/53VegoqnNO5EfhB0OSUIgEKaN7JnRyg26UGybg==} - peerDependencies: - get-starknet-core: ^4.0.0 - react: ^18.0 - starknet: ^6.11.0 - '@swc/counter@0.1.3': resolution: {integrity: sha512-e2BR4lsJkkRlKZ/qCHPw9ZaSxc0MVUd7gtbtaB7aMvHeJVYe8sOB8DBZkP2DtISHGSku9sCK6T6cnY0CtXrOCQ==} @@ -1098,19 +1095,11 @@ packages: '@tanstack/query-core@5.51.24': resolution: {integrity: sha512-qtIR0FMHUDIWyIQw87q4C+so7XaN59MsGfWrc6rgi2VTHrVZF3Hd0St2dbpqRetHf6XW5yY5lzTrXpTilPlxUg==} - '@tanstack/query-core@5.54.1': - resolution: {integrity: sha512-hKS+WRpT5zBFip21pB6Jx1C0hranWQrbv5EJ7qPoiV5MYI3C8rTCqWC9DdBseiPT1JgQWh8Y55YthuYZNiw3Xw==} - '@tanstack/react-query@5.51.24': resolution: {integrity: sha512-sW1qRwoCDqOFku67xng4Y5z6NPK1DS347jR4RiX9wFHrmyqpbXgUjPIjT3fodezdJAaSJD/6CvWb0cl05J8zNQ==} peerDependencies: react: ^18.0.0 - '@tanstack/react-query@5.54.1': - resolution: {integrity: sha512-SuMi4JBYv49UtmiRyqjxY7XAnE1qwLht9nlkC8sioxFXz5Uzj30lepiKf2mYXuXfC7fHYjTrAPkNx+427pRHXA==} - peerDependencies: - react: ^18 || ^19 - '@trpc/client@10.45.2': resolution: {integrity: sha512-ykALM5kYWTLn1zYuUOZ2cPWlVfrXhc18HzBDyRhoPYN0jey4iQHEFSEowfnhg1RvYnrAVjNBgHNeSAXjrDbGwg==} peerDependencies: @@ -2094,6 +2083,9 @@ packages: resolution: {integrity: sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==} engines: {node: '>= 4'} + immutable@4.3.7: + resolution: {integrity: sha512-1hqclzwYwjRDFLjcFxOM5AYkkG0rpFPpr1RLPMEuGczoS7YA8gLhy8SWXYRAA/XwfEHpfo3cw5JGioS32fnMRw==} + import-fresh@3.3.0: resolution: {integrity: sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==} engines: {node: '>=6'} @@ -3333,14 +3325,6 @@ packages: typescript: optional: true - viem@2.21.1: - resolution: {integrity: sha512-nlIc2LLS6aqkngULS9UJ2Sg3nHKAgF9bbpDUwjUoAUBijd69mrCWPBXQ8jmbzcx12uZUfd9Nc//CHgSVZiMwyg==} - peerDependencies: - typescript: '>=5.0.4' - peerDependenciesMeta: - typescript: - optional: true - webauthn-p256@0.0.5: resolution: {integrity: sha512-drMGNWKdaixZNobeORVIqq7k5DsRC9FnG201K2QjeOoQLmtSDaSsVZdkg6n5jUALJKcAG++zBPJXmv6hy0nWFg==} @@ -3462,11 +3446,11 @@ snapshots: transitivePeerDependencies: - encoding - '@argent/x-shared@1.34.2(@scure/base@1.1.8)(@scure/bip39@1.3.0)(lodash-es@4.17.21)(object-hash@3.0.0)(react-dom@18.3.1(react@18.3.1))(react-router-dom@6.26.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react@18.3.1)(swr@1.3.0(react@18.3.1))(typescript@5.5.4)(ua-parser-js@1.0.38)(zod@3.23.8)': + '@argent/x-shared@1.34.2(@scure/base@1.1.7)(@scure/bip39@1.3.0)(lodash-es@4.17.21)(object-hash@3.0.0)(react-dom@18.3.1(react@18.3.1))(react-router-dom@6.26.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react@18.3.1)(swr@1.3.0(react@18.3.1))(typescript@5.5.4)(ua-parser-js@1.0.38)(zod@3.23.8)': dependencies: '@argent/x-multicall': 7.1.0(typescript@5.5.4) '@noble/hashes': 1.4.0 - '@scure/base': 1.1.8 + '@scure/base': 1.1.7 '@scure/bip39': 1.3.0 '@starknet-io/types-js': 0.7.7 async-retry: 1.3.3 @@ -4551,29 +4535,27 @@ snapshots: '@scure/base@1.1.7': {} - '@scure/base@1.1.8': {} - '@scure/bip32@1.1.5': dependencies: '@noble/hashes': 1.2.0 '@noble/secp256k1': 1.7.1 - '@scure/base': 1.1.8 + '@scure/base': 1.1.7 '@scure/bip32@1.4.0': dependencies: '@noble/curves': 1.4.0 '@noble/hashes': 1.4.0 - '@scure/base': 1.1.8 + '@scure/base': 1.1.7 '@scure/bip39@1.1.1': dependencies: '@noble/hashes': 1.2.0 - '@scure/base': 1.1.8 + '@scure/base': 1.1.7 '@scure/bip39@1.3.0': dependencies: '@noble/hashes': 1.4.0 - '@scure/base': 1.1.8 + '@scure/base': 1.1.7 '@scure/starknet@1.0.0': dependencies: @@ -4672,36 +4654,31 @@ snapshots: '@starknet-io/types-js@0.7.7': {} - '@starknet-react/chains@3.0.0-beta.2': {} + '@starknet-react/chains@0.1.7': {} - '@starknet-react/chains@3.0.0-beta.3': {} + '@starknet-react/chains@3.0.0-beta.2': {} - '@starknet-react/core@3.0.0-beta.2(get-starknet-core@4.0.0)(react@18.3.1)(starknet@6.11.0)(typescript@5.5.4)': + '@starknet-react/core@2.9.0(get-starknet-core@3.3.3(starknet@6.11.0))(react@18.3.1)(starknet@6.11.0)': dependencies: - '@starknet-io/types-js': 0.7.7 - '@starknet-react/chains': 3.0.0-beta.3 + '@starknet-react/chains': 0.1.7 '@tanstack/react-query': 5.51.24(react@18.3.1) eventemitter3: 5.0.1 - get-starknet-core: 4.0.0 + get-starknet-core: 3.3.3(starknet@6.11.0) + immutable: 4.3.7 react: 18.3.1 starknet: 6.11.0 - viem: 2.19.7(typescript@5.5.4)(zod@3.23.8) zod: 3.23.8 - transitivePeerDependencies: - - bufferutil - - typescript - - utf-8-validate - '@starknet-react/core@3.0.0-beta.3(get-starknet-core@4.0.0)(react@18.3.1)(starknet@6.11.0)(typescript@5.5.4)': + '@starknet-react/core@3.0.0-beta.2(get-starknet-core@3.3.3(starknet@6.11.0))(react@18.3.1)(starknet@6.11.0)(typescript@5.5.4)': dependencies: '@starknet-io/types-js': 0.7.7 - '@starknet-react/chains': 3.0.0-beta.3 - '@tanstack/react-query': 5.54.1(react@18.3.1) + '@starknet-react/chains': 3.0.0-beta.2 + '@tanstack/react-query': 5.51.24(react@18.3.1) eventemitter3: 5.0.1 - get-starknet-core: 4.0.0 + get-starknet-core: 3.3.3(starknet@6.11.0) react: 18.3.1 starknet: 6.11.0 - viem: 2.21.1(typescript@5.5.4)(zod@3.23.8) + viem: 2.19.7(typescript@5.5.4)(zod@3.23.8) zod: 3.23.8 transitivePeerDependencies: - bufferutil @@ -4717,18 +4694,11 @@ snapshots: '@tanstack/query-core@5.51.24': {} - '@tanstack/query-core@5.54.1': {} - '@tanstack/react-query@5.51.24(react@18.3.1)': dependencies: '@tanstack/query-core': 5.51.24 react: 18.3.1 - '@tanstack/react-query@5.54.1(react@18.3.1)': - dependencies: - '@tanstack/query-core': 5.54.1 - react: 18.3.1 - '@trpc/client@10.45.2(@trpc/server@10.45.2)': dependencies: '@trpc/server': 10.45.2 @@ -5609,8 +5579,8 @@ snapshots: '@typescript-eslint/parser': 7.2.0(eslint@8.57.0)(typescript@5.5.4) eslint: 8.57.0 eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(eslint@8.57.0))(eslint@8.57.0) - eslint-plugin-import: 2.29.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0) + eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1)(eslint@8.57.0) + eslint-plugin-import: 2.29.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0) eslint-plugin-jsx-a11y: 6.9.0(eslint@8.57.0) eslint-plugin-react: 7.35.0(eslint@8.57.0) eslint-plugin-react-hooks: 4.6.2(eslint@8.57.0) @@ -5632,13 +5602,13 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(eslint@8.57.0))(eslint@8.57.0): + eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1)(eslint@8.57.0): dependencies: debug: 4.3.6 enhanced-resolve: 5.17.1 eslint: 8.57.0 - eslint-module-utils: 2.8.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0) - eslint-plugin-import: 2.29.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0) + eslint-module-utils: 2.8.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1)(eslint@8.57.0))(eslint@8.57.0) + eslint-plugin-import: 2.29.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0) fast-glob: 3.3.2 get-tsconfig: 4.7.6 is-core-module: 2.15.0 @@ -5649,18 +5619,18 @@ snapshots: - eslint-import-resolver-webpack - supports-color - eslint-module-utils@2.8.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0): + eslint-module-utils@2.8.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1)(eslint@8.57.0))(eslint@8.57.0): dependencies: debug: 3.2.7 optionalDependencies: '@typescript-eslint/parser': 7.2.0(eslint@8.57.0)(typescript@5.5.4) eslint: 8.57.0 eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(eslint@8.57.0))(eslint@8.57.0) + eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1)(eslint@8.57.0) transitivePeerDependencies: - supports-color - eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0): + eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0): dependencies: array-includes: 3.1.8 array.prototype.findlastindex: 1.2.5 @@ -5670,7 +5640,7 @@ snapshots: doctrine: 2.1.0 eslint: 8.57.0 eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.8.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0) + eslint-module-utils: 2.8.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1)(eslint@8.57.0))(eslint@8.57.0) hasown: 2.0.2 is-core-module: 2.15.0 is-glob: 4.0.3 @@ -6079,6 +6049,8 @@ snapshots: ignore@5.3.2: {} + immutable@4.3.7: {} + import-fresh@3.3.0: dependencies: parent-module: 1.0.1 @@ -6976,7 +6948,7 @@ snapshots: starknet@5.25.0: dependencies: '@noble/curves': 1.3.0 - '@scure/base': 1.1.8 + '@scure/base': 1.1.7 '@scure/starknet': 1.0.0 isomorphic-fetch: 3.0.0 lossless-json: 2.0.11 @@ -7416,24 +7388,6 @@ snapshots: - utf-8-validate - zod - viem@2.21.1(typescript@5.5.4)(zod@3.23.8): - dependencies: - '@adraffy/ens-normalize': 1.10.0 - '@noble/curves': 1.4.0 - '@noble/hashes': 1.4.0 - '@scure/bip32': 1.4.0 - '@scure/bip39': 1.3.0 - abitype: 1.0.5(typescript@5.5.4)(zod@3.23.8) - isows: 1.0.4(ws@8.17.1) - webauthn-p256: 0.0.5 - ws: 8.17.1 - optionalDependencies: - typescript: 5.5.4 - transitivePeerDependencies: - - bufferutil - - utf-8-validate - - zod - webauthn-p256@0.0.5: dependencies: '@noble/curves': 1.4.0 diff --git a/src/app/page.tsx b/src/app/page.tsx index 008324f..01e9129 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -23,7 +23,7 @@ export default function Home() { setWalletNext(RESET) setConnectorData(RESET) setConnector(RESET) - }, [setConnector, setConnectorData, setWalletLatest, setWalletNext]) + }, []) return ( { const { account } = useAccount() @@ -21,50 +15,32 @@ const MintWithStarknetReact = () => { const buttonsDisabled = ["approve", "pending"].includes(transactionStatus) - // const mintCalls = useMemo(() => { - // if (!account) { - // return [] - // } - // return [ - // { - // contractAddress: ETHTokenAddress, - // entrypoint: "transfer", - // calldata: [ - // account?.address, - // Number(bigDecimal.parseEther(mintAmount).value), - // 0, - // ], - // }, - // ] - // }, [account, mintAmount]) - - const { contract } = useContract({ - address: ETHTokenAddress, - abi: Erc20Abi as Abi, - }) + const mintCalls = useMemo(() => { + if (!account) { + return [] + } + return [ + { + contractAddress: ETHTokenAddress, + entrypoint: "transfer", + calldata: [ + account?.address, + Number(bigDecimal.parseEther(mintAmount).value), + 0, + ], + }, + ] + }, [account, mintAmount]) - const { - sendAsync: mintWithStarknetReact, - error, - data, - } = useSendTransaction({ - calls: - contract && account?.address - ? [ - contract.populate("transfer", [ - account?.address, - Number(bigDecimal.parseEther(mintAmount).value), - ]), - ] - : undefined, + const { writeAsync: mintWithStarknetReact } = useContractWrite({ + calls: mintCalls, }) const handleMintSubmit = async (e: React.FormEvent) => { e.preventDefault() try { setTransactionStatus("approve") - await mintWithStarknetReact() - const transaction_hash = data?.transaction_hash ?? "" + const { transaction_hash } = await mintWithStarknetReact() setLastTransactionHash(transaction_hash) setTransactionStatus("pending") } catch (e) {