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 cc78378b8e
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-28 22:49:32 -04:00
..
add-token Migrate codebase to use ESM (#7730) 2020-01-09 00:04:58 -03:30
confirm-add-suggested-token Purge xtend from the UI (#7795) 2020-01-13 12:59:21 -03:30
confirm-add-token Migrate codebase to use ESM (#7730) 2020-01-09 00:04:58 -03:30
confirm-approve Allow editing max spend limit (#7919) 2020-01-28 22:49:32 -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 Migrate codebase to use ESM (#7730) 2020-01-09 00:04:58 -03:30
confirm-token-transaction-base Fix confirm token transaction amount display (#7081) 2019-08-31 13:26:49 -03:00
confirm-transaction Convert ConfirmTxScreen to an ES6 class (#7790) 2020-01-13 13:32:54 -03:30
confirm-transaction-base Remove unnecessary get environment type parameter (#7891) 2020-01-24 15:12:58 -04:00
confirm-transaction-switch Fix batch transaction UX (#7473) 2020-01-10 06:34:02 -08:00
connected-sites Connect distinct accounts per site (#7004) 2019-12-03 09:35:56 -08:00
create-account disable import button on Import Account screen for empty string/file (#7912) 2020-01-28 09:40:03 -04:00
error Add top-level error page (#7889) 2020-01-24 17:11:02 -04:00
first-time-flow Switch to full lodash package, and update lodash (#7907) 2020-01-27 12:45:48 -04:00
home Remove unnecessary get environment type parameter (#7891) 2020-01-24 15:12:58 -04:00
keychains Add mechanism to randomize seed phrase filename (#7863) 2020-01-21 21:22:55 -04:00
lock Folder restructure (#6304) 2019-03-21 20:33:30 -02:30
mobile-sync Migrate codebase to use ESM (#7730) 2020-01-09 00:04:58 -03:30
permissions-connect Remove unnecessary get environment type parameter (#7891) 2020-01-24 15:12:58 -04:00
routes Change "Log In/Out" terminology to "Unlock/Lock" (#7853) 2020-01-21 14:09:53 -08:00
send Switch to full lodash package, and update lodash (#7907) 2020-01-27 12:45:48 -04:00
settings Switch to full lodash package, and update lodash (#7907) 2020-01-27 12:45:48 -04:00
unlock-page Remove unnecessary get environment type parameter (#7891) 2020-01-24 15:12:58 -04:00
index.js Add top-level error page (#7889) 2020-01-24 17:11:02 -04:00
index.scss Add top-level error page (#7889) 2020-01-24 17:11:02 -04:00