mirror of
https://github.com/luxfi/explore.git
synced 2026-09-24 00:28:18 +00:00
26 lines
667 B
TypeScript
26 lines
667 B
TypeScript
import type { Feature } from './types';
|
|
|
|
import apis from '../apis';
|
|
import app from '../app';
|
|
import account from './account';
|
|
import blockchainInteraction from './blockchain-interaction';
|
|
|
|
const title = 'Rewards service integration';
|
|
|
|
const config: Feature<{}> = (() => {
|
|
// @0xdeval: as of now, we won't support rewards programs with dynamic auth provider
|
|
if (!app.isPrivateMode && apis.rewards && account.isEnabled && account.authProvider === 'auth0' && blockchainInteraction.isEnabled) {
|
|
return Object.freeze({
|
|
title,
|
|
isEnabled: true,
|
|
});
|
|
}
|
|
|
|
return Object.freeze({
|
|
title,
|
|
isEnabled: false,
|
|
});
|
|
})();
|
|
|
|
export default config;
|