-
Notifications
You must be signed in to change notification settings - Fork 2
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: support additional tokens required for initial funding #620
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,25 @@ | ||
import { Button, Flex, Typography } from 'antd'; | ||
|
||
import { Pages } from '@/enums/Pages'; | ||
import { StakingProgramId } from '@/enums/StakingProgram'; | ||
import { usePageState } from '@/hooks/usePageState'; | ||
import { useStakingProgram } from '@/hooks/useStakingProgram'; | ||
|
||
import { CustomAlert } from '../../../Alert'; | ||
|
||
const { Text } = Typography; | ||
|
||
// TODO: need to figure out how to understand if there are new staking contracts | ||
// To show this alert; also need to hide it, when a use clicks "review" | ||
export const NewStakingProgramAlert = () => { | ||
const { goto } = usePageState(); | ||
const { activeStakingProgramId, isActiveStakingProgramLoaded } = | ||
useStakingProgram(); | ||
// const { activeStakingProgramId, isActiveStakingProgramLoaded } = | ||
// useStakingProgram(); | ||
|
||
// TODO: remove single staking program check | ||
if ( | ||
!isActiveStakingProgramLoaded || | ||
activeStakingProgramId !== StakingProgramId.OptimusAlpha | ||
) | ||
return null; | ||
// // TODO: remove single staking program check | ||
// if ( | ||
// !isActiveStakingProgramLoaded || | ||
// activeStakingProgramId !== StakingProgramId.OptimusAlpha | ||
// ) | ||
// return null; | ||
|
||
return ( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can we keep this for "trader" and return null for other agents? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. in fact, this code means show the alert if activeStakingProgramId is Optimus (which is Modius), but for the rest return null. So, as I said in the previous comment, it's not working correctly... |
||
<CustomAlert | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,6 @@ import { useFeatureFlag } from '@/hooks/useFeatureFlag'; | |
import { AddBackupWalletAlert } from './AddBackupWalletAlert'; | ||
import { AvoidSuspensionAlert } from './AvoidSuspensionAlert'; | ||
import { LowFunds } from './LowFunds/LowFunds'; | ||
import { NewStakingProgramAlert } from './NewStakingProgramAlert'; | ||
import { NoAvailableSlotsOnTheContract } from './NoAvailableSlotsOnTheContract'; | ||
import { UpdateAvailableAlert } from './UpdateAvailableAlert'; | ||
|
||
|
@@ -14,7 +13,7 @@ export const AlertSections = () => { | |
<CardSection vertical> | ||
<UpdateAvailableAlert /> | ||
{isBackupViaSafeEnabled && <AddBackupWalletAlert />} | ||
<NewStakingProgramAlert /> | ||
{/* <NewStakingProgramAlert /> */} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If we are hiding just for "modius" should we put it behind the feature flag? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it's not for modius, we just agreed it doesn't work properly at all... https://valory-workspace.slack.com/archives/C07GH5D26UB/p1733992345003699 |
||
<AvoidSuspensionAlert /> | ||
<LowFunds /> | ||
<NoAvailableSlotsOnTheContract /> | ||
|
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.
🥲 #603
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.
ah we didn't discuss it 🫠 still afraid of that with your approach if we need to update e.g.
trader.isInitialFunded
, we'll need to update the whole object:imagine somewhere at the same time we update e.g. firstRewardsNotificationShown, so we may loose previous update... but maybe that's impossible?