-
Notifications
You must be signed in to change notification settings - Fork 504
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(coinify check order review. other misc coinify improvements)
- Loading branch information
1 parent
75a8c62
commit 56937a7
Showing
12 changed files
with
173 additions
and
120 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 48 additions & 0 deletions
48
...ckchain-wallet-v4-frontend/src/scenes/BuySell/CoinifyCheckout/Content/ReviewForm/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
import React from 'react' | ||
import { Field, reduxForm } from 'redux-form' | ||
import { FormattedMessage } from 'react-intl' | ||
import { equals } from 'ramda' | ||
import { Button, HeartbeatLoader, Link, Text } from 'blockchain-info-components' | ||
import { Remote } from 'blockchain-wallet-v4/src' | ||
|
||
import { CancelWrapper, CenteredWrapper, Row } from 'components/BuySell/Signup' | ||
import { CheckBox } from 'components/Form' | ||
import { StepTransition } from 'components/Utilities/Stepper' | ||
import { required } from 'services/FormHelper' | ||
|
||
const ReviewForm = (props) => { | ||
const { invalid, submitting, busy, onSubmit, quoteR, type } = props | ||
const isSell = equals(type, 'sell') | ||
return ( | ||
<form> | ||
{ | ||
isSell && | ||
<Row> | ||
<Field name='coinifycheckbox' component={CheckBox} validate={[required]} /> | ||
<Text size='12px' width={300}> | ||
<FormattedMessage id='scenes.buysell.coinify.sell.orderreview.checkboxtext' defaultMessage='I accept that Coinify will process my order upon completion of the bitcoin transaction, and that bitcoin will be traded at the available exchange rate at the time, which may differ from the displayed rate.' /> | ||
</Text> | ||
</Row> | ||
} | ||
<CenteredWrapper> | ||
<Button | ||
nature='primary' | ||
disabled={submitting || invalid || !Remote.Success.is(quoteR) || busy} | ||
onClick={onSubmit}> | ||
{ | ||
busy | ||
? <HeartbeatLoader height='20px' width='20px' color='white' /> | ||
: <FormattedMessage id='submit' defaultMessage='Submit' /> | ||
} | ||
</Button> | ||
</CenteredWrapper> | ||
<CancelWrapper> | ||
<StepTransition restart Component={Link}> | ||
<FormattedMessage id='cancel' defaultMessage='Cancel' /> | ||
</StepTransition> | ||
</CancelWrapper> | ||
</form> | ||
) | ||
} | ||
|
||
export default reduxForm({ form: 'reviewForm' })(ReviewForm) |
Oops, something went wrong.