Commit 13f06a8
authored
Feature: Update v6 PayPalProvider Eligibility (#811)
* remove default eligibility request
* add setEligibility to context
* update provider to set dispatch wrapper in context
* initial updates to useFetchEligibleMethods
* update tests
* update to use internal dispatch context
* update tests again
* add hook doc comments, tests and update eligibility hook to surface context errors
* remove comment
* chore: add changeset
* move useFetchEligibleMethods to its own file
* remove client token in favor of headers object in use fetch eligible methods and update tests
* update comment to remove lint warning
* remove todos
* add server-only package and apply to useFetchEligibleMethods hook
* fix useFetchEligibleMethods jest configuration due to server-only import
* refactor useEligibleMethods to fetch methods when payload has changed
* update paypal dispatch context commnet
* add useFetchEligibleMethods to index for export1 parent e079afb commit 13f06a8
File tree
13 files changed
+893
-343
lines changed- .changeset
- packages/react-paypal-js
- src/v6
- components
- context
- hooks
13 files changed
+893
-343
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
62 | | - | |
| 62 | + | |
| 63 | + | |
63 | 64 | | |
64 | 65 | | |
65 | 66 | | |
| |||
128 | 129 | | |
129 | 130 | | |
130 | 131 | | |
131 | | - | |
| 132 | + | |
| 133 | + | |
132 | 134 | | |
133 | 135 | | |
134 | 136 | | |
| |||
Lines changed: 33 additions & 25 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
438 | 438 | | |
439 | 439 | | |
440 | 440 | | |
441 | | - | |
| 441 | + | |
442 | 442 | | |
443 | 443 | | |
444 | 444 | | |
| |||
455 | 455 | | |
456 | 456 | | |
457 | 457 | | |
458 | | - | |
459 | | - | |
460 | | - | |
461 | | - | |
462 | | - | |
463 | | - | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
464 | 462 | | |
465 | 463 | | |
466 | 464 | | |
| |||
497 | 495 | | |
498 | 496 | | |
499 | 497 | | |
500 | | - | |
| 498 | + | |
501 | 499 | | |
502 | 500 | | |
503 | 501 | | |
504 | 502 | | |
505 | 503 | | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
506 | 507 | | |
507 | 508 | | |
508 | | - | |
509 | | - | |
510 | | - | |
| 509 | + | |
511 | 510 | | |
512 | 511 | | |
513 | 512 | | |
514 | 513 | | |
515 | 514 | | |
516 | 515 | | |
517 | | - | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
518 | 519 | | |
519 | 520 | | |
520 | 521 | | |
521 | 522 | | |
522 | 523 | | |
523 | 524 | | |
524 | 525 | | |
525 | | - | |
526 | | - | |
| 526 | + | |
| 527 | + | |
527 | 528 | | |
528 | | - | |
| 529 | + | |
529 | 530 | | |
530 | 531 | | |
531 | | - | |
| 532 | + | |
532 | 533 | | |
533 | 534 | | |
534 | 535 | | |
| |||
552 | 553 | | |
553 | 554 | | |
554 | 555 | | |
| 556 | + | |
555 | 557 | | |
556 | 558 | | |
557 | 559 | | |
558 | 560 | | |
559 | 561 | | |
560 | 562 | | |
561 | | - | |
562 | | - | |
| 563 | + | |
| 564 | + | |
563 | 565 | | |
564 | 566 | | |
565 | 567 | | |
| |||
568 | 570 | | |
569 | 571 | | |
570 | 572 | | |
571 | | - | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
572 | 576 | | |
573 | 577 | | |
574 | 578 | | |
| |||
643 | 647 | | |
644 | 648 | | |
645 | 649 | | |
646 | | - | |
647 | | - | |
648 | | - | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
649 | 653 | | |
650 | | - | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
651 | 657 | | |
652 | 658 | | |
653 | | - | |
| 659 | + | |
654 | 660 | | |
655 | 661 | | |
656 | 662 | | |
657 | 663 | | |
658 | 664 | | |
659 | 665 | | |
660 | | - | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
661 | 669 | | |
662 | 670 | | |
663 | 671 | | |
| |||
Lines changed: 17 additions & 28 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
265 | 266 | | |
266 | 267 | | |
267 | 268 | | |
268 | | - | |
269 | | - | |
270 | | - | |
271 | | - | |
272 | | - | |
273 | | - | |
274 | | - | |
275 | | - | |
276 | | - | |
277 | | - | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
278 | 273 | | |
279 | 274 | | |
280 | 275 | | |
281 | 276 | | |
282 | | - | |
283 | | - | |
284 | | - | |
285 | | - | |
286 | | - | |
287 | | - | |
288 | | - | |
289 | | - | |
290 | 277 | | |
291 | | - | |
292 | | - | |
293 | | - | |
294 | | - | |
295 | | - | |
296 | | - | |
297 | | - | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
298 | 285 | | |
299 | 286 | | |
300 | 287 | | |
| |||
315 | 302 | | |
316 | 303 | | |
317 | 304 | | |
318 | | - | |
319 | | - | |
320 | | - | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
321 | 310 | | |
322 | 311 | | |
Lines changed: 13 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
0 commit comments