-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Invest powerdown notify #561
Invest powerdown notify #561
Conversation
Suddenly, i was starting to working on this issue in Saturday before you assign yourself to it. Today i commited my fix and notice that you always working on it too :-) Anyway, i have the solution for BigNumber limitation in my commit, so feel free to use it if you think it's ok https://github.com/sunify/ab-web/commit/dae3787920304ce9ae7108ded6cb754c120ad9ea |
@sunify Wow, funny timing. However, @johannbarbie helped me by suggesting to convert the numbers toString(): const validate = (values, props) => {
const errors = {};
const { maxAmount, minAmount = 0 } = props;
const amount = values.get('amount');
const stringMaxAmount = new BigNumber(maxAmount.toString());
const stringAmount = amount ? new BigNumber(amount) : '0';
if (!amount) {
errors.amount = <FormattedMessage {...messages.amountRequired} />;
}
if (amount <= minAmount) {
errors.amount = <FormattedMessage {...messages.amountTooLow} values={{ minAmount }} />;
}
if (amount === 0) {
errors.amount = <FormattedMessage {...messages.amountZero} />;
}
if (stringMaxAmount && stringMaxAmount.lt(stringAmount)) {
errors.amount = <FormattedMessage {...messages.amountTooHigh} values={{ maxAmount }} />;
}
return errors;
}; |
# Conflicts: # app/components/ExchangeDialog/index.js # app/containers/Dashboard/index.js # app/containers/Notifications/sagas.js
e848a7b
to
e815404
Compare
@sunify it seems that after a user powerUp's there isn't a second action dispatched. So now there is no way to dismiss the notification after a successful transaction. |
@VonIobro do you mean CONTRACT_EVENT action? It should be dispatched (if tx is successful ofc). Anyway in #585 i added new actions for transactions, so we don't need events for this purpose anymore |
Ready to merge.
This PR: