48 lines
1.8 KiB
TypeScript
48 lines
1.8 KiB
TypeScript
// Module ID: 7380
|
|
// Function ID: 7381
|
|
// Name: isSpendingLimitError
|
|
// Dependencies: [4241, 4029, 7381, 4684, 1236, 7094, 4355, 2]
|
|
// Exports: isSpendingLimitError, showSpendingLimitReachedAlert
|
|
|
|
// Module 7380 (isSpendingLimitError)
|
|
const result = require("useUserIdsForLinkStatus").fileFinishedImporting("modules/parent_tools/native/showSpendingLimitReachedAlert.tsx");
|
|
|
|
export const isSpendingLimitError = function isSpendingLimitError(billingError) {
|
|
let tmp3 = billingError instanceof require(4241) /* V6OrEarlierAPIError */.BillingError;
|
|
if (tmp3) {
|
|
let tmp4 = billingError.code === tmp(4029).ErrorCodes.BILLING_SPENDING_LIMIT_REACHED;
|
|
if (!tmp4) {
|
|
tmp4 = billingError.code === tmp(4029).ErrorCodes.BILLING_SPENDING_LIMIT_WILL_EXCEED;
|
|
}
|
|
tmp3 = tmp4;
|
|
}
|
|
return tmp3;
|
|
};
|
|
export const showSpendingLimitReachedAlert = function showSpendingLimitReachedAlert() {
|
|
let obj = activeLinkUserIds(7381);
|
|
activeLinkUserIds = obj.getActiveLinkUserIds();
|
|
let obj1 = importDefault(4684);
|
|
obj = { title: null, body: null, isDismissable: true };
|
|
const intl = activeLinkUserIds(1236).intl;
|
|
obj[0] = intl.string(activeLinkUserIds(1236).t.QJKKrT);
|
|
const intl2 = activeLinkUserIds(1236).intl;
|
|
obj[1] = intl2.string(activeLinkUserIds(1236).t["73Islf"]);
|
|
if (activeLinkUserIds.length > 0) {
|
|
obj = { confirmText: null, onConfirm: null, cancelText: null };
|
|
const intl3 = tmp(1236).intl;
|
|
obj[0] = intl3.string(tmp(1236).t.GF9RCX);
|
|
obj[1] = function onConfirm() {
|
|
let obj = activeLinkUserIds(outer1_2[5]);
|
|
obj.popLayer();
|
|
obj = { recipientIds: activeLinkUserIds };
|
|
outer1_1(outer1_2[6]).openPrivateChannel(obj);
|
|
};
|
|
const intl4 = tmp(1236).intl;
|
|
obj[2] = intl4.string(tmp(1236).t.L5eIZ2);
|
|
obj1 = obj;
|
|
} else {
|
|
obj1 = {};
|
|
}
|
|
const merged = Object.assign(obj1);
|
|
obj1.show(obj);
|
|
};
|