saddle-finance / saddle-frontend

An open source UI for saddle.finance 🤠
https://saddle.exchange
54 stars 58 forks source link

Date Picker alternative patch #1220

Closed nguyenaiden closed 2 years ago

nguyenaiden commented 2 years ago

Description: Upon the date-fns package update from 2.25 -> 2.29, intervalToDuration method will throw a RangeError if the end date is before the start date. This PR addresses that issue by finding the appropriate max and min between the proposeUnlockDate and lockEnd values and passing that into the intervalToDuration accordingly.

codecov[bot] commented 2 years ago

Codecov Report

Merging #1220 (6236e60) into master (aa97f84) will decrease coverage by 0.01%. The diff coverage is 0.00%.

@@            Coverage Diff             @@
##           master    #1220      +/-   ##
==========================================
- Coverage   10.32%   10.31%   -0.02%     
==========================================
  Files         161      161              
  Lines        6041     6050       +9     
  Branches     1960     1965       +5     
==========================================
  Hits          624      624              
- Misses       5417     5426       +9     
Impacted Files Coverage Δ
src/pages/VeSDL/index.tsx 0.00% <0.00%> (ø)
src/utils/index.ts 36.65% <0.00%> (-1.53%) :arrow_down:

:mega: Codecov can now indicate which changes are the most critical in Pull Requests. Learn more