(e)
| 314 | await helpers.promisify(iap.purchase, product.productId); |
| 315 | |
| 316 | async function onpurchase(e) { |
| 317 | const purchase = await getPurchase(product.productId); |
| 318 | await fetch(Url.join(config.API_BASE, "plugin/order"), { |
| 319 | method: "POST", |
| 320 | body: JSON.stringify({ |
| 321 | id: plugin.id, |
| 322 | token: purchase?.purchaseToken, |
| 323 | package: BuildInfo.packageName, |
| 324 | }), |
| 325 | }); |
| 326 | purchaseToken = purchase?.purchaseToken; |
| 327 | purchased = !!purchase; |
| 328 | $button.textContent = oldText; |
| 329 | install(); |
| 330 | } |
| 331 | |
| 332 | async function onerror(error) { |
| 333 | helpers.error(error); |
nothing calls this directly
no test coverage detected