Skip to content

Commit 4063f8c

Browse files
authored
fix: backlog bug fixes and improvements (#4697)
1 parent 9621147 commit 4063f8c

56 files changed

Lines changed: 3168 additions & 620 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,5 @@ src/generated
4444

4545
.vercel
4646
.env*.local
47+
48+
CLAUDE.md

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,9 @@
5555
},
5656
"dependencies": {
5757
"@apollo/client": "^3.10.8",
58-
"@getpara/ethers-v5-integration": "2.0.0-alpha.64",
59-
"@getpara/evm-wallet-connectors": "2.0.0-alpha.64",
60-
"@getpara/react-sdk-lite": "2.0.0-alpha.64",
58+
"@getpara/ethers-v5-integration": "2.0.0",
59+
"@getpara/evm-wallet-connectors": "2.0.0",
60+
"@getpara/react-sdk-lite": "2.0.0",
6161
"@headlessui/react": "^1.7.18",
6262
"@heroicons/react": "^2.1.4",
6363
"@jbx-protocol/contracts-v1": "2.0.0",

src/components/ProtocolActivity/ProtocolActivityElement.tsx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -62,17 +62,17 @@ export function ProtocolActivityElement({
6262
/>
6363
</div>
6464

65-
{/* Row 2: Action Label + Amount */}
66-
<div className="flex items-baseline gap-2 mb-1">
67-
<span className="text-sm text-grey-600 dark:text-grey-400 capitalize">
68-
{header}
69-
</span>
70-
<div className="font-heading text-lg whitespace-nowrap">
71-
{subject}
72-
</div>
65+
{/* Row 2: Action Label */}
66+
<div className="text-sm text-grey-600 dark:text-grey-400 capitalize mb-1">
67+
{header}
68+
</div>
69+
70+
{/* Row 3: Amount */}
71+
<div className="font-heading text-lg whitespace-nowrap mb-1">
72+
{subject}
7373
</div>
7474

75-
{/* Row 3: Timestamp + From Address */}
75+
{/* Row 4: Timestamp + From Address */}
7676
<div className="flex items-center gap-2 text-xs text-grey-500 dark:text-grey-500">
7777
<span>{formatHistoricalDate(event.timestamp * 1000)}</span>
7878
<span>·</span>

src/components/ProtocolActivity/ProtocolActivityList.tsx

Lines changed: 11 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,37 @@
11
import { Button } from 'antd'
22
import Loading from 'components/Loading'
33
import { useActivityEventsQuery } from 'generated/v4v5/graphql'
4-
import { testnetBendystrawClient, mainnetBendystrawClient } from 'lib/apollo/bendystrawClient'
4+
import { mainnetBendystrawClient } from 'lib/apollo/bendystrawClient'
55
import {
66
AnyEvent,
77
transformEventData,
88
} from 'packages/v4v5/views/V4V5ProjectDashboard/V4V5ProjectTabs/V4V5ActivityPanel/utils/transformEventsData'
99
import React, { useState } from 'react'
10-
import { twMerge } from 'tailwind-merge'
1110
import Link from 'next/link'
1211
import { v4v5ProjectRoute } from 'packages/v4v5/utils/routes'
1312
import { ProtocolActivityElement } from './ProtocolActivityElement'
1413
import { translateEventDataToProtocolPresenter } from './utils/translateEventDataToProtocolPresenter'
1514

1615
const PAGE_SIZE = 20
1716
const POLL_INTERVAL = 30000 // 30 seconds
18-
19-
type NetworkType = 'testnet' | 'mainnet'
20-
21-
// Always default to mainnet first
22-
const defaultNetwork: NetworkType = 'mainnet'
17+
const IGNORED_EVENTS = ['mintNftEvent', 'burnEvent']
18+
const baseEventFilter = IGNORED_EVENTS.reduce(
19+
(acc, curr) => ({
20+
...acc,
21+
[curr]: null,
22+
}),
23+
{},
24+
)
2325

2426
export function ProtocolActivityList() {
25-
const [network, setNetwork] = useState<NetworkType>(defaultNetwork)
2627
const [endCursor, setEndCursor] = useState<string | null>(null)
2728

28-
// Select client based on network toggle
29-
const client = network === 'testnet' ? testnetBendystrawClient : mainnetBendystrawClient
30-
31-
// Reset cursor when network changes
32-
React.useEffect(() => {
33-
setEndCursor(null)
34-
}, [network])
35-
3629
// Query protocol activity (no chain filter)
3730
const { data: activityEvents, loading, error } = useActivityEventsQuery({
38-
client,
31+
client: mainnetBendystrawClient,
3932
pollInterval: POLL_INTERVAL, // Poll every 30 seconds
4033
variables: {
41-
where: {},
34+
where: baseEventFilter,
4235
orderBy: 'timestamp',
4336
orderDirection: 'desc',
4437
after: endCursor,
@@ -65,31 +58,6 @@ export function ProtocolActivityList() {
6558
<h2 className="mb-4 font-heading text-2xl font-medium">
6659
Protocol Activity
6760
</h2>
68-
{/* Network Toggle */}
69-
<div className="mb-4 flex gap-2">
70-
<button
71-
onClick={() => setNetwork('mainnet')}
72-
className={twMerge(
73-
'rounded-md px-4 py-2 text-sm font-medium transition-colors',
74-
network === 'mainnet'
75-
? 'bg-bluebs-500 text-white'
76-
: 'bg-smoke-100 text-grey-600 hover:bg-smoke-200 dark:bg-slate-700 dark:text-slate-200 dark:hover:bg-slate-600',
77-
)}
78-
>
79-
Mainnet
80-
</button>
81-
<button
82-
onClick={() => setNetwork('testnet')}
83-
className={twMerge(
84-
'rounded-md px-4 py-2 text-sm font-medium transition-colors',
85-
network === 'testnet'
86-
? 'bg-bluebs-500 text-white'
87-
: 'bg-smoke-100 text-grey-600 hover:bg-smoke-200 dark:bg-slate-700 dark:text-slate-200 dark:hover:bg-slate-600',
88-
)}
89-
>
90-
Testnet
91-
</button>
92-
</div>
9361
</div>
9462
<div className="flex-1 overflow-y-auto px-6">
9563
<div className="flex flex-col gap-3">

src/components/VolumeChart/components/TimelineChart.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ export default function TimelineChart({
256256
type="monotone"
257257
dataKey={view}
258258
activeDot={{ r: 6, fill: colors.juice[400], stroke: undefined }}
259-
animationDuration={750}
259+
isAnimationActive={false}
260260
/>
261261
)}
262262
<Tooltip

src/contexts/ProjectMetadataContext.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ interface ProjectMetadataContextType {
77
isArchived: boolean | undefined
88
projectId: number | undefined
99
pv: PV | undefined
10+
isLoading: boolean
1011
refetchProjectMetadata: VoidFunction
1112
}
1213

@@ -16,6 +17,7 @@ export const ProjectMetadataContext = createContext<ProjectMetadataContextType>(
1617
isArchived: undefined,
1718
projectId: undefined,
1819
pv: undefined,
20+
isLoading: true,
1921
refetchProjectMetadata: () =>
2022
console.error(
2123
'ProjectMetadataContext.refetchProjectMetadata called but no provider set',

src/locales/messages.pot

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,9 @@ msgstr ""
167167
msgid "An address"
168168
msgstr ""
169169

170+
msgid "change"
171+
msgstr ""
172+
170173
msgid "Activating this option enables running the user's wallet address against OFAC’s Specially Designated Nationals (SDN) list"
171174
msgstr ""
172175

@@ -1091,6 +1094,9 @@ msgstr ""
10911094
msgid "Edit project and cycle rules"
10921095
msgstr ""
10931096

1097+
msgid "Next cycle"
1098+
msgstr ""
1099+
10941100
msgid "Your project was successfully created!"
10951101
msgstr ""
10961102

@@ -1226,6 +1232,9 @@ msgstr ""
12261232
msgid "Choose an ENS name to use as the project's handle. Subdomains are allowed and will be included in the handle. Handles won't include the \".eth\" extension."
12271233
msgstr ""
12281234

1235+
msgid "Queue Safe ERC-20 Deploy Transactions"
1236+
msgstr ""
1237+
12291238
msgid "Total:"
12301239
msgstr ""
12311240

@@ -1265,6 +1274,9 @@ msgstr ""
12651274
msgid "Project tokens will be minted to the address that made the payment."
12661275
msgstr ""
12671276

1277+
msgid "You are viewing a past ruleset. This cycle has ended."
1278+
msgstr ""
1279+
12681280
msgid "Migrate legacy tokens"
12691281
msgstr ""
12701282

@@ -1331,6 +1343,9 @@ msgstr ""
13311343
msgid "Cash outs are disabled when all of the project's ETH is being used for payouts (when payouts are unlimited)."
13321344
msgstr ""
13331345

1346+
msgid "Started {0}"
1347+
msgstr ""
1348+
13341349
msgid "Fee from <0><1/></0>"
13351350
msgstr ""
13361351

@@ -1367,6 +1382,9 @@ msgstr ""
13671382
msgid "A fixed amount of ETH can be paid out from your project each ruleset. You can send specific ETH amounts (or ETH amounts based on USD values) to one or more recipients. Any remaining ETH will stay in your project for token cash outs or use in future rulesets."
13681383
msgstr ""
13691384

1385+
msgid "Past"
1386+
msgstr ""
1387+
13701388
msgid "Not able to process fees"
13711389
msgstr ""
13721390

@@ -1682,6 +1700,9 @@ msgstr ""
16821700
msgid "Reserved recipients:"
16831701
msgstr ""
16841702

1703+
msgid "Beginner Friendly"
1704+
msgstr ""
1705+
16851706
msgid "Transfer ownership"
16861707
msgstr ""
16871708

@@ -1748,6 +1769,9 @@ msgstr ""
17481769
msgid "This cycle's payouts"
17491770
msgstr ""
17501771

1772+
msgid "Since your project owner is a Gnosis Safe and this is an omnichain project, you need to queue separate ERC-20 deploy transactions on each chain."
1773+
msgstr ""
1774+
17511775
msgid "<0>This website interacts with the Ethereum blockchain — to use it, you'll need to have a wallet and some ETH (ETH is the main currency on Ethereum). You can get a free wallet from <1>MetaMask.io</1>, and buy ETH from within the wallet by using a credit card.</0>"
17521776
msgstr ""
17531777

@@ -2090,6 +2114,9 @@ msgstr ""
20902114
msgid "allocation"
20912115
msgstr ""
20922116

2117+
msgid "Token credits"
2118+
msgstr ""
2119+
20932120
msgid "This project's rules may pose risks for contributors:"
20942121
msgstr ""
20952122

@@ -2123,6 +2150,9 @@ msgstr ""
21232150
msgid "Edit NFTs"
21242151
msgstr ""
21252152

2153+
msgid "Confirm archive"
2154+
msgstr ""
2155+
21262156
msgid "{tokenSymbol} ERC-20 address"
21272157
msgstr ""
21282158

@@ -2234,6 +2264,9 @@ msgstr ""
22342264
msgid "Enable reserved tokens"
22352265
msgstr ""
22362266

2267+
msgid "This project's rules will be locked in place for {rulesetLength}."
2268+
msgstr ""
2269+
22372270
msgid "Case study"
22382271
msgstr ""
22392272

@@ -2516,6 +2549,9 @@ msgstr ""
25162549
msgid "Not a valid ETH address"
25172550
msgstr ""
25182551

2552+
msgid "Previous cycle"
2553+
msgstr ""
2554+
25192555
msgid "{0} after JBX fee"
25202556
msgstr ""
25212557

@@ -2612,6 +2648,9 @@ msgstr ""
26122648
msgid "reserved token recipient"
26132649
msgstr ""
26142650

2651+
msgid "Cashing out tokens"
2652+
msgstr ""
2653+
26152654
msgid "Controller configuration"
26162655
msgstr ""
26172656

@@ -2870,9 +2909,15 @@ msgstr ""
28702909
msgid "Redeem tokens"
28712910
msgstr ""
28722911

2912+
msgid "Load more cycles..."
2913+
msgstr ""
2914+
28732915
msgid "Add an on-chain note about this cycle."
28742916
msgstr ""
28752917

2918+
msgid "Changes from Cycle #{previousCycleNumber}"
2919+
msgstr ""
2920+
28762921
msgid "Archive project"
28772922
msgstr ""
28782923

@@ -2891,6 +2936,9 @@ msgstr ""
28912936
msgid "All of this project's ETH will be paid out. Token holders will receive <0>no ETH</0> when redeeming their tokens."
28922937
msgstr ""
28932938

2939+
msgid "Loading..."
2940+
msgstr ""
2941+
28942942
msgid "Approve"
28952943
msgstr ""
28962944

@@ -3575,6 +3623,9 @@ msgstr ""
35753623
msgid "Previous value"
35763624
msgstr ""
35773625

3626+
msgid "changes"
3627+
msgstr ""
3628+
35783629
msgid "No chains available for multi-chain deployment"
35793630
msgstr ""
35803631

@@ -3695,6 +3746,9 @@ msgstr ""
36953746
msgid "Reserve 1 NFT of every"
36963747
msgstr ""
36973748

3749+
msgid "Select cycle"
3750+
msgstr ""
3751+
36983752
msgid "NFT Projects"
36993753
msgstr ""
37003754

@@ -3977,6 +4031,9 @@ msgstr ""
39774031
msgid "Redeem {tokensLabel} for ETH"
39784032
msgstr ""
39794033

4034+
msgid "Past ruleset cycle"
4035+
msgstr ""
4036+
39804037
msgid "Made a mistake?"
39814038
msgstr ""
39824039

@@ -4445,6 +4502,9 @@ msgstr ""
44454502
msgid "Simple token rules that will work for most projects. You can edit these rules in future cycles."
44464503
msgstr ""
44474504

4505+
msgid "Confirm unarchive"
4506+
msgstr ""
4507+
44484508
msgid "Start"
44494509
msgstr ""
44504510

@@ -4556,6 +4616,9 @@ msgstr ""
45564616
msgid "ETH"
45574617
msgstr ""
45584618

4619+
msgid "Ruleset cycle"
4620+
msgstr ""
4621+
45594622
msgid "The amount of reserved tokens currently available to be distributed to the recipients below."
45604623
msgstr ""
45614624

src/packages/v1/contexts/V1ProjectMetadataProvider.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ export function V1ProjectMetadataProvider({
2121
metadata?.archived) ??
2222
false
2323

24+
const isLoading = !metadata
25+
2426
return (
2527
<ProjectMetadataContext.Provider
2628
value={{
@@ -33,6 +35,7 @@ export function V1ProjectMetadataProvider({
3335
isArchived,
3436
projectId: projectId?.toNumber(),
3537
pv: PV_V1,
38+
isLoading,
3639
}}
3740
>
3841
{children}

src/packages/v2v3/contexts/V2V3ProjectMetadataProvider.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,16 @@ export default function V2V3ProjectMetadataProvider({
3030
projectMetadata?.archived) ??
3131
false
3232

33+
const isLoading = !projectMetadata
34+
3335
return (
3436
<ProjectMetadataContext.Provider
3537
value={{
3638
projectMetadata,
3739
isArchived,
3840
projectId,
3941
pv: PV_V2,
42+
isLoading,
4043
refetchProjectMetadata: refetchValue,
4144
}}
4245
>

0 commit comments

Comments
 (0)