Skip to content

Commit

Permalink
Merge pull request #78 from dhedge/feat/update-custom-locktime
Browse files Browse the repository at this point in the history
feat: update custom locktime duration
  • Loading branch information
D-Ig authored Aug 21, 2024
2 parents 64d461b + 3e815d3 commit a9868e4
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 7 deletions.
2 changes: 1 addition & 1 deletion packages/trading-widget/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@dhedge/trading-widget",
"version": "1.2.7",
"version": "1.2.8",
"type": "module",
"main": "index.js",
"module": "index.mjs",
Expand Down
5 changes: 2 additions & 3 deletions packages/trading-widget/src/core-kit/const/default-data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,15 @@ export const EXTREMELY_SHORT_POLLING_INTERVAL = 15_000
export const DEFAULT_RETRIES_NUMBER = 5

export const DEFAULT_LOCK_TIME = formatDuration({ hours: 24 })
export const CUSTOM_LOCK_TIME = formatDuration({ minutes: 15 })
export const EXTENDED_CUSTOM_LOCK_TIME = formatDuration({ minutes: 60 })
export const CUSTOM_LOCK_TIME = formatDuration({ minutes: 60 })

export const DEFAULT_DEPOSIT_LOCKTIME_MAP: Record<
ChainId,
Record<PoolDepositMethodName, string>
> = {
[optimism.id]: {
deposit: DEFAULT_LOCK_TIME,
depositWithCustomCooldown: EXTENDED_CUSTOM_LOCK_TIME,
depositWithCustomCooldown: CUSTOM_LOCK_TIME,
},
[polygon.id]: {
deposit: DEFAULT_LOCK_TIME,
Expand Down
1 change: 0 additions & 1 deletion packages/trading-widget/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ export {
DEFAULT_DEPOSIT_LOCKTIME_MAP,
DEFAULT_LOCK_TIME,
CUSTOM_LOCK_TIME,
EXTENDED_CUSTOM_LOCK_TIME,
DAI_POLYGON,
DAI_OPTIMISM,
BRIDGED_USDC_POLYGON,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import {
CUSTOM_LOCK_TIME,
DEFAULT_LOCK_TIME,
DEFAULT_WITHDRAW_SLIPPAGE_SCALE,
EXTENDED_CUSTOM_LOCK_TIME,
arbitrum,
base,
optimism,
Expand All @@ -27,7 +26,7 @@ export const DEFAULT_CONFIG_PARAMS: ConfigProviderParams = {
defaultLockTime: DEFAULT_LOCK_TIME,
chainCustomLockTimeMap: {
[arbitrum.id]: CUSTOM_LOCK_TIME,
[optimism.id]: EXTENDED_CUSTOM_LOCK_TIME,
[optimism.id]: CUSTOM_LOCK_TIME,
[polygon.id]: CUSTOM_LOCK_TIME,
[base.id]: CUSTOM_LOCK_TIME,
},
Expand Down

0 comments on commit a9868e4

Please sign in to comment.