-
Notifications
You must be signed in to change notification settings - Fork 15
Update withdrawal limit warning messages and error messages #1465
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
Conversation
src/store/gateway/plasma.ts
Outdated
| } | ||
| feedback.endTask() | ||
| feedback.showError(i18n.t("feedback_msg.error.withdraw_failed").toString()) | ||
| if (error.message.includes("limit reached")) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gateway errors have codes (TGXXX), match those, not the description:
TG024: total daily withdrawal limit reachedTG025: account daily withdrawal limit reached
| this.visible = false | ||
| } | ||
| reachedLimit() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function doesn't mutate any state, so it should just be a getter
| <h6 v-if="isWithdrawalLimitEnabled && isCheckDailyRemainingWithdrawAmount()"> | ||
| <h6 v-if="reachedLimit()"> | ||
| {{ $t('components.gateway.withdraw_form_modal.daily_withdrawal_limit_reached') }} | ||
| {{ isWithdrawalLimitEnabled | tokenAmount(tokenInfo.decimals) }} {{ token }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't make sense, isWithdrawalLimitEnabled returns a boolean, how is that going to render an amount?
| {{ $t('components.gateway.withdraw_form_modal.daily_remaining_withdraw_amount') }} | ||
| {{ dailyRemainingWithdrawAmount | tokenAmount(tokenInfo.decimals) }} {{ token }} | ||
| {{ dailyRemainingWithdrawAmount | tokenAmount(tokenInfo.decimals) }} / | ||
| {{ isWithdrawalLimitEnabled | tokenAmount(tokenInfo.decimals) }} {{ token }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here
|
Closed in favor of #1466 |
related issues
#1461
#1462
#1463