-
Notifications
You must be signed in to change notification settings - Fork 242
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
Referral independent code flow #2794
Conversation
@@ -248,10 +251,47 @@ const updateRewardsCheckRunner = () => { | |||
}); | |||
} | |||
|
|||
const referralTradesRunner = () =>{ | |||
cron.schedule('0 */4 * * *', async () => { |
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.
double check the frequency of running this. This should be executed when you run the plugin code initially
} | ||
|
||
if (feeUsdtValue < 1) { | ||
throw new Error('Total unrealized earned fees are too small to be converted to realized earnings'); |
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.
This should be in the server error message
{} | ||
); | ||
|
||
throw new Error('Settlement is not available at the moment, please retry later'); |
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.
this should go to the server message errors
- user | ||
x-token-permissions: | ||
- can_read | ||
/user/referral/history: |
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.
we dont need this if its for the graph
}); | ||
}; | ||
|
||
const fetchUserReferrals = (req, res) => { |
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.
remove if its for the graph
return unrealizedRecords; | ||
}; | ||
|
||
const getRealizedReferral = async (opts = { |
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.
this should display bundled data
!toolsLib.getKitConfig().referral_history_config.active | ||
) { | ||
// TODO it should be added to the messages | ||
throw new Error('Feature is not active'); |
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.
The message should be added to the server messages @fetok12
No description provided.