From c670c1f0d841b4a4e7ddf74d67e62c154d099d81 Mon Sep 17 00:00:00 2001 From: Rinat Date: Wed, 29 May 2024 10:57:37 +0200 Subject: [PATCH 01/10] fix: add decimals to native currency price (#854) --- packages/nextjs/components/Footer.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/nextjs/components/Footer.tsx b/packages/nextjs/components/Footer.tsx index 7aac13600..795854822 100644 --- a/packages/nextjs/components/Footer.tsx +++ b/packages/nextjs/components/Footer.tsx @@ -26,7 +26,7 @@ export const Footer = () => {
- {nativeCurrencyPrice} + {nativeCurrencyPrice.toFixed(2)}
)} From 5df118e637e6d33dc113756ab319052e606de604 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20S=C3=A1nchez?= Date: Fri, 31 May 2024 08:51:17 +0200 Subject: [PATCH 02/10] Add use effect on Balance component for the price (#856) --- packages/nextjs/components/scaffold-eth/Balance.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/nextjs/components/scaffold-eth/Balance.tsx b/packages/nextjs/components/scaffold-eth/Balance.tsx index c10c24f7e..b4473ebef 100644 --- a/packages/nextjs/components/scaffold-eth/Balance.tsx +++ b/packages/nextjs/components/scaffold-eth/Balance.tsx @@ -1,6 +1,6 @@ "use client"; -import { useState } from "react"; +import { useEffect, useState } from "react"; import { Address, formatEther } from "viem"; import { useTargetNetwork } from "~~/hooks/scaffold-eth/useTargetNetwork"; import { useWatchBalance } from "~~/hooks/scaffold-eth/useWatchBalance"; @@ -28,6 +28,10 @@ export const Balance = ({ address, className = "", usdMode }: BalanceProps) => { const [displayUsdMode, setDisplayUsdMode] = useState(price > 0 ? Boolean(usdMode) : false); + useEffect(() => { + setDisplayUsdMode(price > 0 ? Boolean(usdMode) : false); + }, [usdMode, price]); + const toggleBalanceMode = () => { if (price > 0) { setDisplayUsdMode(prevMode => !prevMode); From 4819cb2c62d304d54d32b9fb93d14bd1c28d5874 Mon Sep 17 00:00:00 2001 From: Rinat Date: Sun, 2 Jun 2024 08:57:20 +0200 Subject: [PATCH 03/10] feat: bump burner-connector version (#857) --- packages/nextjs/package.json | 2 +- yarn.lock | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/nextjs/package.json b/packages/nextjs/package.json index cea683083..abc0edc80 100644 --- a/packages/nextjs/package.json +++ b/packages/nextjs/package.json @@ -20,7 +20,7 @@ "@uniswap/sdk-core": "^4.0.1", "@uniswap/v2-sdk": "^3.0.1", "blo": "^1.0.1", - "burner-connector": "^0.0.7", + "burner-connector": "^0.0.8", "daisyui": "4.5.0", "next": "^14.0.4", "next-themes": "^0.2.1", diff --git a/yarn.lock b/yarn.lock index be8774163..90878553f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2133,7 +2133,7 @@ __metadata: abitype: ^1.0.2 autoprefixer: ^10.4.12 blo: ^1.0.1 - burner-connector: ^0.0.7 + burner-connector: ^0.0.8 daisyui: 4.5.0 eslint: ^8.15.0 eslint-config-next: ^14.0.4 @@ -4741,14 +4741,14 @@ __metadata: languageName: node linkType: hard -"burner-connector@npm:^0.0.7": - version: 0.0.7 - resolution: "burner-connector@npm:0.0.7" +"burner-connector@npm:^0.0.8": + version: 0.0.8 + resolution: "burner-connector@npm:0.0.8" dependencies: "@rainbow-me/rainbowkit": 2.1.0 "@wagmi/core": 2.10.2 viem: 2.10.9 - checksum: 11f77c8f565db1c4e8534a7772e8cd5f76273fc98c9c7bd711ae400e4b94271077a1cca8249ba55c3d325f7445b7da416f1bdd2ab73458ac826aa4a4c3b972aa + checksum: 3eed72fada75a302ca6966837e005692c708ad754772973c0c80def8f24b467dcd7acd5af0f66d370e3c86ada14791ab2a12b02f37e45c4acc6a64781309f050 languageName: node linkType: hard From 009a4c13b163eb738dd395044d38d646e251aac4 Mon Sep 17 00:00:00 2001 From: Pablo Alayeto <55535804+Pabl0cks@users.noreply.github.com> Date: Wed, 5 Jun 2024 16:42:30 +0200 Subject: [PATCH 04/10] Add funding.json file (#860) --- funding.json | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 funding.json diff --git a/funding.json b/funding.json new file mode 100644 index 000000000..78db9e972 --- /dev/null +++ b/funding.json @@ -0,0 +1,5 @@ +{ + "opRetro": { + "projectId": "0x79196c0af1a1f78fe5a009a4753c46d2271b17fc2836e1f6635822f8f4cb3b61" + } +} From fa16ebf3ee9507d92a39987df697077045baf897 Mon Sep 17 00:00:00 2001 From: Pablo Alayeto <55535804+Pabl0cks@users.noreply.github.com> Date: Wed, 5 Jun 2024 17:50:02 +0200 Subject: [PATCH 05/10] Delete funding.json (#861) --- funding.json | 5 ----- 1 file changed, 5 deletions(-) delete mode 100644 funding.json diff --git a/funding.json b/funding.json deleted file mode 100644 index 78db9e972..000000000 --- a/funding.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "opRetro": { - "projectId": "0x79196c0af1a1f78fe5a009a4753c46d2271b17fc2836e1f6635822f8f4cb3b61" - } -} From 18dd946e961ac7bdf2a47cea4c5b21872750c223 Mon Sep 17 00:00:00 2001 From: Rinat Date: Wed, 5 Jun 2024 17:55:41 +0200 Subject: [PATCH 06/10] feat: useDisplayUsdMode hook (#859) --- packages/nextjs/components/Footer.tsx | 2 +- .../ScaffoldEthAppWithProviders.tsx | 12 ++----- .../components/scaffold-eth/Balance.tsx | 24 +++++-------- .../scaffold-eth/Input/EtherInput.tsx | 33 +++++++----------- packages/nextjs/hooks/scaffold-eth/index.ts | 2 +- .../hooks/scaffold-eth/useDisplayUsdMode.ts | 21 ++++++++++++ .../useInitializeNativeCurrencyPrice.ts | 32 +++++++++++++++++ .../scaffold-eth/useNativeCurrencyPrice.ts | 34 ------------------- .../hooks/scaffold-eth/useTargetNetwork.ts | 17 ++++++---- packages/nextjs/services/store/store.ts | 16 +++++++-- 10 files changed, 101 insertions(+), 92 deletions(-) create mode 100644 packages/nextjs/hooks/scaffold-eth/useDisplayUsdMode.ts create mode 100644 packages/nextjs/hooks/scaffold-eth/useInitializeNativeCurrencyPrice.ts delete mode 100644 packages/nextjs/hooks/scaffold-eth/useNativeCurrencyPrice.ts diff --git a/packages/nextjs/components/Footer.tsx b/packages/nextjs/components/Footer.tsx index 795854822..92b3c62d3 100644 --- a/packages/nextjs/components/Footer.tsx +++ b/packages/nextjs/components/Footer.tsx @@ -13,7 +13,7 @@ import { useGlobalState } from "~~/services/store/store"; * Site footer */ export const Footer = () => { - const nativeCurrencyPrice = useGlobalState(state => state.nativeCurrencyPrice); + const nativeCurrencyPrice = useGlobalState(state => state.nativeCurrency.price); const { targetNetwork } = useTargetNetwork(); const isLocalNetwork = targetNetwork.id === hardhat.id; diff --git a/packages/nextjs/components/ScaffoldEthAppWithProviders.tsx b/packages/nextjs/components/ScaffoldEthAppWithProviders.tsx index 05273c2b7..f67c2f7b6 100644 --- a/packages/nextjs/components/ScaffoldEthAppWithProviders.tsx +++ b/packages/nextjs/components/ScaffoldEthAppWithProviders.tsx @@ -10,19 +10,11 @@ import { Footer } from "~~/components/Footer"; import { Header } from "~~/components/Header"; import { BlockieAvatar } from "~~/components/scaffold-eth"; import { ProgressBar } from "~~/components/scaffold-eth/ProgressBar"; -import { useNativeCurrencyPrice } from "~~/hooks/scaffold-eth"; -import { useGlobalState } from "~~/services/store/store"; +import { useInitializeNativeCurrencyPrice } from "~~/hooks/scaffold-eth"; import { wagmiConfig } from "~~/services/web3/wagmiConfig"; const ScaffoldEthApp = ({ children }: { children: React.ReactNode }) => { - const price = useNativeCurrencyPrice(); - const setNativeCurrencyPrice = useGlobalState(state => state.setNativeCurrencyPrice); - - useEffect(() => { - if (price > 0) { - setNativeCurrencyPrice(price); - } - }, [setNativeCurrencyPrice, price]); + useInitializeNativeCurrencyPrice(); return ( <> diff --git a/packages/nextjs/components/scaffold-eth/Balance.tsx b/packages/nextjs/components/scaffold-eth/Balance.tsx index b4473ebef..948fa0abd 100644 --- a/packages/nextjs/components/scaffold-eth/Balance.tsx +++ b/packages/nextjs/components/scaffold-eth/Balance.tsx @@ -1,7 +1,7 @@ "use client"; -import { useEffect, useState } from "react"; import { Address, formatEther } from "viem"; +import { useDisplayUsdMode } from "~~/hooks/scaffold-eth/useDisplayUsdMode"; import { useTargetNetwork } from "~~/hooks/scaffold-eth/useTargetNetwork"; import { useWatchBalance } from "~~/hooks/scaffold-eth/useWatchBalance"; import { useGlobalState } from "~~/services/store/store"; @@ -17,7 +17,9 @@ type BalanceProps = { */ export const Balance = ({ address, className = "", usdMode }: BalanceProps) => { const { targetNetwork } = useTargetNetwork(); - const price = useGlobalState(state => state.nativeCurrencyPrice); + const nativeCurrencyPrice = useGlobalState(state => state.nativeCurrency.price); + const isNativeCurrencyPriceFetching = useGlobalState(state => state.nativeCurrency.isFetching); + const { data: balance, isError, @@ -26,19 +28,9 @@ export const Balance = ({ address, className = "", usdMode }: BalanceProps) => { address, }); - const [displayUsdMode, setDisplayUsdMode] = useState(price > 0 ? Boolean(usdMode) : false); - - useEffect(() => { - setDisplayUsdMode(price > 0 ? Boolean(usdMode) : false); - }, [usdMode, price]); - - const toggleBalanceMode = () => { - if (price > 0) { - setDisplayUsdMode(prevMode => !prevMode); - } - }; + const { displayUsdMode, toggleDisplayUsdMode } = useDisplayUsdMode({ defaultUsdMode: usdMode }); - if (!address || isLoading || balance === null) { + if (!address || isLoading || balance === null || (isNativeCurrencyPriceFetching && nativeCurrencyPrice === 0)) { return (
@@ -62,13 +54,13 @@ export const Balance = ({ address, className = "", usdMode }: BalanceProps) => { return ( diff --git a/packages/nextjs/hooks/scaffold-eth/index.ts b/packages/nextjs/hooks/scaffold-eth/index.ts index 6f5c3b9a0..6effb7edd 100644 --- a/packages/nextjs/hooks/scaffold-eth/index.ts +++ b/packages/nextjs/hooks/scaffold-eth/index.ts @@ -3,7 +3,7 @@ export * from "./useBurnerWallet"; export * from "./useContractLogs"; export * from "./useDeployedContractInfo"; export * from "./useFetchBlocks"; -export * from "./useNativeCurrencyPrice"; +export * from "./useInitializeNativeCurrencyPrice"; export * from "./useNetworkColor"; export * from "./useOutsideClick"; export * from "./useScaffoldContract"; diff --git a/packages/nextjs/hooks/scaffold-eth/useDisplayUsdMode.ts b/packages/nextjs/hooks/scaffold-eth/useDisplayUsdMode.ts new file mode 100644 index 000000000..7d44cac60 --- /dev/null +++ b/packages/nextjs/hooks/scaffold-eth/useDisplayUsdMode.ts @@ -0,0 +1,21 @@ +import { useCallback, useEffect, useState } from "react"; +import { useGlobalState } from "~~/services/store/store"; + +export const useDisplayUsdMode = ({ defaultUsdMode = false }: { defaultUsdMode?: boolean }) => { + const nativeCurrencyPrice = useGlobalState(state => state.nativeCurrency.price); + const isPriceFetched = nativeCurrencyPrice > 0; + const predefinedUsdMode = isPriceFetched ? Boolean(defaultUsdMode) : false; + const [displayUsdMode, setDisplayUsdMode] = useState(predefinedUsdMode); + + useEffect(() => { + setDisplayUsdMode(predefinedUsdMode); + }, [predefinedUsdMode]); + + const toggleDisplayUsdMode = useCallback(() => { + if (isPriceFetched) { + setDisplayUsdMode(!displayUsdMode); + } + }, [displayUsdMode, isPriceFetched]); + + return { displayUsdMode, toggleDisplayUsdMode }; +}; diff --git a/packages/nextjs/hooks/scaffold-eth/useInitializeNativeCurrencyPrice.ts b/packages/nextjs/hooks/scaffold-eth/useInitializeNativeCurrencyPrice.ts new file mode 100644 index 000000000..0cab7200a --- /dev/null +++ b/packages/nextjs/hooks/scaffold-eth/useInitializeNativeCurrencyPrice.ts @@ -0,0 +1,32 @@ +import { useCallback, useEffect } from "react"; +import { useTargetNetwork } from "./useTargetNetwork"; +import { useInterval } from "usehooks-ts"; +import scaffoldConfig from "~~/scaffold.config"; +import { useGlobalState } from "~~/services/store/store"; +import { fetchPriceFromUniswap } from "~~/utils/scaffold-eth"; + +const enablePolling = false; + +/** + * Get the price of Native Currency based on Native Token/DAI trading pair from Uniswap SDK + */ +export const useInitializeNativeCurrencyPrice = () => { + const setNativeCurrencyPrice = useGlobalState(state => state.setNativeCurrencyPrice); + const setIsNativeCurrencyFetching = useGlobalState(state => state.setIsNativeCurrencyFetching); + const { targetNetwork } = useTargetNetwork(); + + const fetchPrice = useCallback(async () => { + setIsNativeCurrencyFetching(true); + const price = await fetchPriceFromUniswap(targetNetwork); + setNativeCurrencyPrice(price); + setIsNativeCurrencyFetching(false); + }, [setIsNativeCurrencyFetching, setNativeCurrencyPrice, targetNetwork]); + + // Get the price of ETH from Uniswap on mount + useEffect(() => { + fetchPrice(); + }, [fetchPrice]); + + // Get the price of ETH from Uniswap at a given interval + useInterval(fetchPrice, enablePolling ? scaffoldConfig.pollingInterval : null); +}; diff --git a/packages/nextjs/hooks/scaffold-eth/useNativeCurrencyPrice.ts b/packages/nextjs/hooks/scaffold-eth/useNativeCurrencyPrice.ts deleted file mode 100644 index edcb9dbf7..000000000 --- a/packages/nextjs/hooks/scaffold-eth/useNativeCurrencyPrice.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { useEffect, useState } from "react"; -import { useTargetNetwork } from "./useTargetNetwork"; -import { useInterval } from "usehooks-ts"; -import scaffoldConfig from "~~/scaffold.config"; -import { fetchPriceFromUniswap } from "~~/utils/scaffold-eth"; - -const enablePolling = false; - -/** - * Get the price of Native Currency based on Native Token/DAI trading pair from Uniswap SDK - */ -export const useNativeCurrencyPrice = () => { - const { targetNetwork } = useTargetNetwork(); - const [nativeCurrencyPrice, setNativeCurrencyPrice] = useState(0); - - // Get the price of ETH from Uniswap on mount - useEffect(() => { - (async () => { - const price = await fetchPriceFromUniswap(targetNetwork); - setNativeCurrencyPrice(price); - })(); - }, [targetNetwork]); - - // Get the price of ETH from Uniswap at a given interval - useInterval( - async () => { - const price = await fetchPriceFromUniswap(targetNetwork); - setNativeCurrencyPrice(price); - }, - enablePolling ? scaffoldConfig.pollingInterval : null, - ); - - return nativeCurrencyPrice; -}; diff --git a/packages/nextjs/hooks/scaffold-eth/useTargetNetwork.ts b/packages/nextjs/hooks/scaffold-eth/useTargetNetwork.ts index 97f15db99..ff0b23d5e 100644 --- a/packages/nextjs/hooks/scaffold-eth/useTargetNetwork.ts +++ b/packages/nextjs/hooks/scaffold-eth/useTargetNetwork.ts @@ -1,4 +1,4 @@ -import { useEffect } from "react"; +import { useEffect, useMemo } from "react"; import { useAccount } from "wagmi"; import scaffoldConfig from "~~/scaffold.config"; import { useGlobalState } from "~~/services/store/store"; @@ -20,10 +20,13 @@ export function useTargetNetwork(): { targetNetwork: ChainWithAttributes } { } }, [chain?.id, setTargetNetwork, targetNetwork.id]); - return { - targetNetwork: { - ...targetNetwork, - ...NETWORKS_EXTRA_DATA[targetNetwork.id], - }, - }; + return useMemo( + () => ({ + targetNetwork: { + ...targetNetwork, + ...NETWORKS_EXTRA_DATA[targetNetwork.id], + }, + }), + [targetNetwork], + ); } diff --git a/packages/nextjs/services/store/store.ts b/packages/nextjs/services/store/store.ts index da69755db..e033f1df3 100644 --- a/packages/nextjs/services/store/store.ts +++ b/packages/nextjs/services/store/store.ts @@ -12,15 +12,25 @@ import { ChainWithAttributes } from "~~/utils/scaffold-eth"; */ type GlobalState = { - nativeCurrencyPrice: number; + nativeCurrency: { + price: number; + isFetching: boolean; + }; setNativeCurrencyPrice: (newNativeCurrencyPriceState: number) => void; + setIsNativeCurrencyFetching: (newIsNativeCurrencyFetching: boolean) => void; targetNetwork: ChainWithAttributes; setTargetNetwork: (newTargetNetwork: ChainWithAttributes) => void; }; export const useGlobalState = create(set => ({ - nativeCurrencyPrice: 0, - setNativeCurrencyPrice: (newValue: number): void => set(() => ({ nativeCurrencyPrice: newValue })), + nativeCurrency: { + price: 0, + isFetching: true, + }, + setNativeCurrencyPrice: (newValue: number): void => + set(state => ({ nativeCurrency: { ...state.nativeCurrency, price: newValue } })), + setIsNativeCurrencyFetching: (newValue: boolean): void => + set(state => ({ nativeCurrency: { ...state.nativeCurrency, isFetching: newValue } })), targetNetwork: scaffoldConfig.targetNetworks[0], setTargetNetwork: (newTargetNetwork: ChainWithAttributes) => set(() => ({ targetNetwork: newTargetNetwork })), })); From 24255845611d12e36303a06cee772f226930a608 Mon Sep 17 00:00:00 2001 From: Shiv Bhonde Date: Wed, 5 Jun 2024 21:46:31 +0530 Subject: [PATCH 07/10] add changeset --- .changeset/giant-wolves-float.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 .changeset/giant-wolves-float.md diff --git a/.changeset/giant-wolves-float.md b/.changeset/giant-wolves-float.md new file mode 100644 index 000000000..d7329c50d --- /dev/null +++ b/.changeset/giant-wolves-float.md @@ -0,0 +1,13 @@ +--- +"create-eth": patch +--- + +fix: add use effect on Balance component for the price (#856) + +feat: bump burner-connector version (#857) + +Add funding.json file (#860) + +Delete funding.json (#861) + +feat: useDisplayUsdMode hook (#859) From 045144b1d4fca70434de32583ed4ee608f28bba0 Mon Sep 17 00:00:00 2001 From: Shiv Bhonde Date: Wed, 5 Jun 2024 21:47:27 +0530 Subject: [PATCH 08/10] update changeset --- .changeset/giant-wolves-float.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.changeset/giant-wolves-float.md b/.changeset/giant-wolves-float.md index d7329c50d..8e3954dba 100644 --- a/.changeset/giant-wolves-float.md +++ b/.changeset/giant-wolves-float.md @@ -6,8 +6,4 @@ fix: add use effect on Balance component for the price (#856) feat: bump burner-connector version (#857) -Add funding.json file (#860) - -Delete funding.json (#861) - feat: useDisplayUsdMode hook (#859) From ac604e244ce964319f277466d0a313b0bf335485 Mon Sep 17 00:00:00 2001 From: "Shiv Bhonde | shivbhonde.eth" Date: Mon, 10 Jun 2024 16:59:39 +0530 Subject: [PATCH 09/10] up wagmi viem rainbowkit (#862) --- packages/nextjs/package.json | 6 +-- yarn.lock | 100 ++++++++++++++++++++++++++++------- 2 files changed, 84 insertions(+), 22 deletions(-) diff --git a/packages/nextjs/package.json b/packages/nextjs/package.json index abc0edc80..49d6d18aa 100644 --- a/packages/nextjs/package.json +++ b/packages/nextjs/package.json @@ -15,7 +15,7 @@ }, "dependencies": { "@heroicons/react": "^2.0.11", - "@rainbow-me/rainbowkit": "2.1.0", + "@rainbow-me/rainbowkit": "2.1.2", "@tanstack/react-query": "^5.28.6", "@uniswap/sdk-core": "^4.0.1", "@uniswap/v2-sdk": "^3.0.1", @@ -32,8 +32,8 @@ "react-hot-toast": "^2.4.0", "use-debounce": "^8.0.4", "usehooks-ts": "^2.13.0", - "viem": "2.10.9", - "wagmi": "2.9.2", + "viem": "2.13.6", + "wagmi": "2.9.8", "zustand": "^4.1.2" }, "devDependencies": { diff --git a/yarn.lock b/yarn.lock index 90878553f..7fe422497 100644 --- a/yarn.lock +++ b/yarn.lock @@ -258,9 +258,9 @@ __metadata: languageName: node linkType: hard -"@coinbase/wallet-sdk@npm:4.0.0": - version: 4.0.0 - resolution: "@coinbase/wallet-sdk@npm:4.0.0" +"@coinbase/wallet-sdk@npm:4.0.2": + version: 4.0.2 + resolution: "@coinbase/wallet-sdk@npm:4.0.2" dependencies: buffer: ^6.0.3 clsx: ^1.2.1 @@ -268,7 +268,7 @@ __metadata: keccak: ^3.0.3 preact: ^10.16.0 sha.js: ^2.4.11 - checksum: f9101233cd4529daae235eb01fcd10fe3c9ab075b3171beacb755ff475be7a9e33957fb4ffedbdd34092c3045ddcbf6fda181a5adfd531307a4cc8937861ef38 + checksum: d0cb646ae8a57142f0abc9a46ae449c732aec6347fc217547854ebb872668716b9494c5232dc564eeab2e26c9b24df3cfd536b7ee3027a39d5e9e89a6d05ea9c languageName: node linkType: hard @@ -1964,6 +1964,27 @@ __metadata: languageName: node linkType: hard +"@rainbow-me/rainbowkit@npm:2.1.2": + version: 2.1.2 + resolution: "@rainbow-me/rainbowkit@npm:2.1.2" + dependencies: + "@vanilla-extract/css": 1.14.0 + "@vanilla-extract/dynamic": 2.1.0 + "@vanilla-extract/sprinkles": 1.6.1 + clsx: 2.1.0 + qrcode: 1.5.3 + react-remove-scroll: 2.5.7 + ua-parser-js: ^1.0.37 + peerDependencies: + "@tanstack/react-query": ">=5.0.0" + react: ">=18" + react-dom: ">=18" + viem: 2.x + wagmi: ^2.9.0 + checksum: 8d127509b376715c3e22030a4df74ef061d3da86bfa481bae3ea035192fa324fb82179da284f4bdf98feb1b2672157ca9440ed0c51d9280d9da694b9e6ba6250 + languageName: node + linkType: hard + "@rollup/pluginutils@npm:^4.0.0": version: 4.2.1 resolution: "@rollup/pluginutils@npm:4.2.1" @@ -2120,7 +2141,7 @@ __metadata: resolution: "@se-2/nextjs@workspace:packages/nextjs" dependencies: "@heroicons/react": ^2.0.11 - "@rainbow-me/rainbowkit": 2.1.0 + "@rainbow-me/rainbowkit": 2.1.2 "@tanstack/react-query": ^5.28.6 "@trivago/prettier-plugin-sort-imports": ^4.1.1 "@types/node": ^17.0.35 @@ -2155,8 +2176,8 @@ __metadata: use-debounce: ^8.0.4 usehooks-ts: ^2.13.0 vercel: ^32.4.1 - viem: 2.10.9 - wagmi: 2.9.2 + viem: 2.13.6 + wagmi: 2.9.8 zustand: ^4.1.2 languageName: unknown linkType: soft @@ -3394,11 +3415,11 @@ __metadata: languageName: node linkType: hard -"@wagmi/connectors@npm:5.0.2": - version: 5.0.2 - resolution: "@wagmi/connectors@npm:5.0.2" +"@wagmi/connectors@npm:5.0.7": + version: 5.0.7 + resolution: "@wagmi/connectors@npm:5.0.7" dependencies: - "@coinbase/wallet-sdk": 4.0.0 + "@coinbase/wallet-sdk": 4.0.2 "@metamask/sdk": 0.20.3 "@safe-global/safe-apps-provider": 0.18.1 "@safe-global/safe-apps-sdk": 8.1.0 @@ -3406,13 +3427,13 @@ __metadata: "@walletconnect/modal": 2.6.2 cbw-sdk: "npm:@coinbase/wallet-sdk@3.9.3" peerDependencies: - "@wagmi/core": 2.10.2 + "@wagmi/core": 2.10.5 typescript: ">=5.0.4" viem: 2.x peerDependenciesMeta: typescript: optional: true - checksum: 2c03cc7b3db25da9631afecfb5b40817d6205bd67e0e306a235bc07742f2cee7b120141197d6f165446e84f5c618a9f556d4bb5fa0e1392368f9ee6e7b950d50 + checksum: 7eb0c2f2bb47801d8276a16642fbdebbfb6cafd2b8e5ef90d9b2b191cdbc7ba34667010faf26c75351a6d9c49c3325a7a9635f990cd615c613286c92dada90f8 languageName: node linkType: hard @@ -3436,6 +3457,26 @@ __metadata: languageName: node linkType: hard +"@wagmi/core@npm:2.10.5": + version: 2.10.5 + resolution: "@wagmi/core@npm:2.10.5" + dependencies: + eventemitter3: 5.0.1 + mipd: 0.0.5 + zustand: 4.4.1 + peerDependencies: + "@tanstack/query-core": ">=5.0.0" + typescript: ">=5.0.4" + viem: 2.x + peerDependenciesMeta: + "@tanstack/query-core": + optional: true + typescript: + optional: true + checksum: 411a18c042799cc9be7661d30a8c8da9bb12edc68141c3ec315ffd0b981dc5c490a45a8ce297847c1adb5be2acb290cb49bdc7faa1dcc09a882ced0be557c481 + languageName: node + linkType: hard + "@walletconnect/core@npm:2.13.0": version: 2.13.0 resolution: "@walletconnect/core@npm:2.13.0" @@ -14390,6 +14431,27 @@ __metadata: languageName: node linkType: hard +"viem@npm:2.13.6": + version: 2.13.6 + resolution: "viem@npm:2.13.6" + dependencies: + "@adraffy/ens-normalize": 1.10.0 + "@noble/curves": 1.2.0 + "@noble/hashes": 1.3.2 + "@scure/bip32": 1.3.2 + "@scure/bip39": 1.2.1 + abitype: 1.0.0 + isows: 1.0.4 + ws: 8.13.0 + peerDependencies: + typescript: ">=5.0.4" + peerDependenciesMeta: + typescript: + optional: true + checksum: e6dae3cb8e90922d2deac6c6d5922c63908eb545820fcbd21572591d05d5a69b9434b4dad859461d20bf23faa3cde9b10f5f879de5db6858735c4b848bccb584 + languageName: node + linkType: hard + "viem@npm:^1.0.0": version: 1.12.2 resolution: "viem@npm:1.12.2" @@ -14433,12 +14495,12 @@ __metadata: languageName: node linkType: hard -"wagmi@npm:2.9.2": - version: 2.9.2 - resolution: "wagmi@npm:2.9.2" +"wagmi@npm:2.9.8": + version: 2.9.8 + resolution: "wagmi@npm:2.9.8" dependencies: - "@wagmi/connectors": 5.0.2 - "@wagmi/core": 2.10.2 + "@wagmi/connectors": 5.0.7 + "@wagmi/core": 2.10.5 use-sync-external-store: 1.2.0 peerDependencies: "@tanstack/react-query": ">=5.0.0" @@ -14448,7 +14510,7 @@ __metadata: peerDependenciesMeta: typescript: optional: true - checksum: 202a5b1c2e78c698f3b23817415ca5e588632c82182f7f7d33175c1cdcebe497aa8c41a83f021d7d6c9ed091c611cc252a7b5146b6ceb1be60153d744cc23b4e + checksum: 2e6e0645579dcde14829005ddbf70f88e7c67616d0bc1a39fd8de9fc5fc4ead3126c57686773b758170d751201468c4cde4c3d3128f1fdd1b731e1940d8eb371 languageName: node linkType: hard From aa4ff65508d9e8f51e99fbb154ec15bead6d16ca Mon Sep 17 00:00:00 2001 From: Shiv Bhonde Date: Mon, 10 Jun 2024 17:19:51 +0530 Subject: [PATCH 10/10] update changeset --- .changeset/giant-wolves-float.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.changeset/giant-wolves-float.md b/.changeset/giant-wolves-float.md index 8e3954dba..001742730 100644 --- a/.changeset/giant-wolves-float.md +++ b/.changeset/giant-wolves-float.md @@ -2,8 +2,12 @@ "create-eth": patch --- +fix: add decimals to native currency price (#854) + fix: add use effect on Balance component for the price (#856) feat: bump burner-connector version (#857) feat: useDisplayUsdMode hook (#859) + +feat: up wagmi viem rainbowkit (scaffold-eth#862)