decord/source/stores/PremiumPaymentModalStore.tsx

77 lines
2.4 KiB
TypeScript
Raw Normal View History

2026-08-24 06:08:38 +00:00
// Module ID: 4386
// Function ID: 4387
2026-07-29 08:29:29 +00:00
// Name: handleSubscribeFailure
2026-08-24 06:08:38 +00:00
// Dependencies: [4277, 589, 709, 2]
2026-07-20 16:05:17 +00:00
2026-08-24 06:08:38 +00:00
// Module 4386 (handleSubscribeFailure)
import initializeDefault from "initialize" /* 589 */;
import dispatcherDefault from "dispatcher" /* 709 */;
import V6OrEarlierAPIError from "V6OrEarlierAPIError" /* 4277 */;
2026-07-23 10:11:24 +00:00
2026-08-24 06:08:38 +00:00
require = arg1;
2026-07-20 16:05:17 +00:00
function handleSubscribeFailure(error) {
error = error.error;
}
function handleClearError() {
2026-08-24 06:08:38 +00:00
c2 = null;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
let c2 = null;
let c3 = null;
let c4 = null;
2026-08-24 06:08:38 +00:00
const Store = initializeDefault.Store;
2026-07-29 08:29:29 +00:00
class PremiumPaymentModalStore extends Store {
}
const prototype = PremiumPaymentModalStore.prototype;
Object.defineProperty(prototype, "paymentError", {
get: function paymentError() {
return c2;
},
set: undefined
});
prototype["getGiftCode"] = function getGiftCode(arg0) {
let tmp = null;
if (arg0 === c4) {
tmp = c3;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
return tmp;
};
PremiumPaymentModalStore.displayName = "PremiumPaymentModalStore";
2026-08-24 06:08:38 +00:00
const premiumPaymentModalStore = new PremiumPaymentModalStore(dispatcherDefault, {
2026-07-20 16:05:17 +00:00
PREMIUM_PAYMENT_SUBSCRIBE_FAIL: handleSubscribeFailure,
PREMIUM_PAYMENT_UPDATE_FAIL: handleSubscribeFailure,
PREMIUM_PAYMENT_SUBSCRIBE_SUCCESS: function handleSubscribeSuccess() {
2026-08-24 06:08:38 +00:00
c2 = null;
2026-07-20 16:05:17 +00:00
},
PREMIUM_PAYMENT_UPDATE_SUCCESS: handleClearError,
PREMIUM_PAYMENT_ERROR_CLEAR: handleClearError,
BRAINTREE_TOKENIZE_PAYPAL_FAIL: function handlePayPalTokenizeFailure(message) {
2026-08-24 06:08:38 +00:00
const billingError = new V6OrEarlierAPIError.BillingError(message.message);
2026-07-20 16:05:17 +00:00
},
BRAINTREE_TOKENIZE_VENMO_FAIL: function handleVenmoTokenizeFailure(message) {
2026-08-24 06:08:38 +00:00
const billingError = new V6OrEarlierAPIError.BillingError(message.message);
2026-07-20 16:05:17 +00:00
},
SKU_PURCHASE_SUCCESS: function handleSKUPurchaseSuccess(arg0) {
2026-07-29 08:29:29 +00:00
({ giftCode: c3, skuId: c4 } = arg0);
2026-07-20 16:05:17 +00:00
},
SKU_PURCHASE_FAIL: function handleSKUPurchaseFail(error) {
error = error.error;
},
SKU_PURCHASE_AWAIT_CONFIRMATION: function handleSKUPurchaseAwaitConfirmation(isGift) {
if (isGift.isGift) {
const skuId = isGift.skuId;
}
},
GIFT_CODE_CREATE: function handleGiftCodeCreate(giftCode) {
giftCode = giftCode.giftCode;
if (0 === giftCode.uses) {
2026-07-29 08:29:29 +00:00
if (giftCode.sku_id === c4) {
2026-07-20 16:05:17 +00:00
const code = giftCode.code;
}
}
return false;
}
});
2026-08-24 06:08:38 +00:00
const result = require("set").fileFinishedImporting("stores/PremiumPaymentModalStore.tsx");
2026-07-20 16:05:17 +00:00
2026-07-29 08:29:29 +00:00
export default premiumPaymentModalStore;