Skip to content

Commit

Permalink
Merge branch 'development' of github.com:blockchain/blockchain-wallet…
Browse files Browse the repository at this point in the history
…-v4-frontend into development
  • Loading branch information
schnogz committed May 6, 2021
2 parents 66d4f18 + 615a59d commit 7990920
Show file tree
Hide file tree
Showing 14 changed files with 583 additions and 147 deletions.
90 changes: 74 additions & 16 deletions packages/blockchain-wallet-v4-frontend/src/assets/locales/de.json

Large diffs are not rendered by default.

56 changes: 33 additions & 23 deletions packages/blockchain-wallet-v4-frontend/src/assets/locales/en.json

Large diffs are not rendered by default.

90 changes: 74 additions & 16 deletions packages/blockchain-wallet-v4-frontend/src/assets/locales/es.json

Large diffs are not rendered by default.

90 changes: 74 additions & 16 deletions packages/blockchain-wallet-v4-frontend/src/assets/locales/fr.json

Large diffs are not rendered by default.

Expand Up @@ -1610,7 +1610,7 @@ type MessagesType = {
'modals.transfereth.txfee': 'Transaction Fee:'
'modals.tradinglimits.approved': 'Approved'
'modals.tradinglimits.description': 'Unlock features within your Blockchain.com Wallet. Some features may ask you to verify your identity.'
'modals.tradinglimits.more_info_needed': 'More Info Needed'
'modals.tradinglimits.info_needed': 'Info Needed'
'modals.tradinglimits.locked': 'Locked'
'modals.tradinglimits.silver_desc': 'You’ll need to verify your email address, name, home address and date of birth.'
'modals.tradinglimits.gold_desc_edd': 'We need more information before we can approve your Gold Level application.'
Expand Down
90 changes: 74 additions & 16 deletions packages/blockchain-wallet-v4-frontend/src/assets/locales/it.json

Large diffs are not rendered by default.

90 changes: 74 additions & 16 deletions packages/blockchain-wallet-v4-frontend/src/assets/locales/pt.json

Large diffs are not rendered by default.

90 changes: 74 additions & 16 deletions packages/blockchain-wallet-v4-frontend/src/assets/locales/ru.json

Large diffs are not rendered by default.

90 changes: 74 additions & 16 deletions packages/blockchain-wallet-v4-frontend/src/assets/locales/tr.json

Large diffs are not rendered by default.

Expand Up @@ -174,12 +174,12 @@ const getTierStatus = (
if (isEddQualified) {
return (
<StatusCartridge>
<OrangeCartridge fontSize='12px'>
<ErrorCartridge fontSize='12px'>
<FormattedMessage
id='modals.tradinglimits.more_info_needed'
defaultMessage='More Info Needed'
id='modals.tradinglimits.info_needed'
defaultMessage='Info Needed'
/>
</OrangeCartridge>
</ErrorCartridge>
</StatusCartridge>
)
}
Expand Down
Expand Up @@ -136,7 +136,9 @@ export const getMaxMin = (
let max = BigNumber.minimum(
method.limits.max,
isSddFlow ? sddLimit.max : pair.buyMax,
isSddFlow ? sddLimit.max : limitMaxAmount
isSddFlow
? sddLimit.max
: convertBaseToStandard('FIAT', limitMaxAmount, false)
).toString()

if (
Expand All @@ -158,6 +160,7 @@ export const getMaxMin = (
break
}
}

const maxFiat = convertBaseToStandard('FIAT', max)
const maxCrypto = getQuote(quote.pair, quote.rate, 'FIAT', maxFiat)

Expand All @@ -170,6 +173,7 @@ export const getMaxMin = (
convertBaseToStandard('FIAT', limitMinAmount)
)
const baseMinLimitAmount = Number(limits.minOrder)

if (baseMinLimitAmount > buyMinItem && !isSddFlow) {
limitMinAmount = baseMinLimitAmount
}
Expand Down Expand Up @@ -203,7 +207,9 @@ export const getMaxMin = (
const min = BigNumber.maximum(
method.limits.min,
pair.buyMin,
isSddFlow ? method.limits.min : limitMinAmount
isSddFlow
? method.limits.min
: convertBaseToStandard('FIAT', limitMinAmount, false)
).toString()

const minFiat = convertBaseToStandard('FIAT', min)
Expand Down
Expand Up @@ -107,6 +107,7 @@ class IntroCard extends PureComponent<
const {
analyticsActions,
idvActions,
interestEDDStatus,
interestRateArray,
isGoldTier,
preferencesActions,
Expand Down Expand Up @@ -138,8 +139,8 @@ class IntroCard extends PureComponent<

return (
<>
{this.renderAdditionalInfo()}
{showInterestInfoBox && (
{interestEDDStatus?.eddNeeded && this.renderAdditionalInfo()}
{showInterestInfoBox && !interestEDDStatus?.eddNeeded && (
<BoxStyled>
{isGoldTier ? (
<ContentWrapper>
Expand Down
Expand Up @@ -14,6 +14,7 @@ import {
import { Remote } from 'blockchain-wallet-v4/src'
import {
CoinType,
InterestEDDStatus,
InterestRateType,
RemoteDataType,
SupportedWalletCurrenciesType
Expand Down Expand Up @@ -149,6 +150,7 @@ export type StateType = {
}
export type SuccessStateType = {
instruments: Array<CoinType>
interestEDDStatus: InterestEDDStatus
interestRate: InterestRateType
interestRateArray: Array<number>
supportedCoins: SupportedWalletCurrenciesType
Expand Down
Expand Up @@ -9,17 +9,28 @@ export const getData = state => {
const instrumentsR = selectors.components.interest.getInterestInstruments(
state
)
const transform = (instruments, interestRate, supportedCoins, userData) => ({
const interestEDDStatusR = selectors.components.interest.getInterestEDDStatus(
state
)
const transform = (
instruments,
interestRate,
supportedCoins,
userData,
interestEDDStatus
) => ({
instruments,
interestRate,
interestRateArray: values(interestRate),
supportedCoins,
userData
userData,
interestEDDStatus
})
return lift(transform)(
instrumentsR,
interestRateR,
supportedCoinsR,
userDataR
userDataR,
interestEDDStatusR
)
}

0 comments on commit 7990920

Please sign in to comment.