Skip to content

Commit

Permalink
feat(sell): add info link to sell summary (#6183)
Browse files Browse the repository at this point in the history
  • Loading branch information
mperdomo-bc committed Dec 14, 2023
1 parent 8428a1e commit 08251b3
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 14 deletions.
3 changes: 2 additions & 1 deletion config/mocks/wallet-options-v4.json
Original file line number Diff line number Diff line change
Expand Up @@ -102,5 +102,6 @@
"walletHelper": "https://wallet-helper.blockchain.com",
"webSocket": "wss://ws.blockchain.info"
},
"bakktRedirectUSStates": ["US-HI", "US-LA", "US-NJ", "US-NV", "US-TN", "US-TX", "US-VA"]
"bakktRedirectUSStates": ["US-HI", "US-LA", "US-NJ", "US-NV", "US-TN", "US-TX", "US-VA"],
"fiatRemediationLearnMoreLink": "https://support.blockchain.com/hc/en-us"
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
import React from 'react'
import styled from 'styled-components'

import { Link } from 'blockchain-info-components'
import { Link, Text } from 'blockchain-info-components'

import { Wrapper } from './ActionFooter.styles'
export const Wrapper = styled(Text)`
display: flex;
flex-direction: column;
gap: 6px;
`

type Props = {
actions: { title: string; url: string }[]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ import { Status } from './StatusMessage'

const Success: React.FC<Props> = ({ handleClose }) => {
const sellOrder = useSelector(selectors.components.buySell.getSellOrder)
const conversionLearnMoreLink = useSelector(
selectors.core.walletOptions.getConversionLearnMoreLink
).getOrElse(undefined)

const sellBaseAmount = sellOrder && getSellBaseAmount(sellOrder)
const sellBaseCurrency = sellOrder ? getCoinFromPair(sellOrder.pair) : 'BTC'
Expand Down Expand Up @@ -136,10 +139,17 @@ const Success: React.FC<Props> = ({ handleClose }) => {
{showConversionDisclaimer && (
<DisclaimerText>
<FormattedMessage
id='modals.simplebuy.confirm.conversion_legalese'
defaultMessage='Your {coinName} ({symbol}) balance will be converted to USDC daily at 12:00 am UTC. To avoid any inconvenience buy crypto before the specified time.'
id='modals.simplebuy.sell.summary.conversion_legalese'
defaultMessage='Your {coinName} ({symbol}) balance will be converted to USDC daily at 12:00 am UTC. To avoid any inconvenience buy crypto before the specified time. {learnMoreElement}'
values={{
coinName: sellCurrencyName,
learnMoreElement: conversionLearnMoreLink ? (
<a href={conversionLearnMoreLink} target='_blank' rel='noreferrer'>
Learn More.
</a>
) : (
''
),
symbol: sellCounterCurrency
}}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ export const getWalletHelperDomain = (state) => getDomains(state).map(prop('wall
export const getBakktRedirectUSStates = (state: RootState) =>
getOptions(state).map((e) => e.bakktRedirectUSStates)

export const getConversionLearnMoreLink = (state: RootState) =>
getOptions(state).map((e) => e.fiatRemediationLearnMoreLink)

//
// FEATURE FLAG SELECTORS
//
Expand Down Expand Up @@ -227,5 +230,6 @@ export const getImportedAddressSweep = (state: RootState) =>
export const getProveEnabled = (state: RootState) =>
getWebOptions(state).map(path(['featureFlags', 'proveEnabled']))

// Fiat Remediation
export const getFiatEntityRemediationAlert = (state: RootState) =>
getWebOptions(state).map(path(['featureFlags', 'showFiatEntityRemediationAlert']))

0 comments on commit 08251b3

Please sign in to comment.