mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Fix dot-notation issues (#9679)
Refs #9663 This change enables `dot-notation` and fixes the issues raised by the rule.
This commit is contained in:
parent
6df17dc90e
commit
6038a1f3f5
@ -93,7 +93,6 @@ module.exports = {
|
|||||||
'node/no-unpublished-import': 'off',
|
'node/no-unpublished-import': 'off',
|
||||||
'node/no-unpublished-require': 'off',
|
'node/no-unpublished-require': 'off',
|
||||||
'node/no-unsupported-features/node-builtins': 'off',
|
'node/no-unsupported-features/node-builtins': 'off',
|
||||||
'dot-notation': 'off',
|
|
||||||
'mocha/max-top-level-suites': 'off',
|
'mocha/max-top-level-suites': 'off',
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -148,7 +148,7 @@ export function calcTokenValue (value, decimals) {
|
|||||||
* @returns {string | undefined} A lowercase address string.
|
* @returns {string | undefined} A lowercase address string.
|
||||||
*/
|
*/
|
||||||
export function getTokenAddressParam (tokenData = {}) {
|
export function getTokenAddressParam (tokenData = {}) {
|
||||||
const value = tokenData?.args?.['_to'] || tokenData?.args?.[0]
|
const value = tokenData?.args?._to || tokenData?.args?.[0]
|
||||||
return value?.toString().toLowerCase()
|
return value?.toString().toLowerCase()
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -160,7 +160,7 @@ export function getTokenAddressParam (tokenData = {}) {
|
|||||||
* @returns {string | undefined} A decimal string value.
|
* @returns {string | undefined} A decimal string value.
|
||||||
*/
|
*/
|
||||||
export function getTokenValueParam (tokenData = {}) {
|
export function getTokenValueParam (tokenData = {}) {
|
||||||
return tokenData?.args?.['_value']?.toString()
|
return tokenData?.args?._value?.toString()
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getTokenValue (tokenParams = []) {
|
export function getTokenValue (tokenParams = []) {
|
||||||
|
@ -210,7 +210,7 @@ export function getAccountToConnectToActiveTab (state) {
|
|||||||
export function getOrderedConnectedAccountsForActiveTab (state) {
|
export function getOrderedConnectedAccountsForActiveTab (state) {
|
||||||
const { activeTab, metamask: { permissionsHistory } } = state
|
const { activeTab, metamask: { permissionsHistory } } = state
|
||||||
|
|
||||||
const permissionsHistoryByAccount = permissionsHistory[activeTab.origin]?.['eth_accounts']?.accounts
|
const permissionsHistoryByAccount = permissionsHistory[activeTab.origin]?.eth_accounts?.accounts
|
||||||
const orderedAccounts = getMetaMaskAccountsOrdered(state)
|
const orderedAccounts = getMetaMaskAccountsOrdered(state)
|
||||||
const connectedAccounts = getPermittedAccountsForCurrentTab(state)
|
const connectedAccounts = getPermittedAccountsForCurrentTab(state)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user