squarefi-bff-api-module 1.24.2 → 1.24.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -39,6 +39,11 @@ function refreshTokens() {
|
|
|
39
39
|
const tg_id = (_a = sdk_react_1.initData.user()) === null || _a === void 0 ? void 0 : _a.id;
|
|
40
40
|
const hash = sdk_react_1.initData.hash();
|
|
41
41
|
const init_data_raw = sdk_react_1.initData.raw();
|
|
42
|
+
console.log('initData in tokensFactory', sdk_react_1.initData);
|
|
43
|
+
console.log('miniApp in tokensFactory', sdk_react_1.miniApp);
|
|
44
|
+
console.log('initData.user()', sdk_react_1.initData.user());
|
|
45
|
+
console.log('initData.hash()', sdk_react_1.initData.hash());
|
|
46
|
+
console.log('initData.raw()', sdk_react_1.initData.raw());
|
|
42
47
|
if (!tg_id || !hash || !init_data_raw) {
|
|
43
48
|
return Promise.reject(new Error('No TG ID, hash or init data raw found in tokensFactory'));
|
|
44
49
|
}
|
package/package.json
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { initData, isTMA } from '@telegram-apps/sdk-react';
|
|
1
|
+
import { initData, isTMA, miniApp } from '@telegram-apps/sdk-react';
|
|
2
2
|
|
|
3
3
|
import { deleteFromLocalStorage, getFromLocalStorage, setToLocalStorage } from './storage';
|
|
4
4
|
|
|
5
5
|
import { auth } from '../api/auth';
|
|
6
|
-
import { API } from '../api/types/types';
|
|
7
6
|
|
|
8
7
|
type ITokens = {
|
|
9
8
|
access_token: string;
|
|
@@ -37,6 +36,12 @@ export async function refreshTokens(): Promise<ITokens> {
|
|
|
37
36
|
const hash = initData.hash();
|
|
38
37
|
const init_data_raw = initData.raw();
|
|
39
38
|
|
|
39
|
+
console.log('initData in tokensFactory', initData);
|
|
40
|
+
console.log('miniApp in tokensFactory', miniApp);
|
|
41
|
+
console.log('initData.user()', initData.user());
|
|
42
|
+
console.log('initData.hash()', initData.hash());
|
|
43
|
+
console.log('initData.raw()', initData.raw());
|
|
44
|
+
|
|
40
45
|
if (!tg_id || !hash || !init_data_raw) {
|
|
41
46
|
return Promise.reject(new Error('No TG ID, hash or init data raw found in tokensFactory'));
|
|
42
47
|
}
|