Skip to content

Commit

Permalink
style(Swap): renamed exchange to swap
Browse files Browse the repository at this point in the history
  • Loading branch information
tony-blockchain committed Dec 13, 2018
1 parent 9178bba commit 296ee03
Show file tree
Hide file tree
Showing 26 changed files with 70 additions and 86 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ describe('Profile Settings', () => {
<TestBed withRouter={true} store={store}>
<Switch>
<Route exact path='/' children={() => <Banner />} />
<Route path='/exchange' component={ExchangeStub} />
<Route path='/swap' component={ExchangeStub} />
</Switch>
</TestBed>
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ export const KYCBanner = ({
[KYC_STATES.UNDER_REVIEW]: null,
[KYC_STATES.REJECTED]: null,
[KYC_STATES.VERIFIED]: (
<LinkContainer to={'/exchange'}>
<LinkContainer to={'/swap'}>
<ActionButton nature='primary'>
<FormattedMessage
id='components.identityverification.popup.button.getstarted'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ export const OrderNote = ({ status }) => {
return (
<FormattedMessage
id='components.orderstatus.note.failed'
defaultMessage='This trade has failed. If any funds have been broadcast from your wallet, they will be returned automatically minus the network fee. Please return to the exchange tab to start a new trade.'
defaultMessage='This trade has failed. If any funds have been broadcast from your wallet, they will be returned automatically minus the network fee. Please return to the swap tab to start a new trade.'
/>
)
case 'no_deposits':
Expand All @@ -144,14 +144,14 @@ export const OrderNote = ({ status }) => {
return (
<FormattedMessage
id='components.orderstatus.note.refunded'
defaultMessage='We have refunded your wallet after the trade failed. Please return to the exchange tab to start a new trade.'
defaultMessage='We have refunded your wallet after the trade failed. Please return to the swap tab to start a new trade.'
/>
)
case EXPIRED:
return (
<FormattedMessage
id='components.orderstatus.note.expired_exchange'
defaultMessage='This exchange has expired as we have still not received your funds. If we receive your funds we will complete your trade. If you require further assistance please contact support.'
defaultMessage='This swap has expired as we have still not received your funds. If we receive your funds we will complete your trade. If you require further assistance please contact support.'
/>
)
default:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export default ({ api }) => {
if (test(/cash/, text)) return yield call(api.logClick, 'bch')
if (test(/stellar/, text)) return yield call(api.logClick, 'xlm')
if (test(/(buy|sell)/, text)) return yield call(api.logClick, 'buysell')
if (test(/exchange/, text)) return yield call(api.logClick, 'exchange')
if (test(/swap/, text)) return yield call(api.logClick, 'swap')
if (test(/lockbox/, text)) return yield call(api.logClick, 'lockbox')
if (test(/security/, text)) return yield call(api.logClick, 'security')
if (test(/settings/, text)) return yield call(api.logClick, 'settings')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -677,7 +677,7 @@ export default ({ api, coreSagas, networks }) => {
}

yield put(actions.form.stopSubmit(CONFIRM_FORM))
yield put(actions.router.push('/exchange/history'))
yield put(actions.router.push('/swap/history'))
yield put(A.setStep(EXCHANGE_STEPS.EXCHANGE_FORM))
yield put(
actions.modals.showModal(RESULTS_MODAL, formatExchangeTrade(trade))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export default ({ api }) => {
yield put(A.syncOnfidoSuccess())
yield put(actions.modules.profile.fetchUser())
yield put(actions.modals.closeAllModals())
yield put(actions.router.push('/exchange'))
yield put(actions.router.push('/swap'))
yield put(actions.analytics.logKycEvent(COMPLETE))
} catch (error) {
yield put(A.syncOnfidoError(error))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ describe('syncOnfido', () => {
.put(A.syncOnfidoSuccess())
.put(actions.modules.profile.fetchUser())
.put(actions.modals.closeAllModals())
.put(actions.router.push('/exchange'))
.put(actions.router.push('/swap'))
.put(actions.analytics.logKycEvent(COMPLETE))
.run()
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,12 @@ const Navigation = props => {
/>
</MenuItem>
</LinkContainer>
<LinkContainer to='/exchange' activeClassName='active'>
<LinkContainer to='/swap' activeClassName='active'>
<MenuItem data-e2e='exchangeLink'>
<Icon name='nav-switch' />
<FormattedMessage
id='layouts.wallet.menuleft.navigation.exchange'
defaultMessage='Exchange'
id='layouts.wallet.menuleft.navigation.swap'
defaultMessage='Swap'
/>
<NewCartridge>
<FormattedMessage
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const FaqContent = [
/>
<span>&nbsp;</span>
<NavLink
to='/exchange'
to='/swap'
style={{
textDecoration: 'none',
color: Color('brand-secondary')
Expand Down Expand Up @@ -260,7 +260,7 @@ const FaqContent = [
/>
<span>&nbsp;</span>
<NavLink
to='/exchange'
to='/swap'
style={{
textDecoration: 'none',
color: Color('brand-secondary')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,11 +144,11 @@ export const ExchangeByBlockchain = ({ kycNotFinished, verifyIdentity }) => (
</GetStartedButton>
)}
{!kycNotFinished && (
<LinkContainer to='/exchange'>
<LinkContainer to='/swap'>
<GetStartedButton>
<FormattedMessage
id='layouts.wallet.trayright.whatsnew.whatsnewcontent.exchangebyblockchain.gotoexchange'
defaultMessage='Go To Exchange'
id='layouts.wallet.trayright.whatsnew.whatsnewcontent.exchangebyblockchain.makeswap'
defaultMessage='Make Swap'
/>
</GetStartedButton>
</LinkContainer>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ exports[`ExchangeByBlockchain renders correctly with exchange link 1`] = `
exact={false}
replace={false}
strict={false}
to="/exchange"
to="/swap"
>
<ExchangeByBlockchain__GetStartedButton>
<FormattedMessage
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,9 @@ const WalletLayout = props => {
{location.pathname.includes('/xlm/transactions') && (
<Menu coin='XLM' />
)}
{location.pathname.includes('/exchange') && (
{location.pathname.includes('/swap') && (
<ExchangeMenu
historySelected={location.pathname.includes(
'/exchange/history'
)}
historySelected={location.pathname.includes('/swap/history')}
/>
)}
{location.pathname.includes('/lockbox') && <LockboxMenu />}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,22 +62,22 @@ class SwapGetStarted extends React.PureComponent {
<Header>
<Text color='white' size='24px' weight={500}>
<FormattedMessage
defaultMessage="We've Improved"
id='modals.swapgetstarted.improved'
defaultMessage="It's Your Crypto"
id='modals.swapgetstarted.its_your_crypto'
/>
</Text>
<Text color='white' size='24px' weight={500}>
<FormattedMessage
defaultMessage='Your Exchange'
id='modals.swapgetstarted.exchange'
defaultMessage='Swap Your Crypto'
id='modals.swapgetstarted.swap_your_crypto'
/>
</Text>
</Header>
<Body>
<Text size='18px' weight={400}>
<FormattedMessage
defaultMessage='The faster, smarter way to trade your crypto. Check it out!'
id='modals.swapgetstarted.description'
defaultMessage='Announcing Swap by Blockchain - the faster, smarter way to Swap your crypto.'
id='modals.swapgetstarted.announcement'
/>
</Text>
</Body>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ export const NoAccountTemplate = () => (
</FormGroup>
<FormGroup>
<LinkContainer
to={{ pathname: '/exchange', state: { from: 'BTC', to: 'XLM' } }}
to={{ pathname: '/swap', state: { from: 'BTC', to: 'XLM' } }}
>
<Button type='submit' nature='primary' uppercase fullwidth>
<FormattedMessage
id='modals.sendxlm.firststep.exchange'
defaultMessage='Exchange for XLM'
id='modals.sendxlm.firststep.swap'
defaultMessage='Swap for XLM'
/>
</Button>
</LinkContainer>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,10 +163,10 @@ const getLimitsError = (errorType, limits, curr, setMax, setMin, changeTab) => {
</Link>
)
const exchangeLink = (
<NavLink to='/exchange' style={{ textDecoration: 'none' }}>
<NavLink to='/swap' style={{ textDecoration: 'none' }}>
<FormattedMessage
id='buy.quote_input.effective_max_under_min5'
defaultMessage='exchanging'
defaultMessage='swapping'
/>
</NavLink>
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ class SubmitButton extends React.PureComponent {
const {
blockLockbox,
disabled,
sourceCoin,
targetCoin,
txError,
volume,
asyncValidating,
Expand Down Expand Up @@ -52,12 +50,8 @@ class SubmitButton extends React.PureComponent {
>
{!disabled && !asyncValidating && !submitting ? (
<FormattedMessage
id='scenes.exchange.exchangeform.exchange'
defaultMessage='Exchange {source} for {target}'
values={{
source: sourceCoin,
target: targetCoin
}}
id='scenes.exchange.exchangeform.swap'
defaultMessage='Swap'
/>
) : (
<HeartbeatLoader height='20px' width='20px' color='white' />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,8 @@ export class Summary extends React.PureComponent {
<TableRow>
<AmountHeader>
<FormattedMessage
id='scenes.exchange.exchangeform.summary.deposit'
defaultMessage='Exchange {coin}'
values={{
coin: sourceCoin
}}
id='scenes.exchange.exchangeform.summary.swap'
defaultMessage='Swap'
/>
</AmountHeader>
<ExchangeAmount>
Expand All @@ -54,11 +51,8 @@ export class Summary extends React.PureComponent {
<TableRow>
<AmountHeader>
<FormattedMessage
id='scenes.exchange.exchangeform.summary.receive'
defaultMessage='Receive {coin}'
values={{
coin: targetCoin
}}
id='scenes.exchange.exchangeform.summary.to'
defaultMessage='Receive'
/>
</AmountHeader>
<ExchangeAmount>
Expand All @@ -77,8 +71,8 @@ export class Summary extends React.PureComponent {
<TableRow>
<ExchangeText>
<FormattedMessage
id='scenes.exchange.exchangeform.summary.fee'
defaultMessage='Network Fee'
id='scenes.exchange.exchangeform.summary.fees'
defaultMessage='Fees'
/>
</ExchangeText>
<ExchangeAmount>
Expand All @@ -92,8 +86,8 @@ export class Summary extends React.PureComponent {
<TableRow>
<ExchangeText>
<FormattedMessage
id='scenes.exchange.exchangeform.summary.value'
defaultMessage='~ Total Value'
id='scenes.exchange.exchangeform.summary.swapvalue'
defaultMessage='Swap Value'
/>
</ExchangeText>
<ExchangeAmount>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -216,8 +216,8 @@ const Success = ({
weight={400}
>
<FormattedMessage
id='scenes.exchange.exchangeform.from'
defaultMessage='Exchange'
id='scenes.exchange.exchangeform.swap'
defaultMessage='Swap'
/>
</ClickableText>
</Cell>
Expand Down Expand Up @@ -313,8 +313,6 @@ const Success = ({
</FieldsWrapper>
<SubmitButton
blockLockbox={blockLockbox}
sourceCoin={sourceCoin}
targetCoin={targetCoin}
volume={volume}
handleSubmit={handleSubmit}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@ export const MenuTop = ({ historySelected, showGetStarted }) =>
!showGetStarted ? (
<Wrapper>
<TabMenu>
<LinkContainer to='/exchange' exact>
<LinkContainer to='/swap' exact>
<TabMenuItem selected={!historySelected}>
<FormattedMessage
id='scenes.exchange.menutop.exchange'
defaultMessage='Exchange'
id='scenes.exchange.menutop.swap'
defaultMessage='Swap'
/>
</TabMenuItem>
</LinkContainer>
<LinkContainer to='/exchange/history'>
<LinkContainer to='/swap/history'>
<TabMenuItem selected={historySelected}>
<FormattedMessage
id='scenes.exchange.menutop.history'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ describe('MenuTop Component', () => {
it('should render with correct links and without error', () => {
const component = shallow(<MenuTop />)
const LinkContainer = component.find('LinkContainer')
expect(LinkContainer.at(0).prop('to')).toBe('/exchange')
expect(LinkContainer.at(1).prop('to')).toBe('/exchange/history')
expect(LinkContainer.at(0).prop('to')).toBe('/swap')
expect(LinkContainer.at(1).prop('to')).toBe('/swap/history')
})

it('matches snapshot', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,11 @@ const Empty = () => (
<CenteredTextGroup inline>
<Text size='13px' weight={500}>
<FormattedMessage
id='scenes.exchangehistory.empty.exchange'
defaultMessage="You haven't made any exchanges yet,"
id='scenes.exchangehistory.empty.swap'
defaultMessage="You haven't swapped yet,"
/>
</Text>
<LinkContainer to='/exchange'>
<LinkContainer to='/swap'>
<Link size='13px' weight={500}>
<FormattedMessage
id='scenes.exchangehistory.empty.start'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ exports[`SwapBanner renders correctly with exchange link 1`] = `
exact={false}
replace={false}
strict={false}
to="/exchange"
to="/swap"
>
<SwapBanner__GetStartedButton>
<FormattedMessage
defaultMessage="Go To Exchange"
id="scenes.home.swapbanner.faster.gotoexchange"
defaultMessage="Make Swap"
id="scenes.home.swapbanner.faster.makeswap"
values={Object {}}
/>
</SwapBanner__GetStartedButton>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,14 +90,14 @@ export const SwapBanner = ({
<Column>
<LargeText>
<FormattedMessage
defaultMessage="We've Improved Your Exchange"
id='scenes.home.swapbanner.improved'
defaultMessage="It's Your Crypto"
id='scenes.home.swapbanner.its_your_crypto'
/>
</LargeText>
<MediumText>
<FormattedMessage
defaultMessage='A faster, smarter way to trade your crypto.'
id='scenes.home.swapbanner.faster'
defaultMessage='Swap Your Crypto'
id='scenes.home.swapbanner.swap_your_crypto'
/>
</MediumText>
</Column>
Expand All @@ -114,11 +114,11 @@ export const SwapBanner = ({
</GetStartedButton>
)}
{!kycNotFinished && (
<LinkContainer to='/exchange'>
<LinkContainer to='/swap'>
<GetStartedButton onClick={hideSwapBanner}>
<FormattedMessage
id='scenes.home.swapbanner.faster.gotoexchange'
defaultMessage='Go To Exchange'
id='scenes.home.swapbanner.faster.makeswap'
defaultMessage='Make Swap'
/>
</GetStartedButton>
</LinkContainer>
Expand Down

0 comments on commit 296ee03

Please sign in to comment.