Skip to content

Commit

Permalink
fix(Coinify): amount already in satoshi; clear error if not over effB…
Browse files Browse the repository at this point in the history
…alance
  • Loading branch information
Philip Welber committed May 30, 2018
1 parent cb1a83e commit e710f32
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,8 @@ export default ({ coreSagas }) => {
const effectiveBalance = prop('effectiveBalance', payment.getOrElse(undefined))
if (service.isOverEffectiveMax(amount, effectiveBalance)) {
yield put(A.setCoinifyCheckoutError('over_effective_max'))
} else {
yield put(A.clearCoinifyCheckoutError())
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export const getLimitsError = (amt, userLimits, curr) => {
}

export const isOverEffectiveMax = (amount, effectiveBalance) =>
gt((amount * 1e8), effectiveBalance)
gt(amount, effectiveBalance)

export const currencySymbolMap = {
GBP: '£',
Expand Down

0 comments on commit e710f32

Please sign in to comment.