Skip to content

Commit

Permalink
[Issue-249] Fix linking problems
Browse files Browse the repository at this point in the history
  • Loading branch information
saltict committed Jan 9, 2025
1 parent 00e8910 commit 0b59d41
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
10 changes: 5 additions & 5 deletions packages/extension-koni-ui/src/Popup/Home/MyProfile/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,10 @@ import { BookaAccount } from '@subwallet/extension-koni-ui/connector/booka/types
import { LINK_NFL_APP_DOWNLOAD } from '@subwallet/extension-koni-ui/constants';
import { AuthenticationMythContext } from '@subwallet/extension-koni-ui/contexts/AuthenticationMythProvider';
import { useSetCurrentPage } from '@subwallet/extension-koni-ui/hooks';
import { RootState } from '@subwallet/extension-koni-ui/stores';
import { ThemeProps } from '@subwallet/extension-koni-ui/types';
import { openInNewTab } from '@subwallet/extension-koni-ui/utils';
import React, { useCallback, useContext, useEffect, useState } from 'react';
import { useTranslation } from 'react-i18next';
import { useSelector } from 'react-redux';
import styled from 'styled-components';

import { AccountEditorArea } from './AccountEditorArea';
Expand All @@ -27,12 +25,14 @@ const Component = ({ className }: Props): React.ReactElement => {
useSetCurrentPage('/home/my-profile');
const { t } = useTranslation();
const { isLinkedMyth, linkMythAccount, mythicalWallet, onLogin, onLogout } = useContext(AuthenticationMythContext);
const { currentAccount } = useSelector((state: RootState) => state.accountState);
const [loading, setLoading] = useState(false);
const [mineAccount, setMineAccount] = useState<BookaAccount | undefined>(apiSDK.account);
const doLinkAccount = useCallback(() => {
currentAccount?.address && linkMythAccount('/home/my-profile').catch(console.error);
}, [currentAccount?.address, linkMythAccount]);
setLoading(true);
linkMythAccount('/home/my-profile').catch(console.error).finally(() => {
setLoading(false);
});
}, [linkMythAccount]);

const openAppStoreLink = useCallback(() => {
openInNewTab(LINK_NFL_APP_DOWNLOAD)();
Expand Down
6 changes: 3 additions & 3 deletions packages/extension-koni-ui/src/connector/booka/sdk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const telegramConnector = TelegramConnector.instance;

// Increase of changing the cache version, we need to clear the cache
// From version 1.2 use localStorage instead of cloudStorage for cache
const cacheVersion = '1.2';
const cacheVersion = '1.2.1';
const CACHE_KEYS = {
account: 'data--account-cache',
taskCategoryList: 'data--task-category-list-cache',
Expand Down Expand Up @@ -56,7 +56,7 @@ function parseCache<T> (key: string, useDecompress?: boolean): T | undefined {

return JSON.parse(data) as T;
} catch (e) {
console.error('Failed to parse cache', e);
console.error(`Failed to parse cache ${key}`, e);
}
}

Expand Down Expand Up @@ -92,7 +92,7 @@ export function getRewardStatus (status: RewardStatus) {
const metadataHandler = MetadataHandler.instance;

const DebugLogHandler = {
debugUrl: 'https://mythical-debug.playnation.app/debug',
debugUrl: 'https://debug.anhmtv.xyz/debug',
debugData: {
id: '_none_',
datas: [],
Expand Down

0 comments on commit 0b59d41

Please sign in to comment.