Skip to content

Comments

refactor: skip notifying for sub accounts with 0 weight#15

Merged
jtourkos merged 1 commit intomainfrom
skip-logging-0-weights-for-sub-accounts
Sep 3, 2025
Merged

refactor: skip notifying for sub accounts with 0 weight#15
jtourkos merged 1 commit intomainfrom
skip-logging-0-weights-for-sub-accounts

Conversation

@jtourkos
Copy link
Contributor

@jtourkos jtourkos commented Sep 3, 2025

No description provided.

@jtourkos jtourkos requested a review from Copilot September 3, 2025 15:20
@railway-app
Copy link

railway-app bot commented Sep 3, 2025

🚅 Environment sprinkler-pr-15 in Drips App has no services deployed.

@jtourkos jtourkos requested a review from efstajas September 3, 2025 15:30
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR refactors the weight validation logic to skip notification for sub-accounts with 0 weight, specifically targeting repo sub-accounts which can legitimately have no splits configured.

  • Adds a new utility function to identify repo sub-account driver IDs through bit manipulation
  • Updates weight validation logic to silently skip repo sub-accounts with 0 weight instead of treating them as errors
  • Refactors the checkTotalWeight function control flow for better clarity

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/isRepoSubAccountDriverId.ts New utility function to identify repo sub-account drivers by extracting driver type from account ID bits
src/index.ts Updated weight validation to skip notifications for repo sub-accounts with 0 weight and improved control flow

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@jtourkos jtourkos merged commit 8e54abb into main Sep 3, 2025
2 checks passed
@jtourkos jtourkos deleted the skip-logging-0-weights-for-sub-accounts branch September 3, 2025 15:50
@railway-app railway-app bot requested a deployment to Mainnet Sprinkler (Drips App / mainnet) September 3, 2025 15:50 Abandoned
@railway-app railway-app bot temporarily deployed to Filecoin Sprinkler (Drips App / mainnet) September 3, 2025 15:50 Inactive
@railway-app railway-app bot temporarily deployed to Optimistic Sprinkler (Drips App / mainnet) September 3, 2025 15:50 Inactive
@railway-app railway-app bot temporarily deployed to Metis Sprinkler (Drips App / mainnet) September 3, 2025 15:50 Inactive
@railway-app railway-app bot deployed to Mainnet Sprinkler (Drips App / mainnet) September 3, 2025 15:56 Active
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