(Bugfix) - #1312 Assets disappear when loading a safe#1333
(Bugfix) - #1312 Assets disappear when loading a safe#1333mmv08 merged 9 commits intodevelopmentfrom
Conversation
|
CLA Assistant Lite All Contributors have signed the CLA. |
ESLint Summary View Full Report
[warning] @typescript-eslint/explicit-module-boundary-types
Report generated by eslint-plus-action |
|
Travis automatic deployment: |
|
Travis automatic deployment: |
|
Travis automatic deployment: |
|
@fernandomg thanks, for some reason changes to the reducer replacing |
|
Travis automatic deployment: |
|
Travis automatic deployment: |
src/logic/safe/store/reducer/safe.ts
Outdated
| ['safes', safeAddress], | ||
| makeSafe({ name: 'LOADED SAFE', address: safeAddress }), | ||
| (prevSafe) => prevSafe.merge(safe), | ||
| (prevSafe) => prevSafe.mergeDeep(safe), |
There was a problem hiding this comment.
This is not fixing the problem. For me the tokens disappear on the first load, displaying Ether alone. Then after few seconds they appear again.
The mergeDeep is virtually fixing this if applied in line 80 [ADD_SAFE], because we are calling [ADD_SAFE] again after the app is initialized and this is deleting the token values,having to wait until they load again.
I say that this virtually fix it because it introduces another issue. If mergeDeep is applied in [ADD_SAFE] it will add the owners again and again on each reload making the list of owners grow on the same basis as the number of owners we have. They will be shown duplicate when signing a transaction or in settings section.
There was a problem hiding this comment.
@dasanra please take a look again
I changed the ADD_SAFE action to return the existing state and not modify it if the safe already exists. To solve it in a fundamental way, we would have to rethink how safe is loaded when you land on the safe page as there is clearly a concurrency problem between add/update safe actions
|
Travis automatic deployment: |
|
Travis automatic deployment: |
This PR: