Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Do not merge] Beta #429

Draft
wants to merge 48 commits into
base: dev
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
6c7816f
Merge remote-tracking branch 'origin/Batch-fix' into beta
Corantin Sep 12, 2024
b38e22e
Fix coucil safe not seeing buttons
Corantin Sep 13, 2024
7b69f79
Merge branch 'Batch-fix' into beta
Mati0x Sep 13, 2024
9e33a59
fix-pool-form-conviction-growth-not-converted
Corantin Sep 11, 2024
c1e6a91
Merge branch 'gnosis-deploy-0.0.4' into beta
Corantin Sep 16, 2024
c39a314
Merge branch 'dev' into beta
Corantin Sep 16, 2024
6d24e74
Merge remote-tracking branch 'origin/dev' into beta
Corantin Sep 18, 2024
e97fbf8
Merge branch 'fix-not-loading-when-wrong-network' into beta
Corantin Sep 18, 2024
117cc94
Merge branch 'tooltip-not-visible' into beta
Corantin Sep 18, 2024
f49c0f5
Merge remote-tracking branch 'origin/dev' into beta
Corantin Sep 18, 2024
47cfd8b
Merge branch 'mobile-connect-button' into beta
Corantin Sep 24, 2024
db584ed
Merge branch 'gnosis-deploy-0.0.4' into beta
Corantin Sep 26, 2024
6255684
Use sub version v4
Corantin Sep 26, 2024
29c47b2
Merge remote-tracking branch 'origin/magic-number' into beta
Corantin Sep 26, 2024
648e2f6
:recycle: Refactored daily job route for multi-chain support
Corantin Oct 11, 2024
c2f68ab
Merge branch 'dev' into beta
Corantin Oct 15, 2024
cef6c57
Merge branch 'dev' into beta
Corantin Oct 15, 2024
1f20af2
Merge branch 'dev' into beta
Corantin Oct 15, 2024
b8ed4dc
Merge branch 'dev' into beta
Corantin Oct 15, 2024
8135990
Merge branch 'dev' into beta
Corantin Oct 16, 2024
6bad13b
Merge branch 'dev' into beta
Corantin Oct 16, 2024
3f398f5
Merge branch 'dev' into beta
Corantin Oct 16, 2024
fdb9067
Merge branch 'dev' into beta
Corantin Oct 16, 2024
a279142
Merge branch 'dev' into beta
Corantin Oct 16, 2024
5358dc2
:arrow_up: Bump production version
Corantin Oct 17, 2024
35617c6
Merge branch 'dev' into beta
Corantin Oct 18, 2024
19c9c88
Merge branch 'dev' into beta
Corantin Oct 18, 2024
97db6fa
Merge branch 'dev' into beta
Corantin Oct 18, 2024
2ea917e
Merge branch 'dev' into beta
Corantin Oct 18, 2024
47082be
Merge branch 'dev' into beta
Corantin Oct 18, 2024
da78c22
Merge branch 'dev' into beta
Corantin Oct 18, 2024
0f189c8
Merge branch 'dev' into beta
Corantin Oct 19, 2024
095cd5a
Merge branch 'dev' into beta
Corantin Oct 20, 2024
0577ecf
Merge branch 'dev' into beta
Corantin Oct 20, 2024
de865ee
Merge branch 'dev' into beta
Corantin Oct 20, 2024
3d0f36c
Merge branch 'dev' into beta
Corantin Oct 20, 2024
c24da41
Merge branch 'dev' into beta
Corantin Oct 20, 2024
5bcb025
Bump subgraph to v0.1.2
Corantin Oct 22, 2024
be7e332
order garden card by comm from most to least
Mati0x Oct 22, 2024
9829a09
addt garden card by members when comm length is equal
Mati0x Oct 22, 2024
27e9556
Merge remote-tracking branch 'origin/fix/membership-stake-amount-deci…
Mati0x Oct 23, 2024
f38699d
Merge branch 'dev' into beta
Corantin Oct 23, 2024
b4f5a63
Merge branch 'dev' into beta
Corantin Oct 23, 2024
d70a23b
fix pool header
Mati0x Oct 29, 2024
8b219cf
fix: remove proposal and funds statistic from pool in review
Mati0x Oct 31, 2024
59f5d82
fix: pool form token address
Mati0x Oct 31, 2024
3e776dc
Merge branch 'dev' into beta
Corantin Nov 5, 2024
3c40ddc
fix: remove pool id from `PoolHeader`
Mati0x Nov 12, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 20 additions & 4 deletions apps/web/app/(app)/gardens/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,26 @@ export default function Page() {
return (
<>
{tokenGardens
.sort(
(a, b) =>
(b.communities?.length ?? 0) - (a.communities?.length ?? 0),
)
.sort((a, b) => {
const communitiesDiff =
(b.communities?.length ?? 0) - (a.communities?.length ?? 0);

if (communitiesDiff === 0) {
const aTotalMembers =
a.communities?.reduce(
(sum, community) => sum + (community.members?.length ?? 0),
0,
) ?? 0;
const bTotalMembers =
b.communities?.reduce(
(sum, community) => sum + (community.members?.length ?? 0),
0,
) ?? 0;
return bTotalMembers - aTotalMembers;
}

return communitiesDiff;
})
.map((garden) => (
<div key={garden.id}>
<GardenCard garden={garden} />
Expand Down
2 changes: 1 addition & 1 deletion apps/web/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ import { redirect } from "next/navigation";

export default function Page() {
redirect("/gardens");
}
}
5 changes: 3 additions & 2 deletions apps/web/components/Forms/PoolForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ export function PoolForm({ token, communityAddr }: Props) {
rulingTime: parseTimeUnit(DEFAULT_RULING_TIMEOUT_SEC, "seconds", "days"),
defaultResolution: 1,
minThresholdPoints: 0,
poolTokenAddress: token.id,
poolTokenAddress: "",
proposalCollateral:
chain.id === polygon.id ?
defaultMaticProposalColateral
Expand Down Expand Up @@ -227,6 +227,7 @@ export function PoolForm({ token, communityAddr }: Props) {
const { isConnected, missmatchUrl, tooltipMessage } = useDisableButtons();

const watchedAddress = watch("poolTokenAddress").toLowerCase() as Address;

const { data: customTokenData } = useToken({
address: watchedAddress ?? "0x",
chainId: +chain,
Expand Down Expand Up @@ -711,7 +712,7 @@ export function PoolForm({ token, communityAddr }: Props) {
registerKey="maxAmount"
type="number"
placeholder="0"
suffix={token.symbol}
suffix={customTokenData?.symbol}
/>
</div>
)}
Expand Down
9 changes: 8 additions & 1 deletion apps/web/components/PoolCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,18 @@ export function PoolCard({ pool, tokenGarden }: Props) {
icon={<HandRaisedIcon />}
count={proposals.length}
label="proposals"
className={`${isEnabled ? "visible" : "invisible"}`}
/>
<Statistic
icon={<CurrencyDollarIcon />}
label="funds"
className={`${poolType && PoolTypes[poolType] === "funding" ? "visible" : "invisible"}`}
className={`${
isEnabled ?
poolType && PoolTypes[poolType] === "funding" ?
"visible"
: "invisible"
: "invisible"
}`}
>
<DisplayNumber
number={[BigInt(poolAmount), tokenGarden.decimals]}
Expand Down
51 changes: 27 additions & 24 deletions apps/web/components/PoolHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -299,31 +299,15 @@ export default function PoolHeader({

return (
<section className="section-layout flex flex-col gap-0">
<header className="mb-2 flex flex-col">
<header className="mb-4 flex flex-col">
<div className="flex justify-between flex-wrap">
<h2>
<Skeleton isLoading={!ipfsResult} className="sm:!w-96 h-8">
{ipfsResult?.title} #{poolId}
{ipfsResult?.title}
</Skeleton>
</h2>
{(!!isCouncilMember || isCouncilSafe) && (
<div className="flex gap-2 flex-wrap">
<div className="flex flex-col gap-1 p-1 w-48">
<a
href={`https://app.safe.global/transactions/queue?safe=${safePrefix}:${strategy.registryCommunity.councilSafe}`}
className="text-info whitespace-nowrap flex flex-nowrap gap-1 items-center"
target="_blank"
rel="noreferrer"
>
Council safe
<ArrowTopRightOnSquareIcon width={16} height={16} />
</a>
<EthAddress
address={strategy.registryCommunity.councilSafe as Address}
shortenAddress={true}
actions="copy"
/>
</div>
<Button
btnStyle="outline"
icon={<Cog6ToothIcon height={24} width={24} />}
Expand Down Expand Up @@ -362,12 +346,31 @@ export default function PoolHeader({
</div>
)}
</div>
<div>
<EthAddress
icon={false}
address={strategy.id as Address}
label="Pool address"
/>
<div className="flex justify-between">
<div className="-ml-1">
<EthAddress
icon={false}
address={strategy.id as Address}
label="Pool address"
/>
</div>

<div className="flex gap-1">
<a
href={`https://app.safe.global/transactions/queue?safe=${safePrefix}:${strategy.registryCommunity.councilSafe}`}
className="text-primary-content whitespace-nowrap flex flex-nowrap gap-1 items-center"
target="_blank"
rel="noreferrer"
>
Council safe
<ArrowTopRightOnSquareIcon width={16} height={16} />
</a>
<EthAddress
address={strategy.registryCommunity.councilSafe as Address}
shortenAddress={true}
actions="copy"
/>
</div>
</div>
<Modal
title={`Edit ${ipfsResult?.title} #${poolId}`}
Expand Down
Loading