feat/multisig-admin-controls#198
Conversation
Sendi0011
left a comment
There was a problem hiding this comment.
Solid work on the multisig feature! The smart contract changes look well-structured. However, the frontend has several incomplete pieces that need to be addressed:
Critical:
-
pendingActionsis always empty —fetchPendingActionsis a stub that just doessetPendingActions([]). The "Pending Actions" section will always show "No pending actions." Either implement the fetching or remove the section. -
handleExecuteis a no-op — Inpending-action-card.tsx, the Execute button does nothing on click. Users can click it with zero feedback. Implement it or remove the button. -
isApprovedByCurrentUseris never set totrue— It's alwaysfalse, so the Approve button always shows even if the user already approved.
Improvements:
-
actionprop is typed asany— Define a proper interface:interface PendingAction { hash: string; type: string; requestedBy?: string; ... }. -
Quorum threshold is derived as
Math.ceil(quorumSize / 2)— This is a simple majority. Multisig systems should accept an explicit threshold parameter duringset_admin_quorum. What happens with a 3-member quorum — is it 2-of-3 or 3-of-3? -
No Stellar address validation —
handleAddAdminaccepts any string. Validate the input is a valid Stellar public key before submitting to the contract. -
group-actions.tsxcallsgetAdminQuorumdirectly — But you defineduseGetAdminQuorumhook in the same PR. Use the hook for consistency. -
6 new
test_snapshots/*.jsonfiles — If these are auto-generated snapshots, confirm they're intentional. Auto-generated snapshot files should be in.gitignoreor generated in CI.
closed #181
feat: Add multi-sig for critical admin actions
This pull request introduces a threshold-based multi-sig approval mechanism for critical administrative actions across all three pool
contracts (Rotational, Target, and Flexible). It also includes the corresponding frontend UI for managing multi-sig admins and
approving pending actions.
Smart Contract Changes
Actionenum to all three pool contracts to represent the different types of actions that can be approved.execute_approvedfunction to all three pool contracts to execute actions approved by a multi-sig quorum.emergency_withdraw,pause,unpause, andremove_memberfunctions to be callable only via execute_approved when aquorum is configured.
get_admin_quorum,get_pending_action, andget_approval_countto all three pool contracts.Frontend Changes
AdminQuorumManagercomponent to manage the multi-sig quorum.PendingActionCardcomponent to display pending actions.AdminQuorumManagerto the group detail page.Testing