41 lines
2.3 KiB
TypeScript
41 lines
2.3 KiB
TypeScript
/* Metro module 10070; source: modules/virtual_currency/hooks/useFetchVirtualCurrencyBalance.tsx; dependencies: [31, 10071, 566, 10072, 2] */
|
|
function _fun78689(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78689, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10256:6, offset: 0x01e31b6b, size: 135 bytes, params: 8, frame: 18
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const env0_2 = (require(31) /* metro dependency 31 */).useEffect;
|
|
const virtualCurrencyStore = importDefault(10071) /* metro dependency 10071: VirtualCurrencyStore */;
|
|
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/virtual_currency/hooks/useFetchVirtualCurrencyBalance.tsx');
|
|
exports.useFetchVirtualCurrencyBalance = useFetchVirtualCurrencyBalance;
|
|
}
|
|
|
|
function useFetchVirtualCurrencyBalance(a0) { // fn#78690, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10256:258, offset: 0x01e31bf2, size: 158 bytes, params: 2, frame: 19
|
|
const env0_0 = a0;
|
|
const value2 = undefined;
|
|
const {balance, isFetching,
|
|
error} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([VirtualCurrencyStore],
|
|
function() {
|
|
return {balance: VirtualCurrencyStore.balance, isFetching: VirtualCurrencyStore.isFetchingBalance,
|
|
error: VirtualCurrencyStore.fetchBalanceError};
|
|
});
|
|
useEffect(_fun78692, [balance, error, a0 == null ? value2 : a0.disableFetch]);
|
|
return {balance: balance, isFetching: isFetching, error: error};
|
|
}
|
|
|
|
function _fun78692() { // fn#78692, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10256:477, offset: 0x01e31cbd, size: 106 bytes, params: 1, frame: 12
|
|
var value;
|
|
let r0 = env0_0 != null && env0_0.disableFetch;
|
|
r0 = !r0 ? balance !== null : r0;
|
|
r0 = !r0 ? error !== null : r0;
|
|
if (!r0) {
|
|
value = environment.__proto__;
|
|
r0 = VirtualCurrencyStore.isFetchingBalance;
|
|
}
|
|
if (!r0) {
|
|
value = environment.__proto__;
|
|
value = require(10072) /* metro dependency 10072: VirtualCurrencyActionCreators */;
|
|
value.fetchVirtualCurrencyBalance();
|
|
}
|
|
}
|
|
|