Commit 7a06b34
fix(wallet-postgres): sync spendable boolean on state transitions
update_output_state, lock_utxos, and release_stale_pending! now set the
legacy spendable boolean column alongside the state column. filter_outputs
updated to use the same dual-column WHERE clause as find_spendable_outputs.
Without this, outputs transitioned to :spent or :pending via the state
column would still appear as spendable: true to filter_outputs and any
other query using the legacy boolean.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 88246ef commit 7a06b34
File tree
1 file changed
+9
-1
lines changed- gem/bsv-wallet-postgres/lib/bsv/wallet_postgres
1 file changed
+9
-1
lines changedLines changed: 9 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
176 | 176 | | |
177 | 177 | | |
178 | 178 | | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
179 | 183 | | |
180 | 184 | | |
181 | 185 | | |
| 186 | + | |
182 | 187 | | |
183 | 188 | | |
184 | 189 | | |
| |||
190 | 195 | | |
191 | 196 | | |
192 | 197 | | |
| 198 | + | |
193 | 199 | | |
194 | 200 | | |
195 | 201 | | |
| |||
232 | 238 | | |
233 | 239 | | |
234 | 240 | | |
| 241 | + | |
235 | 242 | | |
236 | 243 | | |
237 | 244 | | |
| |||
264 | 271 | | |
265 | 272 | | |
266 | 273 | | |
| 274 | + | |
267 | 275 | | |
268 | 276 | | |
269 | 277 | | |
| |||
386 | 394 | | |
387 | 395 | | |
388 | 396 | | |
389 | | - | |
| 397 | + | |
390 | 398 | | |
391 | 399 | | |
392 | 400 | | |
| |||
0 commit comments