17 feature extract referral and link on first order#19
Open
17 feature extract referral and link on first order#19
Conversation
rauf322
commented
Jan 19, 2026
|
|
||
| const buyerWallet = event.params.taker; | ||
| const buyerWalletId = `${event.chainId}-${buyerWallet}`; | ||
| const buyerWalletEntity = await context.Wallet.get(buyerWalletId); |
Author
There was a problem hiding this comment.
Assuming frontend requires registration before trading, which fires Users.AddedWallet event This indexes the wallet to schema and links it to User, so buyerWalletEntity.user_id will exist
8b9339d to
eef3e2a
Compare
rauf322
commented
Jan 19, 2026
| wallet_id: buyerWalletId, | ||
| referrer_id: referrerUserId, | ||
| marketplace_id: marketplaceId, | ||
| firstOrderTrade_id: tradeId, |
Author
There was a problem hiding this comment.
Should we have firstOrderTrade_id? if we can just indexing trade history by buyerWalletId?
3ce8f12 to
f42abb8
Compare
…teraction handler, add protocol property to PropertyTokenTrade entity
…illed First graphql schema tables is ReferralCode that's where our Referrer is living and it has relationships to Referrals table. Second table is Referral which showing to us Referral address data of creation and what was first order
… by some referralCode
6f90151 to
36f77e9
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.