From f7b45eb077850f29baa504507c9a12ac772539c4 Mon Sep 17 00:00:00 2001 From: Ilya Vilensky Date: Thu, 21 May 2020 12:33:12 +0300 Subject: [PATCH] Fix sending tx (#516) * Fixed sending tx * Fixed sending tx * Fixed sending tx * Fixed sending tx * Fixed sending tx Co-authored-by: Ilya --- app/components/node/Carousel.js | 4 +- app/components/transactions/TransactionRow.js | 4 +- app/components/wallet/TxConfirmation.js | 2 +- app/infra/cryptoService/index.js | 1 - app/infra/eventsService/eventsService.js | 13 +- app/infra/utils.js | 136 +--- app/redux/auth/actions.js | 2 - app/redux/wallet/actions.js | 64 +- app/screens/auth/CreateWallet.js | 2 +- app/screens/auth/WordsRestore.js | 11 +- app/screens/wallet/SendCoins.js | 2 +- app/vars/ipcConsts.js | 2 +- configs/webpack.config.base.js | 4 +- desktop/app.html | 10 - .../cryptoService.js | 41 +- desktop/main.dev.js | 13 +- desktop/transactionManager.js | 31 +- desktop/walletManager.js | 80 +- package-lock.json | 716 +++++++++++------- package.json | 11 +- 20 files changed, 628 insertions(+), 521 deletions(-) delete mode 100644 app/infra/cryptoService/index.js rename {app/infra/cryptoService => desktop}/cryptoService.js (76%) diff --git a/app/components/node/Carousel.js b/app/components/node/Carousel.js index 879529cd5..fb53989cf 100644 --- a/app/components/node/Carousel.js +++ b/app/components/node/Carousel.js @@ -3,7 +3,7 @@ import React, { Component } from 'react'; import styled from 'styled-components'; import { chevronLeftBlack, chevronRightBlack, chevronLeftGray, chevronRightGray } from '/assets/images'; import { smColors } from '/vars'; -import { formatNumber } from '/infra/utils'; +import { formatBytes } from '/infra/utils'; const SLIDE_WIDTH = 170; const SLIDE_MARGIN = 15; @@ -160,7 +160,7 @@ class Carousel extends Component { FREE SPACE...
- {formatNumber(element.availableDiskSpace)} GB + {formatBytes(element.availableDiskSpace)}
diff --git a/app/components/transactions/TransactionRow.js b/app/components/transactions/TransactionRow.js index 7c0e7ab8c..e0397f784 100644 --- a/app/components/transactions/TransactionRow.js +++ b/app/components/transactions/TransactionRow.js @@ -6,7 +6,7 @@ import { updateTransaction } from '/redux/wallet/actions'; import { chevronLeftBlack, chevronRightBlack, addContact } from '/assets/images'; import styled from 'styled-components'; import { Button } from '/basicComponents'; -import { getAbbreviatedText, formatTxId, getFormattedTimestamp, getAddress, formatSmidge } from '/infra/utils'; +import { getAbbreviatedText, getFormattedTimestamp, getAddress, formatSmidge } from '/infra/utils'; import { smColors } from '/vars'; import TX_STATUSES from '/vars/enums'; import type { Tx, Action } from '/types'; @@ -141,6 +141,8 @@ const TextArea = styled.textarea` margin-bottom: 10px; `; +const formatTxId = (id) => id && `0x${id.substring(0, 6)}`; + type Props = { updateTransaction: Action, tx: Tx, diff --git a/app/components/wallet/TxConfirmation.js b/app/components/wallet/TxConfirmation.js index 9e5729e3f..e5b274465 100644 --- a/app/components/wallet/TxConfirmation.js +++ b/app/components/wallet/TxConfirmation.js @@ -154,7 +154,7 @@ class TxConfirmation extends PureComponent { EDIT TRANSACTION -