52 lines
1.9 KiB
TypeScript
52 lines
1.9 KiB
TypeScript
// Module ID: 10707
|
|
// Function ID: 10708
|
|
// Name: isSpendingLimitError
|
|
// Dependencies: [4376, 4161, 8791, 4859, 1233, 7342, 4491, 2]
|
|
// Exports: isSpendingLimitError, showSpendingLimitReachedAlert
|
|
|
|
// Module 10707 (isSpendingLimitError)
|
|
import set from "set" /* 2 */;
|
|
import V6OrEarlierAPIError from "V6OrEarlierAPIError" /* 4376 */;
|
|
import _modDef4859 from "module_4859" /* 4859 */;
|
|
|
|
const result = set.fileFinishedImporting("modules/parent_tools/native/showSpendingLimitReachedAlert.tsx");
|
|
|
|
export const isSpendingLimitError = function isSpendingLimitError(billingError) {
|
|
let tmp3 = billingError instanceof V6OrEarlierAPIError.BillingError;
|
|
if (tmp3) {
|
|
let tmp4 = billingError.code === tmp(4161).ErrorCodes.BILLING_SPENDING_LIMIT_REACHED;
|
|
if (!tmp4) {
|
|
tmp4 = billingError.code === tmp(4161).ErrorCodes.BILLING_SPENDING_LIMIT_WILL_EXCEED;
|
|
}
|
|
tmp3 = tmp4;
|
|
}
|
|
return tmp3;
|
|
};
|
|
export const showSpendingLimitReachedAlert = function showSpendingLimitReachedAlert() {
|
|
let obj = activeLinkUserIds(8791);
|
|
activeLinkUserIds = obj.getActiveLinkUserIds();
|
|
obj1 = _modDef4859;
|
|
obj = { title: null, body: null, isDismissable: true };
|
|
const intl = activeLinkUserIds(1233).intl;
|
|
obj[0] = intl.string(activeLinkUserIds(1233).t.QJKKrT);
|
|
const intl2 = activeLinkUserIds(1233).intl;
|
|
obj[1] = intl2.string(activeLinkUserIds(1233).t["73Islf"]);
|
|
if (activeLinkUserIds.length > 0) {
|
|
obj = { confirmText: null, onConfirm: null, cancelText: null };
|
|
const intl3 = tmp(1233).intl;
|
|
obj[0] = intl3.string(tmp(1233).t.GF9RCX);
|
|
obj[1] = function onConfirm() {
|
|
let obj = activeLinkUserIds(closure_1_2[5]);
|
|
obj.popLayer();
|
|
obj = { recipientIds: activeLinkUserIds };
|
|
closure_1_1(closure_1_2[6]).openPrivateChannel(obj);
|
|
};
|
|
const intl4 = tmp(1233).intl;
|
|
obj[2] = intl4.string(tmp(1233).t.L5eIZ2);
|
|
obj1 = obj;
|
|
} else {
|
|
obj1 = {};
|
|
}
|
|
const merged = Object.assign(obj1);
|
|
obj1.show(obj);
|
|
};
|