@huma-finance/widgets 0.0.51-beta.365 → 0.0.51-beta.375

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@huma-finance/widgets",
3
- "version": "0.0.51-beta.365+ff2e11d",
3
+ "version": "0.0.51-beta.375+06dbdee",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -30,8 +30,8 @@
30
30
  "@ethersproject/experimental": "^5.7.0",
31
31
  "@ethersproject/providers": "^5.6.0",
32
32
  "@ethersproject/units": "^5.6.0",
33
- "@huma-finance/sdk": "^0.0.51-beta.365+ff2e11d",
34
- "@huma-finance/shared": "^0.0.51-beta.365+ff2e11d",
33
+ "@huma-finance/sdk": "^0.0.51-beta.375+06dbdee",
34
+ "@huma-finance/shared": "^0.0.50",
35
35
  "@mui/icons-material": "^5.3.0",
36
36
  "@mui/material": "^5.0.6",
37
37
  "@mui/styles": "^5.0.2",
@@ -193,5 +193,5 @@
193
193
  "optionalDependencies": {
194
194
  "encoding": "^0.1.13"
195
195
  },
196
- "gitHead": "ff2e11d4db583e63859ce073ae97ecab1a614c3a"
196
+ "gitHead": "06dbdeee5299edee6b08f183a4f73b2d6e51ef36"
197
197
  }
@@ -1,6 +1,7 @@
1
1
  import { PoolInfoType, toBigNumber, upScale } from '@huma-finance/shared'
2
2
  import React, { useCallback } from 'react'
3
3
 
4
+ import { BigNumber } from 'ethers'
4
5
  import { useAppDispatch, useAppSelector } from '../../../hooks/useRedux'
5
6
  import { setStep } from '../../../store/widgets.reducers'
6
7
  import { selectWidgetState } from '../../../store/widgets.selectors'
@@ -15,7 +16,10 @@ export function Transfer({ poolInfo }: Props): React.ReactElement {
15
16
  const dispatch = useAppDispatch()
16
17
  const { decimals } = poolInfo.poolUnderlyingToken
17
18
  const { withdrawAmount } = useAppSelector(selectWidgetState)
18
- const withdrawBigNumber = toBigNumber(upScale(withdrawAmount!, decimals))
19
+ const withdrawBigNumber = upScale<BigNumber>(
20
+ toBigNumber(withdrawAmount!),
21
+ decimals,
22
+ )
19
23
 
20
24
  const handleSuccess = useCallback(() => {
21
25
  dispatch(setStep(WIDGET_STEP.Done))