diff --git a/packages/extension-koni-ui/src/Popup/Home/Mission/TaskItem.tsx b/packages/extension-koni-ui/src/Popup/Home/Mission/TaskItem.tsx index d5cb6ec301..b1d6ca6527 100644 --- a/packages/extension-koni-ui/src/Popup/Home/Mission/TaskItem.tsx +++ b/packages/extension-koni-ui/src/Popup/Home/Mission/TaskItem.tsx @@ -121,6 +121,7 @@ const _TaskItem = ({ actionReloadPoint, className, task }: Props): React.ReactEl console.error('shareLeaderboard', e); } } + apiSDK.finishTask(taskId, extrinsicHash, networkKey) .finally(() => { setTaskLoading(false); @@ -137,14 +138,14 @@ const _TaskItem = ({ actionReloadPoint, className, task }: Props): React.ReactEl setTimeout(async () => { let urlRedirect = task.url; - if (urlRedirect) { - if (shareLeaderboard && shareLeaderboard.content) { - const startEnv = shareLeaderboard.start_time; - const endEnv = shareLeaderboard.end_time; + if (shareLeaderboard && shareLeaderboard.content) { + const startEnv = shareLeaderboard.start_time; + const endEnv = shareLeaderboard.end_time; - urlRedirect = await apiSDK.getShareTwitterURL(startEnv, endEnv, shareLeaderboard.content, task.gameId ?? 0, shareLeaderboard.url); - } + urlRedirect = await apiSDK.getShareTwitterURL(startEnv, endEnv, shareLeaderboard.content, task.gameId ?? 0, shareLeaderboard.url); + } + if (urlRedirect) { telegramConnector.openLink(urlRedirect); } }, 100);