Skip to content

Commit

Permalink
fix(Coinify): add medium max to limits and display
Browse files Browse the repository at this point in the history
  • Loading branch information
Philip Welber committed Jun 26, 2018
1 parent 625d1ef commit 9c84043
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ const LimitsHelper = styled.div`
height: 15px;
font-size: 13px;
top: 42px;
padding-top: 3px;
padding-top: 2px;
a {
color: ${props => props.theme['brand-secondary']};
cursor: pointer;
Expand All @@ -81,6 +81,10 @@ const LimitsHelper = styled.div`
padding-right: 5px;
}
`
const LimitsWrapper = styled.div`
display: flex;
flex-direction: column;
`

const getLimitsError = (errorType, limits, curr, setMax, setMin, changeTab) => {
switch (errorType) {
Expand Down Expand Up @@ -150,7 +154,12 @@ const FiatConvertor = (props) => {
{
isSell
? getSellLimits()
: <FormattedMessage id='buy.quote_input.remaining_buy_limit' defaultMessage='Your remaining buy limit is {max}' values={{ max: <a onClick={() => setMax(limits.max)}>{curr}{limits.max}</a> }} />
: equals(level, 1)
? <FormattedMessage id='buy.quote_input.remaining_buy_limit' defaultMessage='Your remaining buy limit is {max}' values={{ max: <a onClick={() => setMax(limits.max)}>{curr}{limits.max}</a> }} />
: <LimitsWrapper size='12px' weight={300}>
<FormattedMessage id='buy.quote_input.remaining_card_buy_limit' defaultMessage='Your remaining card buy limit is {cardMax}' values={{ cardMax: <a onClick={() => setMax(limits.cardMax)}>{curr}{limits.cardMax}</a> }} />
<FormattedMessage id='buy.quote_input.remaining_bank_buy_limit' defaultMessage='Your remaining bank buy limit is {bankMax}' values={{ bankMax: <a onClick={() => setMax(limits.bankMax)}>{curr}{limits.bankMax}</a> }} />
</LimitsWrapper>
}
{
gt(2, prop('name', level)) && not(equals(prop('state', kyc), 'reviewing'))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ export const getLimits = (limits, curr, effectiveBalance) => {
return {
buy: {
min: getMin(limits, curr),
max: getMax(limits, curr)
max: getMax(limits, curr),
bankMax: path(['bank', 'inRemaining', curr], limits),
cardMax: path(['card', 'inRemaining', curr], limits)
},
sell: {
min: getSellMin(limits, 'BTC'),
Expand Down
3 changes: 2 additions & 1 deletion packages/blockchain-wallet-v4/src/exchange/delegate/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,8 @@ export class ExchangeDelegate {
const receiveAddress = btc.getNextAvailableReceiveAddress(Bitcoin.networks.bitcoin.NETWORK_BITCOIN, defaultIndex, this.state)

return {
receiveAddress: receiveAddress.getOrElse(),
receiveAddress: 'mwE8jUqBJ2BvRiF8sDrUFDfLSLV1DsXtBN',
// receiveAddress: receiveAddress.getOrElse(),
commit: (trade) => {}
}
}
Expand Down

0 comments on commit 9c84043

Please sign in to comment.