Commit 2331121
committed
fix: use CreateIdempotent for ATA creation in Jito staking and enableToken
Jito staking fails with "Provided owner is not allowed" when the JitoSOL
ATA already exists on-chain but trustedTokens DB is out of sync. The ATA
program's non-idempotent Create instruction rejects accounts that aren't
System-owned. Switch to CreateIdempotent (instruction data [1]) which is
a no-op if the ATA already exists.
Reuses the existing create_ata_idempotent_ix() helper that the payment
intent path already uses correctly.
BTC-31661 parent 2e47efc commit 2331121
1 file changed
Lines changed: 17 additions & 24 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
484 | 484 | | |
485 | 485 | | |
486 | 486 | | |
| 487 | + | |
| 488 | + | |
487 | 489 | | |
488 | | - | |
489 | | - | |
490 | | - | |
491 | | - | |
492 | | - | |
493 | | - | |
494 | | - | |
495 | | - | |
496 | | - | |
497 | | - | |
498 | | - | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
499 | 497 | | |
500 | 498 | | |
501 | 499 | | |
| |||
967 | 965 | | |
968 | 966 | | |
969 | 967 | | |
970 | | - | |
971 | | - | |
972 | 968 | | |
| 969 | + | |
973 | 970 | | |
974 | 971 | | |
975 | 972 | | |
976 | 973 | | |
977 | 974 | | |
978 | 975 | | |
979 | | - | |
980 | | - | |
981 | | - | |
982 | | - | |
983 | | - | |
984 | | - | |
985 | | - | |
986 | | - | |
987 | | - | |
988 | | - | |
989 | | - | |
| 976 | + | |
| 977 | + | |
| 978 | + | |
| 979 | + | |
| 980 | + | |
| 981 | + | |
| 982 | + | |
990 | 983 | | |
991 | 984 | | |
992 | 985 | | |
| |||
0 commit comments