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

feat: validate maxTotalBalance #101

Merged
merged 12 commits into from
Mar 28, 2022
Merged

feat: validate maxTotalBalance #101

merged 12 commits into from
Mar 28, 2022

Conversation

CarmitKl
Copy link

@CarmitKl CarmitKl commented Mar 27, 2022

The total value locked (TVL) in the bridge on L1 is limited for each token type: currently, the limit is $100k for each token.
So this PR adds the validation to prevent executing a transaction if the selectetToken will pass its 'maxTotalBalance' value.
If so- the user will see the error-modal with an appropriate explanation.

  • Changes have been done against master branch, and PR does not conflict
  • New unit / functional tests have been added (whenever applicable)
  • Test are passing in local environment
  • Docs have been updated
  • PR title is follow the standard-version convention: <type>(optional subject): <description>, e.g: fix: minor typos in code

This change is Reviewable

@CarmitKl CarmitKl changed the title feat: popup-alert on maxTotalBalance feat: popup error alert on maxTotalBalance Mar 27, 2022
@CarmitKl CarmitKl requested a review from dan-ziv March 27, 2022 07:45
@CarmitKl CarmitKl added the ready for review Pull request is ready to be reviewed label Mar 27, 2022
@dan-ziv
Copy link
Collaborator

dan-ziv commented Mar 27, 2022

@CarmitKl please change the PR title to
feat: validate maxTotalBalance

@CarmitKl CarmitKl changed the title feat: popup error alert on maxTotalBalance feat: validate maxTotalBalance Mar 27, 2022
src/hooks/useTransfer.js Outdated Show resolved Hide resolved
src/hooks/useTransfer.js Outdated Show resolved Hide resolved
src/hooks/useTransfer.js Outdated Show resolved Hide resolved
src/hooks/useTransfer.js Outdated Show resolved Hide resolved
@dan-ziv
Copy link
Collaborator

dan-ziv commented Mar 27, 2022

@CarmitKl Please add useMaxTotalBalance hook from which you will call the API and cache the response.

@CarmitKl CarmitKl added in progress Pull request is still a work in progress and removed ready for review Pull request is ready to be reviewed labels Mar 27, 2022
@dan-ziv dan-ziv changed the base branch from dev to alpha March 28, 2022 12:41
@dan-ziv dan-ziv removed the in progress Pull request is still a work in progress label Mar 28, 2022
@dan-ziv dan-ziv self-requested a review March 28, 2022 12:44
@dan-ziv dan-ziv merged commit 12295d0 into alpha Mar 28, 2022
@dan-ziv dan-ziv deleted the feat/noteOnMaxTotalBalance branch March 28, 2022 14:19
@dan-ziv
Copy link
Collaborator

dan-ziv commented Mar 29, 2022

🎉 This PR is included in version 0.1.0-dev.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@dan-ziv dan-ziv restored the feat/noteOnMaxTotalBalance branch September 6, 2022 11:18
@dan-ziv dan-ziv deleted the feat/noteOnMaxTotalBalance branch September 6, 2022 11:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants