Skip to content

Expiring delegations#694

Merged
feruzm merged 5 commits into
developfrom
expiry
Mar 6, 2026
Merged

Expiring delegations#694
feruzm merged 5 commits into
developfrom
expiry

Conversation

@feruzm
Copy link
Copy Markdown
Member

@feruzm feruzm commented Mar 6, 2026

Summary by CodeRabbit

  • New Features

    • Wallet SDK: added vesting delegation expiration lookup so accounts can view and monitor upcoming delegation expirations and better track delegation lifecycle/status.
  • Documentation

    • Terms of Service: updated contact email to hello@ecency.com and expanded the Digital Services Act / redress section with clearer review and dispute-resolution information.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Mar 6, 2026

Warning

Rate limit exceeded

@feruzm has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 10 minutes and 11 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 8c59ff63-5946-464d-8177-e06bff4b086d

📥 Commits

Reviewing files that changed from the base of the PR and between 5b64f30 and dc3413d.

⛔ Files ignored due to path filters (6)
  • packages/sdk/dist/browser/index.js is excluded by !**/dist/**
  • packages/sdk/dist/browser/index.js.map is excluded by !**/dist/**, !**/*.map
  • packages/sdk/dist/node/index.cjs is excluded by !**/dist/**
  • packages/sdk/dist/node/index.cjs.map is excluded by !**/dist/**, !**/*.map
  • packages/sdk/dist/node/index.mjs is excluded by !**/dist/**
  • packages/sdk/dist/node/index.mjs.map is excluded by !**/dist/**, !**/*.map
📒 Files selected for processing (2)
  • apps/web/src/app/(staticPages)/terms-of-service/page.tsx
  • packages/sdk/CHANGELOG.md
📝 Walkthrough

Walkthrough

Adds a new TypeScript type and a React Query options function to fetch vesting-delegation expirations for a given account; also re-exports the new type and query option from the module index files.

Changes

Cohort / File(s) Summary
Vesting Delegation Expiration Type
packages/sdk/src/modules/wallet/types/vesting-delegation-expiration.ts
Added VestingDelegationExpiration interface describing id, delegator, vesting_shares, and expiration.
Query Options
packages/sdk/src/modules/wallet/queries/get-vesting-delegation-expirations-query-options.ts
Added getVestingDelegationExpirationsQueryOptions(username?: string) returning React Query options that call CONFIG.hiveClient.database_api.find_vesting_delegation_expirations and enable only when username is provided.
Module Exports
packages/sdk/src/modules/wallet/types/index.ts, packages/sdk/src/modules/wallet/queries/index.ts
Re-exported the new type and query options for SDK consumers.

Sequence Diagram(s)

sequenceDiagram
  participant Consumer
  participant ReactQuery as React Query
  participant SDK as SDK (query fn)
  participant Hive as Hive DB API

  Consumer->>ReactQuery: useQuery(getVestingDelegationExpirationsQueryOptions(username))
  ReactQuery->>SDK: invoke queryFn (if enabled)
  SDK->>Hive: CONFIG.hiveClient.database_api.find_vesting_delegation_expirations({ account: username })
  Hive-->>SDK: { delegations: [...] }
  SDK-->>ReactQuery: return delegations
  ReactQuery-->>Consumer: provide data / loading / error
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested labels

patch

Poem

🐰 A nibble, a hop, a query takes flight,
Delegations counted by soft moonlight.
Types tucked in pockets, options set neat,
Data returns — hop! — a rabbit's small feat. 🥕✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Expiring delegations' directly relates to the main change: introducing vesting delegation expiration functionality including a new query option, type definitions, and UI updates.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch expiry

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In
`@packages/sdk/src/modules/wallet/queries/get-vesting-delegation-expirations-query-options.ts`:
- Around line 17-28: getVestingDelegationExpirationsQueryOptions must guard
against undefined username to avoid calling CONFIG.hiveClient.call with {
account: undefined } (which bypasses enabled when using direct
queryClient.fetchQuery/prefetchQuery). Modify
getVestingDelegationExpirationsQueryOptions to check if username is falsy at the
top and return a safe queryOptions object (e.g., enabled: false and a no-op
queryFn that returns an empty array) instead of proceeding to call
CONFIG.hiveClient.call("database_api","find_vesting_delegation_expirations", {
account: username }); this ensures functions like queryClient.fetchQuery won't
make an invalid RPC when username is absent.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 3ea7c624-23c2-473c-bec4-164aca859cc5

📥 Commits

Reviewing files that changed from the base of the PR and between 3639e1a and a9f34d5.

⛔ Files ignored due to path filters (7)
  • packages/sdk/dist/browser/index.d.ts is excluded by !**/dist/**
  • packages/sdk/dist/browser/index.js is excluded by !**/dist/**
  • packages/sdk/dist/browser/index.js.map is excluded by !**/dist/**, !**/*.map
  • packages/sdk/dist/node/index.cjs is excluded by !**/dist/**
  • packages/sdk/dist/node/index.cjs.map is excluded by !**/dist/**, !**/*.map
  • packages/sdk/dist/node/index.mjs is excluded by !**/dist/**
  • packages/sdk/dist/node/index.mjs.map is excluded by !**/dist/**, !**/*.map
