From 8be5135882f128e18b1aae49928cb4392cdcf2c0 Mon Sep 17 00:00:00 2001 From: subject026 Date: Sun, 1 Sep 2024 13:41:34 +0100 Subject: [PATCH 1/3] Revert "add bake sound" This reverts commit 3410b8916bda1f22ca0da8df019d860c4f88d01e. --- public/cookies.mp3 | Bin 14112 -> 0 bytes .../TransactionsReducer.ts | 2 +- .../TransactionsWatcher.tsx | 3 - src/app/core/hooks/useAudio/audioContext.ts | 20 ------- src/app/core/hooks/useAudio/useAudio.ts | 55 ------------------ 5 files changed, 1 insertion(+), 79 deletions(-) delete mode 100644 public/cookies.mp3 delete mode 100644 src/app/core/hooks/useAudio/audioContext.ts delete mode 100644 src/app/core/hooks/useAudio/useAudio.ts diff --git a/public/cookies.mp3 b/public/cookies.mp3 deleted file mode 100644 index ed184abfccaae8f3faec385d535a0d45c637f898..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 14112 zcmd_Rgi)^AMv9K0*TUt&~XR|NXQ>P zq-9`WX6NGK6BHDYkd~HHeEe7)41S_(U|?cyZecQjEske z3NqQY5_j2XcM|FzMt6>IEW|GU#gF!l@GL|N`R;RNabj=@V~`JlR?R$N4D*T>X#GRf zEnv{1-|6@0{24 z)^Q_N|A}W12z2B2akwp(Ize z=SgE5W}njAlgJ9r`Df{J1*mp67hHJ+yNcILP@hqLt*xz}8C>Ik#ny3_UiZt9q|w)fl1k{@L>B@HOmcsFMW9E2b01Q%1OdUHY#s{jBv zFadz;%POB=&hj%xbssx>3jjDA8f9WgSoOHh{o9s)eRYZm;ZEGVv+vIi+Mn>|b@Q17|p z(H|_H9r{KB_4LEaF z%^%h(APq{}rRIxL#Mv^FKz;n@8m^s6v&z*zSjUfAyF5C?+$XPmvd8cvs%(WzZ71=k zy@7P-l&WsFUhPOPr%VI8VZx#Sq&do1O}Rv4wt9AqRPJMc@n@(fD}eBmW70!x2VQBF z)BAcv3>w63>KrPeaAL1U$zX5grat?;?YV~p)+30@mnXhreFKyHZI}YkExS?j*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+#hxRC>Txq|e^l^=8B7N9>C`T)Sm&Dj@_hf#pEPW($Ti zv0(<6i<#X?8AW4B*e;{C-$nWJ)Yt>-zV#?UShlR;bM%}Yc%7uhf=B;7VGT(bWT6~oJxLxO96Z!7#coqTwg56 z@#w_cY1#5Lg9$Yn#*F#e4tLU+8a6@Uo2vYvD6QMG^gds6WPOPK);j9n{qbHN9~$xu z{r(Mq^J7lWxeT1_I_3~4AvRxTeMKX&rQ33GQh>0aiJi^OfnZK98ROTXt=PMW$mApm zyYlTU<7qNKQmwHz`*K^xJ=Ol)#^D4=g-o-cpi%-a)1Yw_JKSEwL0MI+9%HNx-7WmE zNJxUBwWQd;aLU*6w~fVZm5K^!< zXv5y|)cv;AFLS!3#x$hZD$VC6b&DoFLgU-ymJLRVy36Cd;!l*(rWHgdH@x2m9(mG@(mRZ*>)N-fltYiS-_QRN+!}r^IxOAujI`cJdoRr(MhaW`b-)kOg6FqwBw${dXMNp}O*zx+3ZkPKb( zqXT%0O3H0#p;cY!DX*9$5lyd>q89^2h&VqtoUI#+5TZKX{Jd!4gjReXXNEW z)84_Sguk{T4N$})Jkd0a=8FxI0bkvt$aF4DB}~Uj#5(LY;0-ZD0>t+D;7d7qCabQ& zPUJT+i1T-COG$16tR~n;Qahb{54L+Lybf5Q{B!`~2z=CEkhs_FF*QV+W#<;XcOZ-} zC&-_EUZ5v=|26=0kd%Slsi34mYw8JaKUQ4@l{pIEe@|zbQU8}P@2DO9y+0rYfk0`2 z^>EF-1CHzfs9?vRk0KuDm=mRW+hgKFDvhrf(@m*kUKq7pP`F%SP<@yRYZCFPUhQiV nhW&zP5={R4`c?V={|?}U#O?+JLMjA(1tAVZJUc-kL>T@b5ii8V diff --git a/src/app/core/context/TransactionsContext/TransactionsReducer.ts b/src/app/core/context/TransactionsContext/TransactionsReducer.ts index f74d731..a93860c 100644 --- a/src/app/core/context/TransactionsContext/TransactionsReducer.ts +++ b/src/app/core/context/TransactionsContext/TransactionsReducer.ts @@ -87,8 +87,8 @@ export function TransactionsReducer( switch (action.type) { case "NEW": { return { + ...state, new: action.payload.data, - submitted: [...state.submitted], }; } case "SET_SUBMITTED": { diff --git a/src/app/core/context/TransactionsContext/TransactionsWatcher.tsx b/src/app/core/context/TransactionsContext/TransactionsWatcher.tsx index d6bcd2a..aa52c73 100644 --- a/src/app/core/context/TransactionsContext/TransactionsWatcher.tsx +++ b/src/app/core/context/TransactionsContext/TransactionsWatcher.tsx @@ -5,7 +5,6 @@ import { } from "./TransactionsReducer"; import { useWaitForTransaction } from "wagmi"; import { useToast } from "../ToastContext/ToastContext"; -import { useAudio } from "../../hooks/useAudio/useAudio"; export function TransactionWatcher({ transaction, @@ -16,7 +15,6 @@ export function TransactionWatcher({ }) { const { status, hash } = transaction; const { toastDispatch } = useToast(); - const { playSound } = useAudio({ src: "/cookies.mp3" }); const { data: waitData } = useWaitForTransaction({ hash }); @@ -32,7 +30,6 @@ export function TransactionWatcher({ if (status !== "SUBMITTED") return; if (waitData.status === "success") { transactionsDispatch({ type: "SET_SUCCESS", payload: { hash } }); - if (transaction.data.type === "BAKE") playSound(); toastDispatch({ type: "NEW", payload: { toastType: "CONFIRMED", txHash: hash }, diff --git a/src/app/core/hooks/useAudio/audioContext.ts b/src/app/core/hooks/useAudio/audioContext.ts deleted file mode 100644 index 78efa5d..0000000 --- a/src/app/core/hooks/useAudio/audioContext.ts +++ /dev/null @@ -1,20 +0,0 @@ -let audioContext: AudioContext | undefined; - -export function getAudioContext() { - if (!audioContext) { - audioContext = new AudioContext(); - } - return audioContext; -} - -export function resumeAudioContext() { - if (audioContext && audioContext.state === "suspended") { - return audioContext.resume(); - } -} - -export function suspendAudioContext() { - if (audioContext && audioContext.state === "running") { - return audioContext.suspend(); - } -} diff --git a/src/app/core/hooks/useAudio/useAudio.ts b/src/app/core/hooks/useAudio/useAudio.ts deleted file mode 100644 index 48aace3..0000000 --- a/src/app/core/hooks/useAudio/useAudio.ts +++ /dev/null @@ -1,55 +0,0 @@ -import { useEffect, useState } from "react"; -import { getAudioContext } from "./audioContext"; - -export function useAudio({ src }: { src: string }) { - const [audioBuffer, setAudioBuffer] = useState(null); - - useEffect(() => { - async function fetchAudio() { - const audioContext = getAudioContext(); - if (!audioContext) return; - const arrayBuffer = await fetch(src).then((res) => res.arrayBuffer()); - audioContext - .decodeAudioData(arrayBuffer) - .then((audioBuffer) => { - setAudioBuffer(audioBuffer); - }) - .catch((err): void => { - console.log({ err }); - }); - } - fetchAudio(); - }, [src]); - - async function playSound() { - if (!audioBuffer) return; - const audioContext = getAudioContext(); - const src = audioContext.createBufferSource(); - const gain = audioContext.createGain(); - const now = audioContext.currentTime; - if (audioContext.state === "suspended") { - await audioContext.resume(); - } - src.buffer = audioBuffer; - src.loop = false; - src.connect(gain); - gain.connect(audioContext.destination); - src.start(now); - gain.gain.setValueAtTime(1, now); - gain.gain.setValueAtTime(1, now + 0.4); - gain.gain.linearRampToValueAtTime(0, now + 1.2); - - // console.log("playing sound"); - // console.log("playing sound", audioContext.state); - // if (audioContext.state === "suspended") { - // await audioContext.resume(); - // console.log("ctx state after:", audioContext.state); - // source.onended = () => initSource(audioBuffer); - // return; - // } - // source.start(); - // source.onended = () => initSource(audioBuffer); - } - - return { playSound }; -} From dbfeba349f79441fddad2ea6bd3f985f870b1a46 Mon Sep 17 00:00:00 2001 From: subject026 Date: Sun, 1 Sep 2024 13:42:43 +0100 Subject: [PATCH 2/3] Revert "Revert "add bake sound"" This reverts commit 8be5135882f128e18b1aae49928cb4392cdcf2c0. --- public/cookies.mp3 | Bin 0 -> 14112 bytes .../TransactionsReducer.ts | 2 +- .../TransactionsWatcher.tsx | 3 + src/app/core/hooks/useAudio/audioContext.ts | 20 +++++++ src/app/core/hooks/useAudio/useAudio.ts | 55 ++++++++++++++++++ 5 files changed, 79 insertions(+), 1 deletion(-) create mode 100644 public/cookies.mp3 create mode 100644 src/app/core/hooks/useAudio/audioContext.ts create mode 100644 src/app/core/hooks/useAudio/useAudio.ts diff --git a/public/cookies.mp3 b/public/cookies.mp3 new file mode 100644 index 0000000000000000000000000000000000000000..ed184abfccaae8f3faec385d535a0d45c637f898 GIT binary patch literal 14112 zcmd_Rgi)^AMv9K0*TUt&~XR|NXQ>P zq-9`WX6NGK6BHDYkd~HHeEe7)41S_(U|?cyZecQjEske z3NqQY5_j2XcM|FzMt6>IEW|GU#gF!l@GL|N`R;RNabj=@V~`JlR?R$N4D*T>X#GRf zEnv{1-|6@0{24 z)^Q_N|A}W12z2B2akwp(Ize z=SgE5W}njAlgJ9r`Df{J1*mp67hHJ+yNcILP@hqLt*xz}8C>Ik#ny3_UiZt9q|w)fl1k{@L>B@HOmcsFMW9E2b01Q%1OdUHY#s{jBv zFadz;%POB=&hj%xbssx>3jjDA8f9WgSoOHh{o9s)eRYZm;ZEGVv+vIi+Mn>|b@Q17|p z(H|_H9r{KB_4LEaF z%^%h(APq{}rRIxL#Mv^FKz;n@8m^s6v&z*zSjUfAyF5C?+$XPmvd8cvs%(WzZ71=k zy@7P-l&WsFUhPOPr%VI8VZx#Sq&do1O}Rv4wt9AqRPJMc@n@(fD}eBmW70!x2VQBF z)BAcv3>w63>KrPeaAL1U$zX5grat?;?YV~p)+30@mnXhreFKyHZI}YkExS?j*gCk< z_EF|Tsthvb!zSQLFTq#BIk2#q>8;W@axh0`AaK{LyX${7Kav`mK9V&XN5$iSGnw9S zn(nQ)`kbHiqBN$?N73K$t#`oT74ET}*D4xSMlUk09d$)oqj)YW+*y#5s2XLs%&NZK z}wYk~Uplw!G&*AU(t|mE|uR4*D;@+rGPx%ZnfTVxva5@xd&p z_8oLMbB%-y1V2lA$VG3g^>pkKe8u#-WR0vFT8HteJRc;R@pW~)wUCkA*!DT3sdND@ zgYdgnc<-|Ss5kn|lqqjj?GSA(F{S6XW^l^vB7J$vO~okp42O3T9c$xq|J$r7`c9Uy zB?im-F=L@<{Zh#nrpLM9?VV{e=?MCuX#bCg!&S~@Xf@k$cPO^wZcb=$Gx%tZvdTUG zHt{I7b(}Qr?BDqJ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LRVy36Cd;!l*(rWHgdH@x2m9(mG@(mRZ*>)N-fltYiS-_QRN+!}r^IxOAujI`cJdoRr(MhaW`b-)kOg6FqwBw${dXMNp}O*zx+3ZkPKb( zqXT%0O3H0#p;cY!DX*9$5lyd>q89^2h&VqtoUI#+5TZKX{Jd!4gjReXXNEW z)84_Sguk{T4N$})Jkd0a=8FxI0bkvt$aF4DB}~Uj#5(LY;0-ZD0>t+D;7d7qCabQ& zPUJT+i1T-COG$16tR~n;Qahb{54L+Lybf5Q{B!`~2z=CEkhs_FF*QV+W#<;XcOZ-} zC&-_EUZ5v=|26=0kd%Slsi34mYw8JaKUQ4@l{pIEe@|zbQU8}P@2DO9y+0rYfk0`2 z^>EF-1CHzfs9?vRk0KuDm=mRW+hgKFDvhrf(@m*kUKq7pP`F%SP<@yRYZCFPUhQiV nhW&zP5={R4`c?V={|?}U#O?+JLMjA(1tAVZJUc-kL>T@b5ii8V literal 0 HcmV?d00001 diff --git a/src/app/core/context/TransactionsContext/TransactionsReducer.ts b/src/app/core/context/TransactionsContext/TransactionsReducer.ts index a93860c..f74d731 100644 --- a/src/app/core/context/TransactionsContext/TransactionsReducer.ts +++ b/src/app/core/context/TransactionsContext/TransactionsReducer.ts @@ -87,8 +87,8 @@ export function TransactionsReducer( switch (action.type) { case "NEW": { return { - ...state, new: action.payload.data, + submitted: [...state.submitted], }; } case "SET_SUBMITTED": { diff --git a/src/app/core/context/TransactionsContext/TransactionsWatcher.tsx b/src/app/core/context/TransactionsContext/TransactionsWatcher.tsx index aa52c73..d6bcd2a 100644 --- a/src/app/core/context/TransactionsContext/TransactionsWatcher.tsx +++ b/src/app/core/context/TransactionsContext/TransactionsWatcher.tsx @@ -5,6 +5,7 @@ import { } from "./TransactionsReducer"; import { useWaitForTransaction } from "wagmi"; import { useToast } from "../ToastContext/ToastContext"; +import { useAudio } from "../../hooks/useAudio/useAudio"; export function TransactionWatcher({ transaction, @@ -15,6 +16,7 @@ export function TransactionWatcher({ }) { const { status, hash } = transaction; const { toastDispatch } = useToast(); + const { playSound } = useAudio({ src: "/cookies.mp3" }); const { data: waitData } = useWaitForTransaction({ hash }); @@ -30,6 +32,7 @@ export function TransactionWatcher({ if (status !== "SUBMITTED") return; if (waitData.status === "success") { transactionsDispatch({ type: "SET_SUCCESS", payload: { hash } }); + if (transaction.data.type === "BAKE") playSound(); toastDispatch({ type: "NEW", payload: { toastType: "CONFIRMED", txHash: hash }, diff --git a/src/app/core/hooks/useAudio/audioContext.ts b/src/app/core/hooks/useAudio/audioContext.ts new file mode 100644 index 0000000..78efa5d --- /dev/null +++ b/src/app/core/hooks/useAudio/audioContext.ts @@ -0,0 +1,20 @@ +let audioContext: AudioContext | undefined; + +export function getAudioContext() { + if (!audioContext) { + audioContext = new AudioContext(); + } + return audioContext; +} + +export function resumeAudioContext() { + if (audioContext && audioContext.state === "suspended") { + return audioContext.resume(); + } +} + +export function suspendAudioContext() { + if (audioContext && audioContext.state === "running") { + return audioContext.suspend(); + } +} diff --git a/src/app/core/hooks/useAudio/useAudio.ts b/src/app/core/hooks/useAudio/useAudio.ts new file mode 100644 index 0000000..48aace3 --- /dev/null +++ b/src/app/core/hooks/useAudio/useAudio.ts @@ -0,0 +1,55 @@ +import { useEffect, useState } from "react"; +import { getAudioContext } from "./audioContext"; + +export function useAudio({ src }: { src: string }) { + const [audioBuffer, setAudioBuffer] = useState(null); + + useEffect(() => { + async function fetchAudio() { + const audioContext = getAudioContext(); + if (!audioContext) return; + const arrayBuffer = await fetch(src).then((res) => res.arrayBuffer()); + audioContext + .decodeAudioData(arrayBuffer) + .then((audioBuffer) => { + setAudioBuffer(audioBuffer); + }) + .catch((err): void => { + console.log({ err }); + }); + } + fetchAudio(); + }, [src]); + + async function playSound() { + if (!audioBuffer) return; + const audioContext = getAudioContext(); + const src = audioContext.createBufferSource(); + const gain = audioContext.createGain(); + const now = audioContext.currentTime; + if (audioContext.state === "suspended") { + await audioContext.resume(); + } + src.buffer = audioBuffer; + src.loop = false; + src.connect(gain); + gain.connect(audioContext.destination); + src.start(now); + gain.gain.setValueAtTime(1, now); + gain.gain.setValueAtTime(1, now + 0.4); + gain.gain.linearRampToValueAtTime(0, now + 1.2); + + // console.log("playing sound"); + // console.log("playing sound", audioContext.state); + // if (audioContext.state === "suspended") { + // await audioContext.resume(); + // console.log("ctx state after:", audioContext.state); + // source.onended = () => initSource(audioBuffer); + // return; + // } + // source.start(); + // source.onended = () => initSource(audioBuffer); + } + + return { playSound }; +} From 83ba1bfff4e648f8f86c5474b53ffb53e02d87d7 Mon Sep 17 00:00:00 2001 From: subject026 Date: Sun, 1 Sep 2024 13:43:41 +0100 Subject: [PATCH 3/3] Revert "add cw metadata and project order" This reverts commit 93ecbf374dba56aec982526ddd49d619ec291268. --- public/project/citizen_wallet.png | Bin 3412 -> 0 bytes src/app/governance/GovernancePage.tsx | 64 ++---------------- .../components/DistributionOverview.tsx | 1 + .../governance/components/ResultsPanel.tsx | 30 ++++---- src/app/governance/useCycleDates.ts | 9 +-- src/app/projectsMeta.ts | 22 +----- 6 files changed, 27 insertions(+), 99 deletions(-) delete mode 100644 public/project/citizen_wallet.png diff --git a/public/project/citizen_wallet.png b/public/project/citizen_wallet.png deleted file mode 100644 index 87a002f325be83ac66aa375de017606f6baacafc..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3412 zcmV-a4Xg5rP)i6%e?ra_@ZK&%FeMcsHA#d3}!OzvrBL?s?Dm{onc{fsrwG>{u!7 z+)PYN+-TodrBb;`BoaR6*yK_g41E-W(hp(6((`bne`_(RcFl@{pgO4~0U3t5>fgD=UllOjbr)+@V8VLMAnQ_;3suFhCH}2Tb<-`SUn+>J*ce(;*p2b}dO(4n3h4K@Bk?ve3uJM>=}+ zXuU~22`u4#`}PU4gdidssSi<|2@<)nL@t7fO`JH<=){_$0Z}=9T&t_g@pzFSK!}vcXtQ7oom;wjqTa9XWWe&H?)#uvtV+*zP?!} zPo7l$-oVeq&&JQ#5(m?k$g$*TzBvvXHV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Ub-V( z$GMZ2MQX$)i%>H%@G0U-OpL1N6!L0tpWoB+5asf>B*k@1@a-GJ9q9>83#($ zvqpG$IQzZO=D0LlaHMu{az;jmHx2DcU11oWjnp*YWhEpvUfB1p)-7zlkVqcmr5fDm zH%8s`S%57j85Yf&nH*ie|Np&=gu&K`muT=(4f-fGTwRR=R?7yGlecv3Q;Yr@lB}-W zBBrrk*3}qbYe`uTM_y?}ZlpF#xpZ2LM`k|A&dx4i-MV$qw^*z%IDy^1eLHeJF7y)5eWdeS3{eDkUXFv!q#MIQkOPz-V4rt-5d1 z&`Yx@o!fHUxnk)yw&+A;dIzCSeA5jn#iv;7Je5#>o-Q q|5-sXSM_L|&IKacrx}A(L;M#DJQ(g8L(G2w0000; - -type Prettify = { - [K in keyof T]: T[K]; -} & {}; - -export type CurrentProjectsLoading = { status: "LOADING"; data: null }; -export type CurrentProjectsSuccess = { - status: "SUCCESS"; - data: ProjectWithMeta[]; -}; -export type CurrentProjectsError = { status: "ERROR"; data: null }; -export type CurrentProjectsState = - | CurrentProjectsLoading - | CurrentProjectsSuccess - | CurrentProjectsError; - export function GovernancePage() { const { user, isSafe } = useConnectedUser(); const { currentVotingDistribution } = useCurrentVotingDistribution(); @@ -81,38 +61,6 @@ export function GovernancePage() { } }, [currentVotingDistribution, projects]); - const currentProjects = useMemo(() => { - if (currentVotingDistribution.status === "LOADING") - return { status: "LOADING", data: null }; - - if (currentVotingDistribution.status === "ERROR") - return { status: "ERROR", data: null }; - let data; - try { - data = currentVotingDistribution.data[0] - .map((account, i): ProjectWithMeta => { - if (!projectsMeta[account]) - throw new Error("no metadata found for project!"); - return { - account, - ...projectsMeta[account], - currentDistribution: currentVotingDistribution.data[1][i], - }; - }) - .sort((a, b) => a.order - b.order); - } catch (err) { - console.log(err); - return { - status: "ERROR", - data: null, - }; - } - return { - status: "SUCCESS", - data, - }; - }, [currentVotingDistribution]); - function updateValue(value: number, address: Hex) { const updatedProjects = projects.map((project) => { if (project.address === address) { @@ -158,7 +106,7 @@ export function GovernancePage() { : false; if ( - currentProjects.status === "ERROR" || + currentVotingDistribution.status === "ERROR" || cycleDates.status === "ERROR" || cycleLength.status === "ERROR" ) @@ -169,7 +117,7 @@ export function GovernancePage() { ); if ( - currentProjects.status === "LOADING" || + !projects.length || currentVotingDistribution.status === "LOADING" || cycleDates.status === "LOADING" || cycleLength.status === "LOADING" @@ -203,7 +151,7 @@ export function GovernancePage() { />
- +
@@ -221,9 +169,9 @@ export function GovernancePage() { />
- {currentProjects.data.map((project, i) => { + {currentVotingDistribution.data[0].map((address, i) => { return ( - + {!isRecasting && castVote && castVote.length > 0 ? ( { if (cycleDates.status === "SUCCESS" && claimableYield && yieldPerHour) { const difference = differenceInHours(cycleDates.end, new Date()); + console.log({ yieldPerHour }); return difference * yieldPerHour + claimableYield; } }, [yieldPerHour, claimableYield, cycleDates]); diff --git a/src/app/governance/components/ResultsPanel.tsx b/src/app/governance/components/ResultsPanel.tsx index 3bb5b0e..2778495 100644 --- a/src/app/governance/components/ResultsPanel.tsx +++ b/src/app/governance/components/ResultsPanel.tsx @@ -4,17 +4,16 @@ import { projectsMeta } from "@/app/projectsMeta"; import { formatVotePercentage } from "@/app/core/util/formatter"; import { CurrentVotingDistributionState } from "../useCurrentVotingDistribution"; import { CardBox } from "@/app/core/components/CardBox"; -import { CurrentProjectsSuccess } from "../GovernancePage"; export function ResultsPanel({ - projects, + distribution, }: { - projects: CurrentProjectsSuccess; + distribution: CurrentVotingDistributionState; }) { - const totalPoints = projects.data.reduce( - (acc, points) => acc + points.currentDistribution, - 0 - ); + const totalPoints = + distribution.status === "SUCCESS" + ? distribution.data[1].reduce((acc, points) => acc + points, 0) + : 0; return (
@@ -25,14 +24,15 @@ export function ResultsPanel({ results
- {projects.data.map((project, i) => ( - - ))} + {distribution.status === "SUCCESS" && + distribution.data[0].map((account, i) => ( + + ))}
diff --git a/src/app/governance/useCycleDates.ts b/src/app/governance/useCycleDates.ts index 82634cb..b0092c7 100644 --- a/src/app/governance/useCycleDates.ts +++ b/src/app/governance/useCycleDates.ts @@ -67,16 +67,13 @@ export function useCycleDates(cycleLength: CycleLengthState) { cycleLength.data - Number(currentBlockNumberData); const cycleSecondsRemaining = cycleBlocksRemaining * 5; - const cycleDates = { - status: "SUCCESS" as const, + setCycleDates({ + status: "SUCCESS", start: sub(new Date(), { seconds: secondsSinceStart }), end: add(new Date(), { seconds: cycleSecondsRemaining, }), - }; - console.log("cycle start: ", cycleDates.start); - console.log("cycle end: ", cycleDates.end); - setCycleDates(cycleDates); + }); } }, [ lastClaimedBlockNumberData, diff --git a/src/app/projectsMeta.ts b/src/app/projectsMeta.ts index 732e8ee..daeafbe 100644 --- a/src/app/projectsMeta.ts +++ b/src/app/projectsMeta.ts @@ -1,8 +1,5 @@ -import { Hex } from "viem"; - -export type ProjectMeta = { +type ProjectMeta = { name: string; - order: number; description: string; logoSrc: string; links: { @@ -11,11 +8,10 @@ export type ProjectMeta = { }; export const projectsMeta: { - [key: Hex]: ProjectMeta; + [key: string]: ProjectMeta; } = { "0x7E1367998e1fe8Fab8f0bbF41e97cD6E0C891B64": { name: "Labour DAO", - order: 1, description: "A DAO supporting workers who want to organize in web3 and out.", logoSrc: "project/labor_dao.png", @@ -26,7 +22,6 @@ export const projectsMeta: { }, "0x5405e2D4D12AAdB57579E780458c9a1151b560F1": { name: "Symbiota", - order: 2, description: "Event-focused organisations devoted to new forms of culture and enquiry.", logoSrc: "project/symbiota.png", @@ -37,7 +32,6 @@ export const projectsMeta: { }, "0x5c22B3F03b3d8FFf56C9B2e90151512Cb3F3dE0F": { name: "Crypto Commons", - order: 3, description: "Creating research and events on decentralized tech and the commons.", logoSrc: "project/cca.png", @@ -46,19 +40,8 @@ export const projectsMeta: { "https://breadchain.notion.site/Crypto-Commons-Association-77818c4f425942479835e8bfec0b951b", }, }, - "0x9c8C8513974d22E8eA9F74f2860833Db107111E6": { - name: "Citizen Wallet", - order: 4, - description: "Open source tool stack to support Web3 community currencies.", - logoSrc: "project/citizen_wallet.png", - links: { - notion: - "https://breadchain.notion.site/Citizen-Wallet-0139bb3030f7442a8804459d717adb52?pvs=74", - }, - }, "0x918dEf5d593F46735f74F9E2B280Fe51AF3A99ad": { name: "Breadchain Core", - order: 5, description: "The core team developing the tech and design used by Breadchain.", logoSrc: "project/core.png", @@ -69,7 +52,6 @@ export const projectsMeta: { }, "0x6A148b997e6651237F2fCfc9E30330a6480519f0": { name: "Breadchain Treasury", - order: 6, description: "A co-owned treasury in Breadchain used for grants and sponsorships.", logoSrc: "project/treasury.png",