decord/source/modules/collectibles/native/useHandleClaim.tsx

50 lines
1.6 KiB
TypeScript
Raw Normal View History

2026-08-24 06:08:38 +00:00
// Module ID: 12042
// Function ID: 12043
2026-07-20 16:05:17 +00:00
// Name: useHandleClaim
2026-08-24 06:08:38 +00:00
// Dependencies: [5, 19, 5305, 4346, 10428, 4097, 1236, 2]
2026-07-20 16:05:17 +00:00
// Exports: useHandleClaim
2026-08-24 06:08:38 +00:00
// Module 12042 (useHandleClaim)
import closure_3 from "asyncGeneratorStep" /* 5 */;
import closure_4 from "noop" /* 19 */;
2026-07-23 10:11:24 +00:00
let require = arg1;
2026-08-24 06:08:38 +00:00
const result = require("set").fileFinishedImporting("modules/collectibles/native/useHandleClaim.tsx");
2026-07-20 16:05:17 +00:00
export const useHandleClaim = function useHandleClaim(product) {
product = product.product;
2026-08-24 06:08:38 +00:00
require = product;
2026-07-20 16:05:17 +00:00
const items = [product];
2026-07-29 08:29:29 +00:00
return {
handleClaim: React.useCallback(callback(function*() {
2026-08-24 06:08:38 +00:00
closure_0 = tmp3;
c3 = 1;
yield closure_1_0(closure_1_2[2]).claimPremiumCollectiblesProduct(closure_1_0.skuId);
2026-08-04 21:03:28 +00:00
if (1 === tmp7) {
c3 = 0;
const obj2 = { key: "collectible shop claim error", content: null };
2026-08-24 06:08:38 +00:00
const intl = closure_1_0(closure_1_2[6]).intl;
obj2[1] = intl.string(closure_1_0(closure_1_2[6]).t.CKsXk3);
v0(closure_1_2[5]).open(obj2);
c4 = 3;
const obj6 = v0(closure_1_2[5]);
2026-08-04 21:03:28 +00:00
} else if (arg0 === 1) {
2026-07-29 08:29:29 +00:00
c4 = 3;
2026-08-04 21:03:28 +00:00
throw arg1;
} else if (arg0 !== 2) {
2026-08-24 06:08:38 +00:00
const obj = v0(closure_1_2[3]);
2026-08-04 21:03:28 +00:00
obj.hideActionSheet();
2026-08-24 06:08:38 +00:00
obj1 = v0(closure_1_2[4]);
2026-08-04 21:03:28 +00:00
let obj3 = { product: null, useCategoryImage: true };
obj3[0] = closure_0;
obj1.open(obj3);
2026-08-24 06:08:38 +00:00
obj3 = closure_1_0(closure_1_2[2]);
2026-08-04 21:03:28 +00:00
const collectiblesPurchases = obj3.fetchCollectiblesPurchases();
c3 = 0;
2026-07-29 08:29:29 +00:00
}
2026-08-04 21:03:28 +00:00
c3 = 0;
return arg1;
2026-07-29 08:29:29 +00:00
}), items)
};
2026-07-20 16:05:17 +00:00
};