Commit 856e831
committed
fix: register SubscriptionFPC in swap flow for sponsored swaps
The SubscriptionFPC was only registered during the drip/claim flow
(registerDripContracts), but sponsored swaps also need it. When a new
account went directly to swap without claiming first, the wallet couldn't
find the SubscriptionFPC artifact in PXE, causing "Contract artifact not
found for class 0x0b1adf2a...".
Now registerSwapContracts also checks and registers the SubscriptionFPC
if configured, following the same pattern as registerDripContracts:
- Checks metadata first to skip if already registered
- Throws if configured FPC is not found on-chain (fail-fast, consistent with drip)
- Registers with artifact and secret key in the same batch1 parent 33a0149 commit 856e831
1 file changed
Lines changed: 28 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
57 | 61 | | |
58 | | - | |
| 62 | + | |
59 | 63 | | |
60 | 64 | | |
61 | 65 | | |
62 | | - | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
63 | 72 | | |
64 | 73 | | |
65 | 74 | | |
| |||
100 | 109 | | |
101 | 110 | | |
102 | 111 | | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
103 | 129 | | |
104 | 130 | | |
105 | 131 | | |
| |||
0 commit comments