Skip to content
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

Closed
wants to merge 6 commits into from

Conversation

mimiiiz
Copy link
Contributor

@mimiiiz mimiiiz commented Jun 16, 2021

related issues
#1461
#1462
#1463

@@ -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")) {
Copy link
Contributor

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() {
Copy link
Contributor

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 }}
Copy link
Contributor

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 }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here

@enlight enlight changed the base branch from staging to develop June 18, 2021 04:58
@enlight enlight changed the base branch from develop to staging June 18, 2021 04:58
@mimiiiz mimiiiz changed the base branch from staging to develop June 18, 2021 05:07
@mimiiiz mimiiiz changed the base branch from develop to staging June 18, 2021 05:08
@enlight enlight closed this Jul 23, 2021
@enlight
Copy link
Contributor

enlight commented Jul 23, 2021

Closed in favor of #1466

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants