mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Fix token decimal
type (#8670)
The `decimals` property of tokens was being set as a string instead of a Number for any tokens added via `getTokenParams`. It's now cast to a Number instead.
This commit is contained in:
parent
145edbe99d
commit
e89540fd94
@ -2216,7 +2216,7 @@ export function getTokenParams (tokenAddress) {
|
|||||||
|
|
||||||
return fetchSymbolAndDecimals(tokenAddress, existingTokens)
|
return fetchSymbolAndDecimals(tokenAddress, existingTokens)
|
||||||
.then(({ symbol, decimals }) => {
|
.then(({ symbol, decimals }) => {
|
||||||
dispatch(addToken(tokenAddress, symbol, decimals))
|
dispatch(addToken(tokenAddress, symbol, Number(decimals)))
|
||||||
dispatch(loadingTokenParamsFinished())
|
dispatch(loadingTokenParamsFinished())
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user