fix activate token for all safes after changing activeTokens from list to set
This commit is contained in:
parent
0214b05d69
commit
4603d71820
10
package.json
10
package.json
|
@ -36,7 +36,7 @@
|
||||||
"@material-ui/core": "4.6.1",
|
"@material-ui/core": "4.6.1",
|
||||||
"@material-ui/icons": "4.5.1",
|
"@material-ui/icons": "4.5.1",
|
||||||
"@portis/web3": "^2.0.0-beta.45",
|
"@portis/web3": "^2.0.0-beta.45",
|
||||||
"@testing-library/jest-dom": "4.2.3",
|
"@testing-library/jest-dom": "4.2.4",
|
||||||
"@toruslabs/torus-embed": "0.2.6",
|
"@toruslabs/torus-embed": "0.2.6",
|
||||||
"@walletconnect/web3-provider": "^1.0.0-beta.37",
|
"@walletconnect/web3-provider": "^1.0.0-beta.37",
|
||||||
"@welldone-software/why-did-you-render": "3.3.9",
|
"@welldone-software/why-did-you-render": "3.3.9",
|
||||||
|
@ -53,8 +53,8 @@
|
||||||
"notistack": "https://github.com/gnosis/notistack.git#v0.9.4",
|
"notistack": "https://github.com/gnosis/notistack.git#v0.9.4",
|
||||||
"optimize-css-assets-webpack-plugin": "5.0.3",
|
"optimize-css-assets-webpack-plugin": "5.0.3",
|
||||||
"qrcode.react": "1.0.0",
|
"qrcode.react": "1.0.0",
|
||||||
"react": "16.11.0",
|
"react": "16.12.0",
|
||||||
"react-dom": "16.11.0",
|
"react-dom": "16.12.0",
|
||||||
"react-final-form": "6.3.0",
|
"react-final-form": "6.3.0",
|
||||||
"react-final-form-listeners": "^1.0.2",
|
"react-final-form-listeners": "^1.0.2",
|
||||||
"react-hot-loader": "4.12.17",
|
"react-hot-loader": "4.12.17",
|
||||||
|
@ -68,7 +68,7 @@
|
||||||
"redux-thunk": "^2.3.0",
|
"redux-thunk": "^2.3.0",
|
||||||
"reselect": "^4.0.0",
|
"reselect": "^4.0.0",
|
||||||
"squarelink": "^1.1.3",
|
"squarelink": "^1.1.3",
|
||||||
"web3": "1.2.2",
|
"web3": "1.2.3",
|
||||||
"web3connect": "^1.0.0-beta.23"
|
"web3connect": "^1.0.0-beta.23"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
@ -118,7 +118,7 @@
|
||||||
"eslint-config-airbnb": "18.0.1",
|
"eslint-config-airbnb": "18.0.1",
|
||||||
"eslint-plugin-flowtype": "4.4.1",
|
"eslint-plugin-flowtype": "4.4.1",
|
||||||
"eslint-plugin-import": "2.18.2",
|
"eslint-plugin-import": "2.18.2",
|
||||||
"eslint-plugin-jest": "23.0.3",
|
"eslint-plugin-jest": "23.0.4",
|
||||||
"eslint-plugin-jsx-a11y": "6.2.3",
|
"eslint-plugin-jsx-a11y": "6.2.3",
|
||||||
"eslint-plugin-react": "7.16.0",
|
"eslint-plugin-react": "7.16.0",
|
||||||
"ethereumjs-abi": "0.6.8",
|
"ethereumjs-abi": "0.6.8",
|
||||||
|
|
|
@ -46,9 +46,9 @@ export default handleActions<SafeReducerState, *>(
|
||||||
const tokenAddress = action.payload
|
const tokenAddress = action.payload
|
||||||
|
|
||||||
const newState = state.withMutations((map) => {
|
const newState = state.withMutations((map) => {
|
||||||
map.keySeq().forEach((safeAddress) => {
|
map.get('safes').keySeq().forEach((safeAddress) => {
|
||||||
const safeActiveTokens = map.getIn([safeAddress, 'activeTokens'])
|
const safeActiveTokens = map.getIn(['safes', safeAddress, 'activeTokens'])
|
||||||
const activeTokens = safeActiveTokens.push(tokenAddress)
|
const activeTokens = safeActiveTokens.add(tokenAddress)
|
||||||
|
|
||||||
map.updateIn(['safes', safeAddress], (prevSafe) => prevSafe.merge({ activeTokens }))
|
map.updateIn(['safes', safeAddress], (prevSafe) => prevSafe.merge({ activeTokens }))
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue