refactor: remove combined asset model, closes #48 #5378
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Opening this as a draft @kyranjamie for feedback here on removing the combined asset model. I've refactored to use the balance and info models separately, except for I did use an
AssetItem
type just to help pass some data around the asset list components specifically, but that could be removed and the data can still be passed separately. Here, the loader just passes data to the lists ...and there are few send forms using the loader pattern. I do think the loader pattern works well, but we could organize our use of it a bit better.I created a
isFetchedWithSuccess
function in our query-config after researching some suggestions on how to handle the react-queryundefined
issue, I used it in a few spots that seemed to work well.I also started using the word
token
here more often just bc it is commonly used in our code already, but happy to go back toasset
if people prefer it?More to do, but wanted to get feedback before continuing. I could never get the react-router loader pattern to work bc their suggestion on how to handle typescript didn't work for me ...I still got
undefined
, but I can try to work on it again. I was admittedly testing a few ideas out and the error might have been on my end!