Works but there are a few things I'm not sure about (feel free to just fix and merge as well)
GetLogsParameters typing is painful (only figured it out by copying the same idea from another one relating to blocks)
useGetLogs should probably be cached in a different way (or does it matter if it querys the same logs from fork to latest when it doesn't need to, technically one could save another cache of the last fetched block per chain per user but might be too much to save/invalidate later)
when should this useImportTransferredTokens be called? right now it's just called whenever the account details screen is rendered (this also has the effect that if you are already on the screen it won't refresh until you go back to it?)
for future: event Transfer(address indexed from, address indexed to, uint256) is the same event for both erc20/erc721? I'm not sure how that will be saved, like if it should be in the same store (all tokens, with an extra field to say whether it's erc20 or 721, or etc), since you don't know it based on the address ahead of time
Fixes #56
Works but there are a few things I'm not sure about (feel free to just fix and merge as well)
GetLogsParameters
typing is painful (only figured it out by copying the same idea from another one relating to blocks)useGetLogs
should probably be cached in a different way (or does it matter if it querys the same logs from fork to latest when it doesn't need to, technically one could save another cache of the last fetched block per chain per user but might be too much to save/invalidate later)useImportTransferredTokens
be called? right now it's just called whenever the account details screen is rendered (this also has the effect that if you are already on the screen it won't refresh until you go back to it?)event Transfer(address indexed from, address indexed to, uint256)
is the same event for both erc20/erc721? I'm not sure how that will be saved, like if it should be in the same store (all tokens, with an extra field to say whether it's erc20 or 721, or etc), since you don't know it based on the address ahead of time