-
Notifications
You must be signed in to change notification settings - Fork 15
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
Update withdrawal limit warning messages and error messages #1465
Conversation
src/store/gateway/plasma.ts
Outdated
@@ -334,7 +334,11 @@ export async function plasmaWithdraw(context: ActionContext, funds: Funds) { | |||
return | |||
} | |||
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 reached
TG025: account daily withdrawal limit reached
@@ -173,6 +178,10 @@ export default class WithdrawForm extends Vue { | |||
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