-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update estimated time for processing of small deposits to 2 hours (#900)
The deposit duration for small deposits was increased from 1 hour to 2 hours. This change was made to reflect the actual time it takes for small deposits to be processed. We observed that small deposits generally take 1.5 hours to finalize, so we decided to round up for a better user experience. Closes: #884
- Loading branch information
Showing
2 changed files
with
76 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
import { describe, expect, it } from "vitest" | ||
import { getEstimatedDuration } from "../activities" | ||
|
||
describe("Utils functions for activities", () => { | ||
describe("getEstimatedDuration", () => { | ||
describe("withdraw", () => { | ||
describe.each([ | ||
// 0.01 BTC | ||
{ value: 0.01, expectedResult: "6 hours" }, | ||
// 0.1 BTC | ||
{ value: 0.1, expectedResult: "6 hours" }, | ||
// 1 BTC | ||
{ value: 1, expectedResult: "6 hours" }, | ||
// 10 BTC | ||
{ value: 10, expectedResult: "6 hours" }, | ||
])("when it is $value BTC", ({ value, expectedResult }) => { | ||
it(`should return ${expectedResult}`, () => { | ||
expect(getEstimatedDuration(BigInt(value * 1e8), "withdraw")).toEqual( | ||
expectedResult, | ||
) | ||
}) | ||
}) | ||
}) | ||
|
||
describe("deposit", () => { | ||
describe.each([ | ||
// 0.0001 BTC | ||
{ value: 0.0001, expectedResult: "2 hours" }, | ||
// 0.001 BTC | ||
{ value: 0.001, expectedResult: "2 hours" }, | ||
// 0.01 BTC | ||
{ value: 0.01, expectedResult: "2 hours" }, | ||
// 0.09 BTC | ||
{ value: 0.09, expectedResult: "2 hours" }, | ||
// 0.1 BTC | ||
{ value: 0.1, expectedResult: "2 hours" }, | ||
// 0.9 BTC | ||
{ value: 0.9, expectedResult: "2 hours" }, | ||
// 1 BTC | ||
{ value: 1, expectedResult: "3 hours" }, | ||
// 10 BTC | ||
{ value: 10, expectedResult: "3 hours" }, | ||
])("when it is $value BTC", ({ value, expectedResult }) => { | ||
it(`should return ${expectedResult}`, () => { | ||
expect(getEstimatedDuration(BigInt(value * 1e8), "deposit")).toEqual( | ||
expectedResult, | ||
) | ||
}) | ||
}) | ||
}) | ||
}) | ||
}) |