-
Notifications
You must be signed in to change notification settings - Fork 249
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
added support for big numbers and sending > 9007 XCH #642
Conversation
This pull request introduces 7 alerts when merging 2fbdb3e into 672cf2a - view on LGTM.com new alerts:
|
There are a small number of files that still use |
@@ -145,7 +146,8 @@ function generateTransactionGraphData( | |||
TransactionType.OUTGOING_TRADE, | |||
].includes(type); | |||
|
|||
const value = (amount + feeAmount) * (isOutgoing ? -1 : 1); | |||
const total = BigNumber(amount).plus(BigNumber(feeAmount)); | |||
const value = isOutgoing ? total.negated() : total; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think some comment should be added.
I expect if isOutgoing === false
then it is incoming
, but readers may not be sure about this assumption.
@@ -196,8 +202,8 @@ function prepareGraphPoints( | |||
const points = [ | |||
{ | |||
x: peakTransaction.confirmedAtHeight, | |||
y: Math.max(0, Number(mojoToChia(start))), | |||
tooltip: mojoToChia(balance), | |||
y: BigNumber.max(0, mojoToChia(start)).toNumber(), // max 21,000,000 safe to number |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -208,8 +214,8 @@ function prepareGraphPoints( | |||
|
|||
points.push({ | |||
x: timestamp, | |||
y: Math.max(0, Number(mojoToChia(start))), | |||
tooltip: mojoToChia(start), | |||
y: BigNumber.max(0, mojoToChia(start)).toNumber(), // max 21,000,000 safe to number |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The same with above comment.
@@ -4,7 +4,7 @@ import { Trans } from '@lingui/macro'; | |||
import moment from 'moment'; | |||
import { Box, IconButton, Table as TableBase, TableBody, TableCell, TableRow, Tooltip, Typography, Chip } from '@material-ui/core'; | |||
import { CallReceived as CallReceivedIcon, CallMade as CallMadeIcon, ExpandLess as ExpandLessIcon, ExpandMore as ExpandMoreIcon } from '@material-ui/icons'; | |||
import { Card, CardKeyValue, CopyToClipboard, Flex, Loading, StateColor, TableControlled, toBech32m, useCurrencyCode, mojoToChiaLocaleString, mojoToCATLocaleString } from '@chia/core'; | |||
import { Card, CardKeyValue, CopyToClipboard, Flex, Loading, StateColor, TableControlled, toBech32m, useCurrencyCode, mojoToChia, mojoToCAT, FormatLargeNumber } from '@chia/core'; | |||
import { useGetOfferRecordMutation, useGetSyncStatusQuery } from '@chia/api-react'; | |||
import styled from 'styled-components'; | |||
import type { Row } from '@chia/core'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems Row
is not exported from @chia/core
.
packages/core/index.ts
export * from './components'; export * from './constants'; export * from './utils'; export * from './hooks'; export * from './theme'; export * from './screens'; export * as locales from './locales';
packages/core/components/index.ts
... export { default as Table, TableControlled } from './Table'; ...
packages/core/components/Table/index.ts
export { default } from './Table'; export { default as TableControlled } from './TableControlled';
packages/wallets/src/components/offers/OfferEditorRowData.ts
packages/wallets/src/components/offers/OfferEditorConditionsPanel.tsx
packages/gui/src/components/block/Block.jsx
packages/gui/src/components/farm/card/FarmCardBlockRewards.tsx
packages/wallets/src/components/did/WalletDID.tsx
packages/gui/src/util/chia.js
packages/gui/src/types/Transaction.ts
packages/api-react/src/services/wallet.ts |
This pull request introduces 7 alerts when merging 90ea447 into 672cf2a - view on LGTM.com new alerts:
|
This pull request introduces 7 alerts when merging d00b450 into 672cf2a - view on LGTM.com new alerts:
|
This pull request introduces 1 alert when merging e049ded into 85e2e98 - view on LGTM.com new alerts:
|
This pull request introduces 1 alert when merging 596c6d3 into f8f218c - view on LGTM.com new alerts:
|
This pull request introduces 1 alert when merging 50dd2e6 into cdfa2b9 - view on LGTM.com new alerts:
|
added support for big numbers and sending more than 9007 XCH
fixed formatting for big numbers