📒 Files selected for processing (4)
  • packages/sdk/src/modules/wallet/queries/get-vesting-delegation-expirations-query-options.ts
  • packages/sdk/src/modules/wallet/queries/index.ts
  • packages/sdk/src/modules/wallet/types/index.ts
  • packages/sdk/src/modules/wallet/types/vesting-delegation-expiration.ts

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@apps/web/src/app/`(staticPages)/terms-of-service/page.tsx:
- Around line 548-550: Replace the general inbox email shown in the Terms of
Service page where the "Child Safety Point of Contact" is rendered (the text
containing "<code>hello@ecency.com</code>") with the dedicated, restricted
child-safety intake alias owned by trust-and-safety/legal; locate the string in
page.tsx (the terms-of-service page component) and update the <code>...</code>
value to the new address, ensuring any display and copyable markup continues to
use the <code>...</code> element and no other text is changed.
- Around line 562-565: Update the "27. Digital Services Act (EU) Redress
Options" block in the terms-of-service page component to include an actionable
entry point for moderation appeals: add a sentence with a direct link to the
internal moderation appeal form or support route (e.g.,
"/support/moderation-appeal" or the existing support page) and a contact address
(e.g., moderation@ecency.example) so users know how to submit an internal
review; also include a link to the certified out-of-court dispute settlement
body (Article 21) for EU users. Locate the JSX block containing the <h2> "27.
Digital Services Act (EU) Redress Options" in
apps/web/src/app/(staticPages)/terms-of-service/page.tsx and modify the
surrounding <p> elements to insert the form URL, email, and the external DSA
dispute body link.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: c495295b-7215-4263-aa37-7432167e95c2

📥 Commits

Reviewing files that changed from the base of the PR and between a9f34d5 and 5b64f30.

📒 Files selected for processing (2)
  • apps/web/src/app/(staticPages)/terms-of-service/page.tsx
  • packages/sdk/src/modules/wallet/queries/get-vesting-delegation-expirations-query-options.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/sdk/src/modules/wallet/queries/get-vesting-delegation-expirations-query-options.ts

Comment on lines 548 to 550
Child Safety Point of Contact: <code>hello@ecency.com</code>. To report suspected CSAM,
CSAE, or any threat to a minor related to Ecency, contact this address with links,
usernames, and supporting details so we can investigate and take action.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Use a dedicated child-safety intake address instead of the general inbox.

hello@ecency.com is now the contact for CSAM/CSAE reports and Google Play child-safety notices. That is a sensitive workflow; it should go to a restricted alias owned by the trust-and-safety/legal process, not the general mailbox.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/web/src/app/`(staticPages)/terms-of-service/page.tsx around lines 548 -
550, Replace the general inbox email shown in the Terms of Service page where
the "Child Safety Point of Contact" is rendered (the text containing
"<code>hello@ecency.com</code>") with the dedicated, restricted child-safety
intake alias owned by trust-and-safety/legal; locate the string in page.tsx (the
terms-of-service page component) and update the <code>...</code> value to the
new address, ensuring any display and copyable markup continues to use the
<code>...</code> element and no other text is changed.

Comment on lines +562 to +565
<h2>27. Digital Services Act (EU) Redress Options</h2>
<p>If you disagree with a content moderation decision made by Ecency, you may submit a complaint through available internal review or reporting mechanisms.</p>
<p>Users in the European Union may also refer disputes relating to moderation decisions to a certified out-of-court dispute settlement body in accordance with Article 21 of Regulation (EU) 2022/2065 (Digital Services Act).</p>
<p>Nothing in this section limits your right to seek judicial redress through the courts.</p>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Make the DSA appeal path actionable.

This section says users can use internal review/reporting mechanisms, but it does not identify any route, form, or mailbox for moderation appeals. Please add a concrete entry point here so the redress flow is actually usable.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/web/src/app/`(staticPages)/terms-of-service/page.tsx around lines 562 -
565, Update the "27. Digital Services Act (EU) Redress Options" block in the
terms-of-service page component to include an actionable entry point for
moderation appeals: add a sentence with a direct link to the internal moderation
appeal form or support route (e.g., "/support/moderation-appeal" or the existing
support page) and a contact address (e.g., moderation@ecency.example) so users
know how to submit an internal review; also include a link to the certified
out-of-court dispute settlement body (Article 21) for EU users. Locate the JSX
block containing the <h2> "27. Digital Services Act (EU) Redress Options" in
apps/web/src/app/(staticPages)/terms-of-service/page.tsx and modify the
surrounding <p> elements to insert the form URL, email, and the external DSA
dispute body link.

@feruzm feruzm added the patch Bug fixes and patches (1.0.0 → 1.0.1), add this only if any packages/ have patch changes in PR label Mar 6, 2026
@feruzm feruzm merged commit a94a561 into develop Mar 6, 2026
@feruzm feruzm deleted the expiry branch March 6, 2026 06:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

patch Bug fixes and patches (1.0.0 → 1.0.1), add this only if any packages/ have patch changes in PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant