@huma-finance/widgets 0.0.51-beta.231 → 0.0.51-beta.233

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.231+02beb77",
3
+ "version": "0.0.51-beta.233+9cee616",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -192,5 +192,5 @@
192
192
  "optionalDependencies": {
193
193
  "encoding": "^0.1.13"
194
194
  },
195
- "gitHead": "02beb77c96b2e55397ce34a3d0733b2cd0e51158"
195
+ "gitHead": "9cee61602fbd4290fa1248d1a58e234786cdb5de"
196
196
  }
@@ -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))