Skip to content

[Issue-2721] Extension - Fix bug show withdraw time (Round 2)#4846

Open
tunghp2002 wants to merge 5 commits into
subwallet-devfrom
koni/dev/issue-2721
Open

[Issue-2721] Extension - Fix bug show withdraw time (Round 2)#4846
tunghp2002 wants to merge 5 commits into
subwallet-devfrom
koni/dev/issue-2721

Conversation

@tunghp2002

Copy link
Copy Markdown

No description provided.

@saltict

saltict commented Nov 14, 2025

Copy link
Copy Markdown

🚀 Deployed on https://pr-4846--sw-web-runner.netlify.app

@saltict saltict temporarily deployed to pull request November 14, 2025 03:32 Inactive
@bluezdot bluezdot force-pushed the koni/dev/issue-2721 branch from 68de0ae to b841302 Compare November 14, 2025 05:24
@saltict saltict temporarily deployed to pull request November 14, 2025 05:36 Inactive
Comment thread packages/extension-koni-ui/src/Popup/Transaction/helper/earning/earningHandler.ts Outdated
Comment thread packages/extension-koni-ui/src/Popup/Transaction/helper/earning/earningHandler.ts Outdated
Comment thread packages/extension-koni-ui/src/Popup/Transaction/helper/earning/earningHandler.ts Outdated
const remainingTimeHr = remainingTimestampMs / 1000 / 60 / 60;

// Formatted waitting time without round up
// Example of _formattedWaitingTime: ...

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fill example

@@ -45,9 +45,9 @@ export function getWaitingTime (t: TFunction, currentTimestampMs: number, target
} else {
const remainingTimeHr = remainingTimestampMs / 1000 / 60 / 60;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Create
const MS_PER_HOUR = 60 * 60 * 1000; // 3600000

// Example of _formattedWaitingTime: ...
// eslint-disable-next-line @typescript-eslint/no-unsafe-call,@typescript-eslint/no-unsafe-assignment
const _formattedWaitingTime = humanizeDuration(remainingTimestampMs, {
const _formattedWaitingTime = humanizeDuration(82799000, {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix

// eslint-disable-next-line @typescript-eslint/no-unsafe-call,@typescript-eslint/no-unsafe-assignment
const _formattedWaitingTime = humanizeDuration(remainingTimestampMs, {
const _formattedWaitingTime = humanizeDuration(82799000, {
units: remainingTimeHr >= 24 ? ['d', 'h'] : ['h', 'm'],

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove remainingTimeHr and update condition

remainingTimeHr >= 24
=>
remainingTimestampMs >= MS_PER_HOUR

Comment thread packages/extension-koni-ui/src/Popup/Transaction/helper/earning/earningHandler.ts Outdated
@saltict saltict temporarily deployed to pull request November 14, 2025 07:59 Inactive
@saltict saltict temporarily deployed to pull request December 22, 2025 05:46 Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Extension - Fix bug show withdraw time (Round 2)

3 participants