Commit d031e46
committed
Address reviewer feedback: use Transaction.unfinished and return error for non-existent transactions
Changes based on @LongCatIsLooong's review:
- Use Transaction.unfinished instead of Transaction.all for finish() since we're looking for transactions that need to be finished
- Return an error when attempting to finish a non-existent transaction instead of silently succeeding
- Added fetchUnfinishedTransaction() helper specifically for finish()
- Updated tests to expect error for non-existent transaction1 parent 41a7230 commit d031e46
File tree
3 files changed
+28
-26
lines changed- packages/in_app_purchase/in_app_purchase_storekit
- darwin/in_app_purchase_storekit/Sources/in_app_purchase_storekit/StoreKit2
3 files changed
+28
-26
lines changedLines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
5 | | - | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
Lines changed: 18 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
264 | 264 | | |
265 | 265 | | |
266 | 266 | | |
267 | | - | |
| 267 | + | |
268 | 268 | | |
269 | 269 | | |
270 | 270 | | |
271 | 271 | | |
272 | | - | |
273 | | - | |
274 | | - | |
275 | | - | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
276 | 279 | | |
277 | 280 | | |
278 | 281 | | |
| |||
376 | 379 | | |
377 | 380 | | |
378 | 381 | | |
379 | | - | |
380 | | - | |
381 | | - | |
382 | | - | |
383 | | - | |
384 | | - | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
385 | 386 | | |
386 | 387 | | |
387 | 388 | | |
| |||
391 | 392 | | |
392 | 393 | | |
393 | 394 | | |
| 395 | + | |
| 396 | + | |
394 | 397 | | |
395 | | - | |
396 | | - | |
397 | | - | |
398 | | - | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
399 | 402 | | |
400 | 403 | | |
401 | 404 | | |
| |||
405 | 408 | | |
406 | 409 | | |
407 | 410 | | |
408 | | - | |
409 | 411 | | |
410 | 412 | | |
411 | 413 | | |
Lines changed: 7 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
415 | 415 | | |
416 | 416 | | |
417 | 417 | | |
418 | | - | |
419 | | - | |
420 | | - | |
421 | | - | |
| 418 | + | |
| 419 | + | |
422 | 420 | | |
423 | | - | |
| 421 | + | |
424 | 422 | | |
425 | 423 | | |
426 | 424 | | |
427 | 425 | | |
428 | | - | |
| 426 | + | |
429 | 427 | | |
430 | | - | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
431 | 431 | | |
432 | 432 | | |
433 | 433 | | |
| |||
0 commit comments