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 funds by chain #631

Merged
merged 1 commit into from
Dec 27, 2024
Merged

Conversation

Tanya-atatakai
Copy link
Collaborator

Proposed changes

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)

walletBalanceResult.evmChainId === selectedAgentConfig.evmHomeChainId,
)?.balance;

const isInitialFunded = storeState?.[selectedAgentType]?.isInitialFunded;
if (service && isInitialFunded && isServiceStaked) {
Copy link
Collaborator Author

@Tanya-atatakai Tanya-atatakai Dec 26, 2024

Choose a reason for hiding this comment

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

@truemiller can you please look at this code and the " // SERVICE IS STAKED, AND STARTING AGAIN" section below and tell me if I'm right or not - it looks, that if a user runs the agent for the second time, the code will alway end up here, and no "threshold check" check will happen (to check if a user has enough gas for starting the agent)

also, here we check this: (serviceTotalStakedOlas ?? 0) >= requiredStakedOlas but if a user staked already, their total staked will be more than required anyway, what sense does this make?

@@ -13,7 +13,7 @@ import { StakingProgramMap } from '.';
export const MODE_STAKING_PROGRAMS_CONTRACT_ADDRESSES: Record<string, Address> =
{
[StakingProgramId.OptimusAlpha]:
'0x534c0a05b6d4d28d5f3630d6d74857b253cf8332',
'0x5fc25f50E96857373C64dC0eDb1AbCBEd4587e91',
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

this was pointing to wrong Modius alpha, updated to the right one

@Tanya-atatakai Tanya-atatakai requested review from truemiller and OjusWiZard and removed request for mohandast52 December 26, 2024 15:45
.operate.zip Outdated Show resolved Hide resolved
@Tanya-atatakai Tanya-atatakai merged commit 911909f into feature/modius Dec 27, 2024
4 of 5 checks passed
@Tanya-atatakai Tanya-atatakai deleted the tanya/modius-transfer branch December 27, 2024 12:05
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