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

fix: when clicking Max button on L2 network 0 is shown instead of max balance #134

Merged
merged 2 commits into from
Apr 5, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 13 additions & 17 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,36 +30,32 @@

## [1.0.0-dev.2](https://github.com/starkware-libs/starkgate-frontend/compare/v1.0.0-dev.1...v1.0.0-dev.2) (2022-04-04)


### 🔧 Fixes

* empty callback in promise .then ([#127](https://github.com/starkware-libs/starkgate-frontend/issues/127)) ([9d13c3b](https://github.com/starkware-libs/starkgate-frontend/commit/9d13c3bf01090b3f0db2d392ae3747d56fd3c9a5))
- empty callback in promise .then ([#127](https://github.com/starkware-libs/starkgate-frontend/issues/127)) ([9d13c3b](https://github.com/starkware-libs/starkgate-frontend/commit/9d13c3bf01090b3f0db2d392ae3747d56fd3c9a5))

## [1.0.0-dev.1](https://github.com/starkware-libs/starkgate-frontend/compare/v0.0.1...v1.0.0-dev.1) (2022-04-04)


### ⚠ BREAKING CHANGES

* alpha version (#126)
- alpha version (#126)

### 💉 Improvements

* utils ([#82](https://github.com/starkware-libs/starkgate-frontend/issues/82)) ([c38e56e](https://github.com/starkware-libs/starkgate-frontend/commit/c38e56e1d942b3350e45811a435da22472dcf00e))

- utils ([#82](https://github.com/starkware-libs/starkgate-frontend/issues/82)) ([c38e56e](https://github.com/starkware-libs/starkgate-frontend/commit/c38e56e1d942b3350e45811a435da22472dcf00e))

### 🔧 Fixes

* add missing env poll block number interval ([d364cb4](https://github.com/starkware-libs/starkgate-frontend/commit/d364cb44b8bf1ef62bba3cf08a13cd48c2897c6e))
* **getTransactionHash:** add fee and version to calculation ([#90](https://github.com/starkware-libs/starkgate-frontend/issues/90)) ([938ffe0](https://github.com/starkware-libs/starkgate-frontend/commit/938ffe079c794409df04982096de22fd6e9d31ad))
* redux error on switching menu "non-serializable value was detected" ([#89](https://github.com/starkware-libs/starkgate-frontend/issues/89)) ([9dc4972](https://github.com/starkware-libs/starkgate-frontend/commit/9dc49729c9cef14c016be348fe170f084d478843))
* remove pending transfer toast ([#92](https://github.com/starkware-libs/starkgate-frontend/issues/92)) ([20f51f3](https://github.com/starkware-libs/starkgate-frontend/commit/20f51f3d68bf5d9c8a1212e6442fa5d246fbbeb2))
* update ETH token addresses and add SLF token ([#84](https://github.com/starkware-libs/starkgate-frontend/issues/84)) ([2c5a9df](https://github.com/starkware-libs/starkgate-frontend/commit/2c5a9df17acf28fb3c87bf91a245dc0f0f6e5b2e))

- add missing env poll block number interval ([d364cb4](https://github.com/starkware-libs/starkgate-frontend/commit/d364cb44b8bf1ef62bba3cf08a13cd48c2897c6e))
- **getTransactionHash:** add fee and version to calculation ([#90](https://github.com/starkware-libs/starkgate-frontend/issues/90)) ([938ffe0](https://github.com/starkware-libs/starkgate-frontend/commit/938ffe079c794409df04982096de22fd6e9d31ad))
- redux error on switching menu "non-serializable value was detected" ([#89](https://github.com/starkware-libs/starkgate-frontend/issues/89)) ([9dc4972](https://github.com/starkware-libs/starkgate-frontend/commit/9dc49729c9cef14c016be348fe170f084d478843))
- remove pending transfer toast ([#92](https://github.com/starkware-libs/starkgate-frontend/issues/92)) ([20f51f3](https://github.com/starkware-libs/starkgate-frontend/commit/20f51f3d68bf5d9c8a1212e6442fa5d246fbbeb2))
- update ETH token addresses and add SLF token ([#84](https://github.com/starkware-libs/starkgate-frontend/issues/84)) ([2c5a9df](https://github.com/starkware-libs/starkgate-frontend/commit/2c5a9df17acf28fb3c87bf91a245dc0f0f6e5b2e))

### 🧩 Features

* alpha version ([#126](https://github.com/starkware-libs/starkgate-frontend/issues/126)) ([5b15ca0](https://github.com/starkware-libs/starkgate-frontend/commit/5b15ca0b1c87f25beab2f30367384d63503d8ef9))
* handle browser support ([#96](https://github.com/starkware-libs/starkgate-frontend/issues/96)) ([56d920d](https://github.com/starkware-libs/starkgate-frontend/commit/56d920d46af53e9d60368321435aed86e463063e))
* remove redux and use providers ([#98](https://github.com/starkware-libs/starkgate-frontend/issues/98)) ([ed38ae4](https://github.com/starkware-libs/starkgate-frontend/commit/ed38ae4925468e7331f974a618f3d4da04773ca8))
* **toasts:** add link to transfer log ([#79](https://github.com/starkware-libs/starkgate-frontend/issues/79)) ([b743b85](https://github.com/starkware-libs/starkgate-frontend/commit/b743b85be4d573a93e3dbfe1e58fdbd8042a5e61))
* use blockNumber=pending for balanceOf calls ([#58](https://github.com/starkware-libs/starkgate-frontend/issues/58)) ([9a84b05](https://github.com/starkware-libs/starkgate-frontend/commit/9a84b05142a8ea44e2e2dd0a39aba39f35b327b4))
- alpha version ([#126](https://github.com/starkware-libs/starkgate-frontend/issues/126)) ([5b15ca0](https://github.com/starkware-libs/starkgate-frontend/commit/5b15ca0b1c87f25beab2f30367384d63503d8ef9))
- handle browser support ([#96](https://github.com/starkware-libs/starkgate-frontend/issues/96)) ([56d920d](https://github.com/starkware-libs/starkgate-frontend/commit/56d920d46af53e9d60368321435aed86e463063e))
- remove redux and use providers ([#98](https://github.com/starkware-libs/starkgate-frontend/issues/98)) ([ed38ae4](https://github.com/starkware-libs/starkgate-frontend/commit/ed38ae4925468e7331f974a618f3d4da04773ca8))
- **toasts:** add link to transfer log ([#79](https://github.com/starkware-libs/starkgate-frontend/issues/79)) ([b743b85](https://github.com/starkware-libs/starkgate-frontend/commit/b743b85be4d573a93e3dbfe1e58fdbd8042a5e61))
- use blockNumber=pending for balanceOf calls ([#58](https://github.com/starkware-libs/starkgate-frontend/issues/58)) ([9a84b05](https://github.com/starkware-libs/starkgate-frontend/commit/9a84b05142a8ea44e2e2dd0a39aba39f35b327b4))
2 changes: 1 addition & 1 deletion src/components/Features/Transfer/Transfer.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export const Transfer = () => {
const onMaxClick = () => {
try {
track(TrackEvent.TRANSFER.MAX_CLICK);
setAmount(String(Math.min(selectedToken.balance, Number(maxDeposit))));
setAmount(String(Math.min(selectedToken.balance, isL1 ? Number(maxDeposit) : Infinity)));
} catch (ex) {
setAmount(selectedToken.balance);
}
Expand Down