|
|
|
@ -84,13 +84,14 @@ export default function reduceMetamask (state = {}, action) { |
|
|
|
|
selectedAddress: action.value, |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
case actionConstants.SET_ACCOUNT_LABEL: |
|
|
|
|
case actionConstants.SET_ACCOUNT_LABEL: { |
|
|
|
|
const account = action.value.account |
|
|
|
|
const name = action.value.label |
|
|
|
|
const id = {} |
|
|
|
|
id[account] = Object.assign({}, metamaskState.identities[account], { name }) |
|
|
|
|
const identities = Object.assign({}, metamaskState.identities, id) |
|
|
|
|
return Object.assign(metamaskState, { identities }) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
case actionConstants.SET_CURRENT_FIAT: |
|
|
|
|
return Object.assign(metamaskState, { |
|
|
|
@ -197,7 +198,7 @@ export default function reduceMetamask (state = {}, action) { |
|
|
|
|
}, |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
case actionConstants.UPDATE_SEND_TOKEN: |
|
|
|
|
case actionConstants.UPDATE_SEND_TOKEN: { |
|
|
|
|
const newSend = { |
|
|
|
|
...metamaskState.send, |
|
|
|
|
token: action.value, |
|
|
|
@ -225,6 +226,7 @@ export default function reduceMetamask (state = {}, action) { |
|
|
|
|
return Object.assign(metamaskState, { |
|
|
|
|
send: newSend, |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
case actionConstants.UPDATE_SEND_ENS_RESOLUTION: |
|
|
|
|
return { |
|
|
|
@ -265,7 +267,7 @@ export default function reduceMetamask (state = {}, action) { |
|
|
|
|
}, |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
case actionConstants.UPDATE_TRANSACTION_PARAMS: |
|
|
|
|
case actionConstants.UPDATE_TRANSACTION_PARAMS: { |
|
|
|
|
const { id: txId, value } = action |
|
|
|
|
let { currentNetworkTxList } = metamaskState |
|
|
|
|
currentNetworkTxList = currentNetworkTxList.map((tx) => { |
|
|
|
@ -281,6 +283,7 @@ export default function reduceMetamask (state = {}, action) { |
|
|
|
|
...metamaskState, |
|
|
|
|
currentNetworkTxList, |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
case actionConstants.SET_PARTICIPATE_IN_METAMETRICS: |
|
|
|
|
return { |
|
|
|
|