Skip to content

Commit 9c2cd91

Browse files
committed
feat(coins): fixed input ordering
1 parent ad4cdf6 commit 9c2cd91

File tree

12 files changed

+44
-43
lines changed

12 files changed

+44
-43
lines changed

packages/blockchain-wallet-v4-frontend/src/data/preferences/sagaRegister.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { takeLatest } from 'redux-saga/effects'
22

3-
import { actions } from './slice'
43
import sagas from './sagas'
4+
import { actions } from './slice'
55

66
export default () => {
77
const preferencesSagas = sagas()

packages/blockchain-wallet-v4-frontend/src/layouts/Wallet/WalletLayout/WalletLayout.styles.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,4 +61,4 @@ const PageContent = styled.div<{ center: boolean }>`
6161
}
6262
`
6363

64-
export { PageContent, Container, Content, Nav, Wrapper }
64+
export { Container, Content, Nav, PageContent, Wrapper }

packages/blockchain-wallet-v4-frontend/src/layouts/Wallet/WalletLayout/index.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,23 @@ import React, { ReactElement } from 'react'
22
import { useIdleTimer } from 'react-idle-timer'
33
import { useDispatch, useSelector } from 'react-redux'
44

5+
import { getAutoLogoutTime } from '@core/redux/wallet/selectors'
56
import Alerts from 'components/Alerts'
67
import { ServiceAnnouncement, StaticAnnouncement } from 'components/Announcements'
78
import { SofiBanner, UkBanner, UkFooterBanner } from 'components/Banner'
89
import { CowboysCardComponent } from 'components/Card/CowboysCard'
910
import ExchangePromo from 'components/Card/ExchangePromo'
1011
import { SupportChatForGoldUserOnly } from 'components/SupportChat'
1112
import Tooltips from 'components/Tooltips'
13+
import { modals } from 'data/actions'
14+
import { RootState } from 'data/rootReducer'
1215
import { ModalName } from 'data/types'
1316
import ErrorBoundary from 'providers/ErrorBoundaryProvider'
1417

1518
import Modals from '../../../modals'
1619
import MenuLeft from '../MenuLeft'
1720
import MenuTop from '../MenuTop'
1821
import { Container, Content, Nav, PageContent, Wrapper } from './WalletLayout.styles'
19-
import { modals } from 'data/actions'
20-
import { RootState } from 'data/rootReducer'
21-
import { getAutoLogoutTime } from '@core/redux/wallet/selectors'
2222

2323
const WalletLayout = ({
2424
approvalDate,

packages/blockchain-wallet-v4-frontend/src/modals/Brokerage/Banks/Deposit/Confirm/DepositConfirm.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import React, { useCallback, useState } from 'react'
22
import { FormattedMessage } from 'react-intl'
33
import { useDispatch, useSelector } from 'react-redux'
4+
import { Padding } from '@blockchain-com/constellation'
45
import { addDays, format } from 'date-fns'
56
import styled from 'styled-components'
67

@@ -26,7 +27,7 @@ import {
2627
DepositTerms
2728
} from 'data/types'
2829
import { useShowConversionAlert } from 'hooks'
29-
import { Padding } from '@blockchain-com/constellation'
30+
3031
import { MoreInfoContainer } from './MoreInfoContainer'
3132

3233
// Auto margin top so it gets pushed to the bottom

packages/blockchain-wallet-v4-frontend/src/modals/Brokerage/Banks/Deposit/Confirm/MoreInfoContainer.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
import { Padding, Button, Text } from '@blockchain-com/constellation'
2-
import { FlyoutWrapper } from 'components/Flyout'
31
import React, { FC, ReactNode, useState } from 'react'
2+
import { Button, Padding, Text } from '@blockchain-com/constellation'
43
import styled from 'styled-components'
54

5+
import { FlyoutWrapper } from 'components/Flyout'
6+
67
const Container = styled(FlyoutWrapper)`
78
display: flex;
89
flex-direction: column;

packages/blockchain-wallet-v4-frontend/src/modals/Onboarding/KycVerification/ExtraFields/template.success.tsx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,14 @@ import { HeaderType, NodeItem, NodeItemTypes, NodeTextType } from '@core/types'
88
import { BlockchainLoader, Button, HeartbeatLoader, Icon, Text } from 'blockchain-info-components'
99
import { FlyoutWrapper } from 'components/Flyout'
1010
import CheckBox from 'components/Form/CheckBox'
11+
import DateInputBox from 'components/Form/DateInputBox'
1112
import Form from 'components/Form/Form'
1213
import FormGroup from 'components/Form/FormGroup'
1314
import FormItem from 'components/Form/FormItem'
1415
import SelectBox from 'components/Form/SelectBox'
1516
import TextBox from 'components/Form/TextBox'
16-
import DateInputBox from 'components/Form/DateInputBox'
17-
1817
import { model } from 'data'
19-
import { required, validFormat, ageOverEighteen } from 'services/forms'
18+
import { ageOverEighteen, required, validFormat } from 'services/forms'
2019

2120
import { Props as OwnProps, SuccessStateType } from '.'
2221
import { GetInputPlaceholder, GetNodeQuestionElements } from './model'
@@ -257,7 +256,6 @@ const Success: React.FC<InjectedFormProps<{}, Props> & Props> = (props) => {
257256
}
258257

259258
const onChangeInput = (e, value) => {
260-
console.log({ e, value })
261259
const itemId = e.currentTarget.name
262260

263261
const { blocking, context, nodes } = props.extraSteps
@@ -629,7 +627,6 @@ const Success: React.FC<InjectedFormProps<{}, Props> & Props> = (props) => {
629627
if (node.type === NodeItemTypes.DATE_SELECTION) {
630628
return RenderDateQuestion(node)
631629
}
632-
console.log('UNRECOGNIZED NODE_TYPE', node.type)
633630
return null
634631
})}
635632

packages/blockchain-wallet-v4-frontend/src/modals/RequestCrypto/ShowAddress/index.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ import { NetworkWarning, NetworkWarningVariant } from 'components/NetworkWarning
1313
import QRCodeWrapper from 'components/QRCode/Wrapper'
1414
import { actions, selectors } from 'data'
1515
import { SwapBaseCounterTypes } from 'data/types'
16+
17+
import { Props as OwnProps } from '../index'
18+
import { ClipboardWrapper } from '../model'
19+
import { RequestSteps } from '../types'
1620
import {
1721
AddressDisplay,
1822
AddressWrapper,
@@ -22,9 +26,6 @@ import {
2226
QRCodeContainer,
2327
Wrapper
2428
} from './styled'
25-
import { Props as OwnProps } from '../index'
26-
import { ClipboardWrapper } from '../model'
27-
import { RequestSteps } from '../types'
2829

2930
const { formatAddr, hasPrefix } = utils.bch
3031

packages/blockchain-wallet-v4-frontend/src/scenes/Prices/template.success.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ import styled from 'styled-components'
77

88
import { getCurrency } from '@core/redux/settings/selectors'
99
import { getCoinViewV2 } from '@core/redux/walletOptions/selectors'
10-
import { CellText, HeaderText, HeaderToggle, TableWrapper } from 'components/Table'
1110
import { getData as getUserCountry } from 'components/Banner/selectors'
11+
import { CellText, HeaderText, HeaderToggle, TableWrapper } from 'components/Table'
1212

1313
import { Props as _P, SuccessStateType as _S } from '.'
1414
import { getTableColumns } from './Table'
@@ -33,7 +33,7 @@ const PricesTable = (props: Props) => {
3333
const textFilter = useSelector((state) => formValueSelector('prices')(state, 'textFilter'))
3434
const walletCurrency = useSelector(getCurrency).getOrElse('USD')
3535
const isUkUser = isUserFromUK || isIpFromUK
36-
36+
3737
const {
3838
analyticsActions,
3939
buySellActions,

packages/blockchain-wallet-v4/src/network/api/kyc/types.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ export enum ExtraKYCContext {
1515
}
1616

1717
export enum NodeItemTypes {
18+
DATE_SELECTION = 'DATE_SELECTION',
1819
INFO = 'INFO',
1920
MULTIPLE_SELECTION = 'MULTIPLE_SELECTION',
2021
OPEN_ENDED = 'OPEN_ENDED',
2122
SELECTION = 'SELECTION',
2223
SINGLE_CHECKBOX = 'SINGLE_CHECKBOX',
23-
SINGLE_SELECTION = 'SINGLE_SELECTION',
24-
DATE_SELECTION = 'DATE_SELECTION'
24+
SINGLE_SELECTION = 'SINGLE_SELECTION'
2525
}
2626

2727
export type VerifiedType = {

packages/blockchain-wallet-v4/src/redux/data/bch/sagas.ts

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,23 @@ export default ({ api }: { api: APIType }) => {
4141
}
4242
}
4343

44+
const __processTxs = function* (txs) {
45+
// Page == Remote ([Tx])
46+
// Remote(wallet)
47+
const wallet = yield select(walletSelectors.getWallet)
48+
const walletR = Remote.of(wallet)
49+
const accountList = (yield select(getAccountsList)).getOrElse([])
50+
const txNotes = (yield select(getBchTxNotes)).getOrElse({})
51+
52+
// transformTx :: wallet -> Tx
53+
// ProcessPage :: wallet -> [Tx] -> [Tx]
54+
const ProcessTxs = (wallet, txList, txNotes) =>
55+
map(transformTx.bind(undefined, wallet.getOrFail(MISSING_WALLET), [], txNotes), txList)
56+
// ProcessRemotePage :: Page -> Page
57+
const processedTxs = ProcessTxs(walletR, txs, txNotes)
58+
return addFromToAccountNames(wallet, accountList, processedTxs)
59+
}
60+
4461
const fetchTransactions = function* (action) {
4562
try {
4663
const { payload } = action
@@ -95,23 +112,6 @@ export default ({ api }: { api: APIType }) => {
95112
}
96113
}
97114

98-
const __processTxs = function* (txs) {
99-
// Page == Remote ([Tx])
100-
// Remote(wallet)
101-
const wallet = yield select(walletSelectors.getWallet)
102-
const walletR = Remote.of(wallet)
103-
const accountList = (yield select(getAccountsList)).getOrElse([])
104-
const txNotes = (yield select(getBchTxNotes)).getOrElse({})
105-
106-
// transformTx :: wallet -> Tx
107-
// ProcessPage :: wallet -> [Tx] -> [Tx]
108-
const ProcessTxs = (wallet, txList, txNotes) =>
109-
map(transformTx.bind(undefined, wallet.getOrFail(MISSING_WALLET), [], txNotes), txList)
110-
// ProcessRemotePage :: Page -> Page
111-
const processedTxs = ProcessTxs(walletR, txs, txNotes)
112-
return addFromToAccountNames(wallet, accountList, processedTxs)
113-
}
114-
115115
const fetchTransactionHistory = function* ({ payload }) {
116116
const { address, end, start } = payload
117117
const startDate = format(new Date(start), 'dd/MM/yyyy')

0 commit comments

Comments
 (0)