Files
discord-decomp/sources/modules/mobile_web_handoff/MobileWebHandoffUtils.tsx
T
2026-07-27 16:20:00 +03:00

46 lines
2.3 KiB
TypeScript

/* Metro module 6909; source: modules/mobile_web_handoff/MobileWebHandoffUtils.tsx; dependencies: [5, 661, 491, 507, 2] */
function _fun54998(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#54998, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7087:6, offset: 0x01372e40, size: 160 bytes, params: 8, frame: 18
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(5) /* metro dependency 5 */;
const env0_3 = (require(661) /* metro dependency 661: Constants */).Endpoints;
object2 = {generateNonce: generateNonce, createHandoffToken: function() {
return _createHandoffToken.apply(this, arguments);
}};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/mobile_web_handoff/MobileWebHandoffUtils.tsx');
exports.default = object2;
}
function _createHandoffToken() { // fn#54999, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7087:126, offset: 0x01372ee0, size: 48 bytes, params: 1, frame: 14
return env0_2(_fun55001).apply(this, arguments);
}
function generateNonce() { // fn#55002, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7087:436, offset: 0x01372fc1, size: 37 bytes, params: 1, frame: 11
return (require(491) /* metro dependency 491 */).v4();
}
function* _fun55001(a0) { // fn#55001, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7087:187, offset: 0x01372f19, size: 168 bytes, params: 2, frame: 14
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
const HTTP = env2_0(env2_1[3]).HTTP;
const post = HTTP.post;
const HANDOFF = env2_3.HANDOFF;
yield Reflect.apply(post, HTTP, [{'url': null, 'body': null, 'oldFormErrors': true, 'retries': 1,
'rejectWithError': false, url: HANDOFF, body: {key: a0}}]);
value = undefined;
if (false) {
return value;
}
const handoff_token = value.body.handoff_token;
if (handoff_token != null) {
return handoff_token;
}
const Error = global.Error;
throw new Error('Missing handoff token!');
}