-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: refactor handletransfer to use handlerwithloader and not load entities on handler #21
base: master
Are you sure you want to change the base?
Conversation
is this one still relevant? you mentioned that it didn't change performances? |
async ({ event, context }) => | ||
await handleTransfer({ | ||
PersonalCRC.Transfer.handlerWithLoader({ | ||
loader: async ({ event, context }) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
interesting that we didn't have this code elsewhere before?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
which code? The Token
and AvatarBalance
were loaded in the handleTransfer method.
avatar_id: event.params.to, | ||
token_id: tokenId, | ||
}, | ||
from: allAvatarBalances[i * 2 + 1] ?? { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is this sorcery? 😂 why i*2 ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
because i needs AvatarBalance "from" user and "to" user. Given that they are all in one single array, then it jumps each two entities
0-1
2-3
...
maybe i should ask envio team. I'm surprised with the results |
No description provided.