1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00
metamask-extension/ui/app/pages
Mark Stacey 3bd5d714f7 Allow editing max spend limit (#7919)
In the case where the initial spend limit for the `approve` function
was set to the maximum amount, editing this value would result in the
new limit being silently ignored. The transaction would be submitted
with the original max spend limit.

This occurred because function to generate the new custom data would
look for the expected spend limit in the existing data, then bail if
it was not found (and in these cases, it was never found).

The reason the value was not found is that it was erroneously being
converted to a `Number`. A JavaScript `Number` is not precise enough to
represent larger spend limits, so it would give the wrong hex value
(after rounding had taken place in the conversion to a floating-point
number).

The data string is now updated without relying upon the original token
value; the new value is inserted after the `spender` argument instead,
as the remainder of the `data` string is guaranteed to be the original
limit. Additionally, the conversion to a `Number` is now omitted so
that the custom spend limit is encoded correctly.

Fixes #7915
2020-01-29 00:46:44 -04:00
..
add-token Revert "Merge pull request #7599 from MetaMask/Version-v7.7.0" (#7648) 2019-12-05 10:23:43 -10:00
confirm-add-suggested-token Enable indent linting via ESLint (#6936) 2019-07-31 10:17:11 -10:00
confirm-add-token Enable indent linting via ESLint (#6936) 2019-07-31 10:17:11 -10:00
confirm-approve Allow editing max spend limit (#7919) 2020-01-29 00:46:44 -04:00
confirm-deploy-contract Disable unnecessary curly braces in JSX (#7454) 2019-11-18 11:38:47 -03:30
confirm-send-ether Disable unnecessary curly braces in JSX (#7454) 2019-11-18 11:38:47 -03:30
confirm-send-token Folder restructure (#6304) 2019-03-21 20:33:30 -02:30
confirm-token-transaction-base Fix confirm token transaction amount display (#7081) 2019-08-31 13:26:49 -03:00
confirm-transaction Fix batch transaction UX (#7473) 2020-01-10 11:10:35 -04:00
confirm-transaction-base Fix batch transaction UX (#7473) 2020-01-10 11:10:35 -04:00
confirm-transaction-switch Fix batch transaction UX (#7473) 2020-01-10 11:10:35 -04:00
create-account Fixing broken JSON import help link (#7910) 2020-01-27 11:28:29 -04:00
first-time-flow Fix accessibility of first-time-flow terms checkboxes (#7501) 2019-12-05 16:27:08 -04:00
home Revert "Merge pull request #7599 from MetaMask/Version-v7.7.0" (#7648) 2019-12-05 10:23:43 -10:00
keychains Revert "Merge pull request #7599 from MetaMask/Version-v7.7.0" (#7648) 2019-12-05 10:23:43 -10:00
lock Folder restructure (#6304) 2019-03-21 20:33:30 -02:30
mobile-sync Revert "Merge pull request #7599 from MetaMask/Version-v7.7.0" (#7648) 2019-12-05 10:23:43 -10:00
provider-approval Revert "Merge pull request #7599 from MetaMask/Version-v7.7.0" (#7648) 2019-12-05 10:23:43 -10:00
routes Revert "Merge pull request #7599 from MetaMask/Version-v7.7.0" (#7648) 2019-12-05 10:23:43 -10:00
send Fix gas estimate for tokens (#7753) 2020-01-10 11:03:59 -04:00
settings Revert "Merge pull request #7599 from MetaMask/Version-v7.7.0" (#7648) 2019-12-05 10:23:43 -10:00
unlock-page Open retore-vault route from popup (#6353) 2019-03-26 23:35:29 -07:00
index.js Folder restructure (#6304) 2019-03-21 20:33:30 -02:30
index.scss Revert "Merge pull request #7599 from MetaMask/Version-v7.7.0" (#7648) 2019-12-05 10:23:43 -10:00