Skip to content

Commit

Permalink
Fix amount validation in AmountField
Browse files Browse the repository at this point in the history
The minimum amount is valid, thus it is invalid if the minimum is greater
than the value.
  • Loading branch information
bumi committed Aug 16, 2020
1 parent 9e1fafb commit 30de248
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/app/components/AmountField/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ class AmountField extends React.Component<Props, State> {
}
if (minimumSats) {
const min = new BN(minimumSats);
if (min.gte(valueBN)) {
if (min.gt(valueBN)) {
const minAmount = `${fromBaseToUnit(min.toString(), denomination)} ${
denominationSymbols[chain][denomination]
}`;
Expand Down

0 comments on commit 30de248

Please sign in to comment.