Commit 22884c1
authored
Fix DAO method paths to match node implementation (#30)
Fixed 7 DAO method issues to match actual node endpoints:
1. getDaoTreasury: /treasury/balance → /treasury/status
- Updated response parsing to treasury.total_balance
2. getTreasuryHistory: /treasury/history → /treasury/transactions
- Added limit/offset query parameter support
- Updated response parsing to transactions array
3. createProposal: /dao/proposals → /dao/proposal/create
- Fixed singular 'proposal' path
4. getProposalDetails: /dao/proposals/{id} → /dao/proposal/{id}
- Fixed singular 'proposal' path
5. submitVote: Updated request body format
- Changed to voter_identity_id, proposal_id, vote_choice
- Added support for yes/no/abstain and justification
6. registerDelegate: Fixed request body field names
- Changed userDid → user_did
- Changed delegateInfo → delegate_info
7. revokeDelegation: Fixed request body field name
- Changed userDid → user_did
All paths now match node's dao/mod.rs implementation (lines 957-1029)1 parent 2784977 commit 22884c1
File tree
5 files changed
+57
-29
lines changed- dist/core
- src/core
5 files changed
+57
-29
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
128 | | - | |
| 128 | + | |
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
132 | 132 | | |
133 | 133 | | |
134 | | - | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
135 | 138 | | |
136 | | - | |
| 139 | + | |
137 | 140 | | |
138 | 141 | | |
139 | 142 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments