feat(wallet): integrate wallet + enforce chain, update /blockchain dev page - #65
Open
zohersahli wants to merge 12 commits into
Open
feat(wallet): integrate wallet + enforce chain, update /blockchain dev page#65zohersahli wants to merge 12 commits into
zohersahli wants to merge 12 commits into
Conversation
Switch GroupThumbnail, GroupSidebar, and CreateEditGroup to V2 membership service. Use group.blockchain_id for on-chain calls and keep backend id for API routes. Add membership.ts + Polls.v2 ABI under web3/frontend. Update GroupDetails type to include blockchain_id.
Kattenelvis
reviewed
Mar 30, 2026
extract on-chain delegation logic into separate file simplify delegation component responsibilities remove unnecessary helper and as any usage improve null safety for group and groupUser clarify backend desync handling after on-chain success remove finally block and make loading state explicit
clean blockchain checks, remove unnecessary helper/comment, and improve backend desync handling
clean ES6 style, remove duplication, and improve contract typings
group local state declarations and replace inline styles with Tailwind classes
move wallet variables to top-level declarations and use shared ErrorHandlerStore
convert delegations and wallet helpers to ES6 arrow function style
Kattenelvis
reviewed
Apr 20, 2026
|
|
||
| let group: Group | undefined, | ||
| groups: Group[] = [], | ||
| groupUser: GroupUser | undefined, |
Owner
There was a problem hiding this comment.
Why are we removing type safety?
| const createDelegationPool = async () => { | ||
| if (!group) { | ||
| ErrorHandlerStore.set({ | ||
| message: 'Missing group. Cannot create delegation pool.', |
Owner
There was a problem hiding this comment.
This just isn't needed if group is never undefined
| error: unknown, | ||
| fallbackMessage: string | ||
| ): string => { | ||
| if (typeof error === 'object' && error !== null) { |
Owner
There was a problem hiding this comment.
do you think "if (error)" is enough?
| const deleteDelegation = async () => { | ||
| await deleteDelegationPool(); | ||
| const success = await deleteDelegationPool(); | ||
| if (!success) return; |
Owner
There was a problem hiding this comment.
do we also add ErrorMessage?
| Makes the currently logged in user no longer a delegate(pool) | ||
| */ | ||
| const deleteDelegationPool = async () => { | ||
| const deleteDelegationPool = async (): Promise<boolean> => { |
Owner
There was a problem hiding this comment.
The function appears to be returning boolean, not Promise<boolean>, am I getting that right?
| address: string, | ||
| groupId: bigint | ||
| ) => Promise<boolean>; | ||
| }; |
| pollId = 8, | ||
| proposalId = 1; | ||
|
|
||
| let connecting = false; |
| let connecting = false; | ||
|
|
||
| async function refreshNetwork() { | ||
| if (typeof window === 'undefined' || !window?.ethereum) return; |
Owner
There was a problem hiding this comment.
typeof window === 'undefined'?
Kattenelvis
force-pushed
the
dev
branch
5 times, most recently
from
June 15, 2026 19:19
bb57c5c to
d798a39
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
feat(wallet): integrate wallet + enforce chain, update /blockchain dev page