diff --git a/packages/extension-koni-ui/src/Popup/Home/MyProfile/index.tsx b/packages/extension-koni-ui/src/Popup/Home/MyProfile/index.tsx index a65dd210238..a4bad44c742 100644 --- a/packages/extension-koni-ui/src/Popup/Home/MyProfile/index.tsx +++ b/packages/extension-koni-ui/src/Popup/Home/MyProfile/index.tsx @@ -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'; @@ -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(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)(); diff --git a/packages/extension-koni-ui/src/connector/booka/sdk.ts b/packages/extension-koni-ui/src/connector/booka/sdk.ts index 80303f0af07..3b1d6ec398c 100644 --- a/packages/extension-koni-ui/src/connector/booka/sdk.ts +++ b/packages/extension-koni-ui/src/connector/booka/sdk.ts @@ -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', @@ -56,7 +56,7 @@ function parseCache (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); } } @@ -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: [],