Skip to content

Commit

Permalink
[Issue-174] Update UX for checking NFT ownership
Browse files Browse the repository at this point in the history
  • Loading branch information
lw-cdm committed Nov 19, 2024
1 parent d331b25 commit bc92e4e
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion packages/extension-koni-ui/src/Popup/Home/Mission/TaskItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { WalletConnectContext } from '@subwallet/extension-koni-ui/contexts/Wall
import { useConfirmModal, useNotification, useSelector, useSetCurrentPage, useTranslation } from '@subwallet/extension-koni-ui/hooks';
import { wcSignMessageRequest } from '@subwallet/extension-koni-ui/messaging';
import { Theme, ThemeProps } from '@subwallet/extension-koni-ui/types';
import { customFormatDate, toDisplayNumber } from '@subwallet/extension-koni-ui/utils';
import { customFormatDate, noop, toDisplayNumber } from '@subwallet/extension-koni-ui/utils';
import { actionTaskOnChain } from '@subwallet/extension-koni-ui/utils/game/task';
import { Button, Icon, Image, SwModalFuncProps } from '@subwallet/react-ui';
import CN from 'classnames';
Expand Down Expand Up @@ -204,8 +204,20 @@ const _TaskItem = ({ actionReloadPoint, className, openWidget, reloadTask, task
await requireWC();
address = await connectWC();
} catch (e) {
const error = e as Error;

setTaskLoading(false);

if (error.message?.toLowerCase().includes('Unsupported chains'.toLowerCase())) {
telegramConnector.showPopup({
message: t('Your chosen wallet hasn’t supported Story Odyssey Testnet. Add network to your wallet or change to another wallet'),
buttons: [{
type: 'ok',
text: t('Got it')
}]
}, noop);
}

return;
}
}
Expand Down

0 comments on commit bc92e4e

Please sign in to comment.