feat: added web redirect#2087
feat: added web redirect#2087RohitKushvaha01 wants to merge 10 commits intoAcode-Foundation:ajit/fix-fetch-auth-configfrom
Conversation
Greptile SummaryThis PR adds a web-redirect fallback for paid plugin purchases on non-Play-Store builds: when
Confidence Score: 4/5The web-redirect logic is sound, but the error branch in the installer callback can leave a non-IAP build in a broken state. The src/lib/config.js — specifically the error callback of Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[config.js loaded] --> B[IAP_AVAILABLE = true]
B --> C[system.getInstaller called]
C --> D{Callback result}
D -- success --> E{installer == com.android.vending AND typeof iap != undefined?}
E -- Yes --> F[IAP_AVAILABLE = true]
E -- No --> G[IAP_AVAILABLE = false]
D -- error --> H[IAP_AVAILABLE = true]
F --> I[User taps Buy]
G --> I
H --> I
I --> J{config.IAP_AVAILABLE?}
J -- Yes --> K[Native IAP flow: iap.getProducts]
J -- No --> L[auth.getLoggedInUser]
L --> M{User logged in?}
M -- No --> N[Open login page in CustomTabs]
M -- Yes --> O[Open plugin purchase page in CustomTabs]
Reviews (5): Last reviewed commit: "fix: undefined error" | Re-trigger Greptile |
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
%%{init: {'theme': 'neutral'}}%% flowchart TD A[config.js loaded] --> B[IAP_AVAILABLE = true] B --> C[system.getInstaller called] C --> D{Callback result} D -- success --> E{installer == com.android.vending AND typeof iap != undefined?} E -- Yes --> F[IAP_AVAILABLE = true] E -- No --> G[IAP_AVAILABLE = false] D -- error --> H[IAP_AVAILABLE = true] F --> I[User taps Buy] G --> I H --> I I --> J{config.IAP_AVAILABLE?} J -- Yes --> K[Native IAP flow: iap.getProducts] J -- No --> L[auth.getLoggedInUser] L --> M{User logged in?} M -- No --> N[Open login page in CustomTabs] M -- Yes --> O[Open plugin purchase page in CustomTabs]