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

feat: support additional tokens required for initial funding #620

Merged
merged 2 commits into from
Dec 20, 2024

Conversation

Tanya-atatakai
Copy link
Collaborator

@Tanya-atatakai Tanya-atatakai commented Dec 19, 2024

Proposed changes

add additional token requirements logic

All three tokens required

Screenshot 2024-12-19 at 20 04 35

Funding ETH

Screenshot 2024-12-19 at 20 16 15

Funding USDC

Screenshot 2024-12-19 at 20 29 07

Funding OLAS (the button is enabled)

image

Debug info modal (probably not relevant anymore)

image

Types of changes

What types of changes does your code introduce?
Put an x in the boxes that apply

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

@@ -13,6 +13,7 @@ const schema = {
lastSelectedAgentType: { type: 'string', default: 'trader' },
isInitialFunded_trader: { type: 'boolean', default: false },
isInitialFunded_memeooorr: { type: 'boolean', default: false },
isInitialFunded_modius: { type: 'boolean', default: false },
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🥲 #603

Copy link
Collaborator Author

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:

electronApi.store?.set?.(trader, {...electronApi.store?.get('trader'), isInitialFunded: true});

imagine somewhere at the same time we update e.g. firstRewardsNotificationShown, so we may loose previous update... but maybe that's impossible?

@@ -14,7 +13,7 @@ export const AlertSections = () => {
<CardSection vertical>
<UpdateAvailableAlert />
{isBackupViaSafeEnabled && <AddBackupWalletAlert />}
<NewStakingProgramAlert />
{/* <NewStakingProgramAlert /> */}
Copy link
Collaborator

Choose a reason for hiding this comment

The 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?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The 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

// !isActiveStakingProgramLoaded ||
// activeStakingProgramId !== StakingProgramId.OptimusAlpha
// )
// return null;

return (
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we keep this for "trader" and return null for other agents?

Copy link
Collaborator Author

@Tanya-atatakai Tanya-atatakai Dec 19, 2024

Choose a reason for hiding this comment

The 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...

@Tanya-atatakai Tanya-atatakai merged commit 053d282 into feature/modius Dec 20, 2024
4 of 5 checks passed
@Tanya-atatakai Tanya-atatakai deleted the tanya/needs-funds-update branch December 20, 2024 11:08
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.

2 participants