This commit is contained in:
janisslsm committed 2026-11-01 12:12:55 +02:00
1 parent 1781d25a15
commit 732c0ad767
33051 files changed
+2591613 -3019689

No files matched your search

@@ -0,0 +1,47 @@
// Metro module 11910 (f11911).
import { useCallback } from "react";
import { claimPremiumCollectiblesProduct, fetchCollectiblesPurchases } from "../CollectiblesActionCreators";
import ActionSheetActionCreators from "../../action_sheet/native/ActionSheetActionCreators";
import ProductPurchaseSuccessActionCreators from "./ProductPurchaseSuccessActionCreators";
import ToastActionCreators from "../../toast/native/ToastActionCreators";
import { intl, t } from "../../../intl/index.native";
export function useHandleClaim({ product }) {
return {
handleClaim: useCallback(async () => {
let c27208_3 = 0;
L10: {
try {
c27208_3 = 1;
await claimPremiumCollectiblesProduct(product.skuId);
ActionSheetActionCreators.hideActionSheet();
ProductPurchaseSuccessActionCreators.open({
product,
useCategoryImage: true
});
fetchCollectiblesPurchases();
c27208_3 = 0;
} catch ($e) {
let r7 = $e;
if (c27208_3 !== 0) {
while (true) {
try {
c27208_3 = 0;
ToastActionCreators.open({
key: "collectible shop claim error",
content: intl.string(t.CKsXk3)
});
break L10;
} catch ($e) {
r7 = $e;
if (c27208_3 === 0) {
break;
}
}
}
}
throw r7;
}
}
}, [product])
};
}