Commit e0b89e7
committed
fix: surface StakeKit API errors to user when yield quote fails
When a yield quote API call fails (e.g. StakeKit returns
DriftLendingInsufficientSolForRentError), the error was silently
swallowed — the deposit button was disabled with no explanation.
Changes:
- Return quoteError from useYieldTransactionFlow hook
- Show red error text above the action button in:
- YieldEnterModal
- YieldForm
- YieldActionModal
- Change button text to 'Quote Failed' when error present
- Change button color scheme to red when error present
- Parse StakeKit/Axios error responses for user-friendly messages
Closes #120521 parent cec2f73 commit e0b89e7
File tree
4 files changed
+70
-3
lines changed- src/pages/Yields
- components
- hooks
4 files changed
+70
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
| 84 | + | |
84 | 85 | | |
85 | 86 | | |
86 | 87 | | |
| |||
202 | 203 | | |
203 | 204 | | |
204 | 205 | | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
205 | 218 | | |
| 219 | + | |
206 | 220 | | |
207 | 221 | | |
208 | 222 | | |
| |||
226 | 240 | | |
227 | 241 | | |
228 | 242 | | |
| 243 | + | |
| 244 | + | |
229 | 245 | | |
230 | 246 | | |
231 | 247 | | |
| |||
412 | 428 | | |
413 | 429 | | |
414 | 430 | | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
415 | 436 | | |
416 | | - | |
| 437 | + | |
417 | 438 | | |
418 | 439 | | |
419 | 440 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
319 | 319 | | |
320 | 320 | | |
321 | 321 | | |
| 322 | + | |
322 | 323 | | |
323 | 324 | | |
324 | 325 | | |
| |||
357 | 358 | | |
358 | 359 | | |
359 | 360 | | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
360 | 375 | | |
361 | 376 | | |
362 | 377 | | |
| 378 | + | |
363 | 379 | | |
364 | 380 | | |
365 | 381 | | |
| |||
397 | 413 | | |
398 | 414 | | |
399 | 415 | | |
| 416 | + | |
| 417 | + | |
400 | 418 | | |
401 | 419 | | |
402 | 420 | | |
| |||
673 | 691 | | |
674 | 692 | | |
675 | 693 | | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
676 | 699 | | |
677 | | - | |
| 700 | + | |
678 | 701 | | |
679 | 702 | | |
680 | 703 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
343 | 343 | | |
344 | 344 | | |
345 | 345 | | |
| 346 | + | |
346 | 347 | | |
347 | 348 | | |
348 | 349 | | |
| |||
402 | 403 | | |
403 | 404 | | |
404 | 405 | | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
405 | 418 | | |
406 | 419 | | |
407 | 420 | | |
| 421 | + | |
408 | 422 | | |
409 | 423 | | |
410 | 424 | | |
| |||
451 | 465 | | |
452 | 466 | | |
453 | 467 | | |
| 468 | + | |
| 469 | + | |
454 | 470 | | |
455 | 471 | | |
456 | 472 | | |
| |||
737 | 753 | | |
738 | 754 | | |
739 | 755 | | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
740 | 761 | | |
741 | | - | |
| 762 | + | |
742 | 763 | | |
743 | 764 | | |
744 | 765 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
829 | 829 | | |
830 | 830 | | |
831 | 831 | | |
| 832 | + | |
832 | 833 | | |
833 | 834 | | |
834 | 835 | | |
| |||
843 | 844 | | |
844 | 845 | | |
845 | 846 | | |
| 847 | + | |
846 | 848 | | |
847 | 849 | | |
848 | 850 | | |
| |||
0 commit comments