@huma-finance/widgets 0.0.21 → 0.0.22

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.21",
3
+ "version": "0.0.22",
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.21",
34
- "@huma-finance/shared": "^0.0.21",
33
+ "@huma-finance/sdk": "^0.0.22",
34
+ "@huma-finance/shared": "^0.0.22",
35
35
  "@mui/icons-material": "^5.3.0",
36
36
  "@mui/material": "^5.0.6",
37
37
  "@mui/styles": "^5.0.2",
@@ -191,5 +191,5 @@
191
191
  "optionalDependencies": {
192
192
  "encoding": "^0.1.13"
193
193
  },
194
- "gitHead": "b7f7bb87941541df346e61eff2682f7c8f129388"
194
+ "gitHead": "4488ae1ea6d6161e7a459bff435ccbbe35fab3b3"
195
195
  }
@@ -1,14 +1,15 @@
1
1
  import { gql, useQuery } from '@apollo/client'
2
- import { Box, css } from '@mui/material'
3
- import { useWeb3React } from '@web3-react/core'
4
2
  import {
5
3
  CreditEvent,
6
4
  CreditEventText,
7
5
  downScale,
6
+ isEmpty,
8
7
  PoolInfoType,
9
8
  timeUtil,
10
9
  useMQ,
11
10
  } from '@huma-finance/shared'
11
+ import { Box, css } from '@mui/material'
12
+ import { useWeb3React } from '@web3-react/core'
12
13
  import { useEffect, useState } from 'react'
13
14
 
14
15
  import { HumaTable } from './HumaTable'
@@ -47,7 +48,15 @@ type ActivityDataType = {
47
48
 
48
49
  const columns = [
49
50
  { title: 'Action', dataIndex: 'eventText', noSeparator: true },
50
- { title: 'Amount', dataIndex: 'amount' },
51
+ {
52
+ title: 'Amount',
53
+ action: (record: { amount: string }) => {
54
+ if (isEmpty(record.amount) || Number.isNaN(record.amount)) {
55
+ return ''
56
+ }
57
+ return Number(record.amount).toFixed(2)
58
+ },
59
+ },
51
60
  { title: 'Date', dataIndex: 'timestamp' },
52
61
  ]
53
62
 
@@ -30,7 +30,7 @@ export function ConfirmTransfer(): React.ReactElement | null {
30
30
  rightText: 'You',
31
31
  },
32
32
  ]}
33
- actionText='Approve Transfer'
33
+ actionText='APPROVE TRANSFER'
34
34
  handleAction={handleAction}
35
35
  />
36
36
  )
@@ -97,7 +97,7 @@ export function ConfirmTransfer(): React.ReactElement | null {
97
97
  </Box>
98
98
  </Box>
99
99
  <Button variant='contained' css={styles.okButton} onClick={handleAction}>
100
- Approve Transfer
100
+ APPROVE TRANSFER
101
101
  </Button>
102
102
  </Box>
103
103
  )
@@ -35,7 +35,7 @@ export function ConfirmTransfer(): React.ReactElement | null {
35
35
  rightText: 'You',
36
36
  },
37
37
  ]}
38
- actionText='Approve Transfer'
38
+ actionText='APPROVE TRANSFER'
39
39
  handleAction={handleAction}
40
40
  />
41
41
  )