Skip to content
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

Merged
merged 57 commits into from May 19, 2024
Merged

Conversation

fetok12
Copy link
Collaborator

@fetok12 fetok12 commented May 4, 2024

No description provided.

@@ -248,10 +251,47 @@ const updateRewardsCheckRunner = () => {
});
}

const referralTradesRunner = () =>{
cron.schedule('0 */4 * * *', async () => {
Copy link
Collaborator

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');
Copy link
Collaborator

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');
Copy link
Collaborator

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:
Copy link
Collaborator

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) => {
Copy link
Collaborator

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 = {
Copy link
Collaborator

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');
Copy link
Collaborator

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

@abeikverdi abeikverdi merged commit 402165d into develop May 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants