Commit 2d997eb
authored
Informatively throw when value is missing (#703)
### Description
otherwise very crypto errror is thrown (missing length on undefined)
#### Other changes
### Tested
new test
### How to QA
create a proposal where the jsonTransactions are missing value
### Related issues
inspired by #702
<!-- start pr-codex -->
---
## PR-Codex overview
This PR focuses on enhancing error handling in the `proposalBuilder` by
ensuring that transactions without a `value` property throw a clear
error message. Additionally, it updates the changeset mode and adds
tests to verify the new error handling.
### Detailed summary
- Changed `mode` from `"pre"` to `"exit"` in `.changeset/pre.json`.
- Added a new entry for `@celo/governance` in
`.changeset/old-badgers-invite.md`.
- Implemented error throwing for missing `tx.value` in
`packages/sdk/governance/src/proposal-builder.ts`.
- Added unit tests for missing and zero `value` cases in
`packages/sdk/governance/src/proposal-builder.test.ts`.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your
question}`
<!-- end pr-codex -->1 parent e4517d6 commit 2d997eb
File tree
3 files changed
+44
-0
lines changed- .changeset
- packages/sdk/governance/src
3 files changed
+44
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
160 | 160 | | |
161 | 161 | | |
162 | 162 | | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
163 | 198 | | |
164 | 199 | | |
165 | 200 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
233 | 233 | | |
234 | 234 | | |
235 | 235 | | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
236 | 240 | | |
237 | 241 | | |
238 | 242 | | |
| |||
0 commit comments