Skip to content

Self-hosted tipping#671

Merged
feruzm merged 7 commits intodevelopfrom
feature/tipping
Apr 13, 2026
Merged

Self-hosted tipping#671
feruzm merged 7 commits intodevelopfrom
feature/tipping

Conversation

@dkildar
Copy link
Copy Markdown
Collaborator

@dkildar dkildar commented Feb 22, 2026

Summary by CodeRabbit

  • New Features

    • Introduced tipping system enabling users to send tips in HIVE, HBD, or POINTS with configurable preset amounts.
    • Added tipping buttons to blog posts and sidebar with customizable labels.
    • Integrated QR code generation for wallet address sharing.
    • Enhanced broadcast functionality with configurable authority types (Active, Posting, Owner, Memo).
    • Added multi-language support for tipping interface.
  • Chores

    • Updated dependencies to support new features.

@dkildar dkildar requested a review from feruzm February 22, 2026 11:58
@dkildar dkildar self-assigned this Feb 22, 2026
# Conflicts:
#	apps/self-hosted/package.json
#	apps/self-hosted/src/core/i18n.ts
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Feb 22, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 47596e25-7adc-4f43-9767-5dcd41e24bba

📥 Commits

Reviewing files that changed from the base of the PR and between 8618aa1 and ce4fe00.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (1)
  • apps/self-hosted/package.json
✅ Files skipped from review due to trivial changes (1)
  • apps/self-hosted/package.json

📝 Walkthrough

Walkthrough

Introduces a comprehensive tipping feature enabling users to send cryptocurrency tips via HIVE, HBD, or POINTS. Includes UI components (button, popover, currency selection, QR codes), configuration support, translations across 6 locales, and transaction handling. Extends broadcast to support authority type specification for POINTS transfers.

Changes

Cohort / File(s) Summary
Configuration & Dependencies
config.template.json, package.json, configuration-loader.ts, floating-menu/config-fields.ts
Added tipping configuration block with general/post settings, preset amounts. Added @floating-ui and qrcode dependencies. Extended InstanceConfig interface with optional tipping schema.
Internationalization
core/i18n.ts
Added 13 new tipping-related translation keys (tip_*, cancel) and corresponding strings across 6 locales (en, es, de, fr, ko, ru). Reformatted quotes to double-quoted style.
Type Definitions & Utilities
features/tipping/types.ts, features/tipping/hooks/use-tipping-config.ts
Defined TippingVariant, TippingAsset, TippingConfig types. Added asset categorization constants (TIPABLE_ASSETS, ASSETS_REQUIRING_KEY, EXTERNAL_WALLET_SYMBOLS) and guard functions. Created useTippingConfig hook with configuration fallback logic.
Tipping UI Components
features/tipping/components/tip-button.tsx, features/tipping/components/tipping-popover.tsx, features/tipping/components/tipping-step-amount.tsx, features/tipping/components/tipping-step-currency.tsx
Implemented main tipping button with floating-ui popover. Two-step popover flow: amount selection and currency/asset selection. Step currency includes wallet address display and QR code rendering. Handles validation, error messaging, and submission.
Currency Selection Components
features/tipping/components/tipping-currency-card.tsx, features/tipping/components/tipping-currency-cards.tsx, features/tipping/components/tipping-wallet-qr.tsx
Created individual currency card component fetching wallet asset info. Implemented currency cards collection with asset filtering (HIVE, HP, HBD, POINTS, external assets). Added QR code generator for wallet addresses with loading and error states.
Transaction Execution
features/tipping/utils/tip-transaction.ts, features/auth/auth-actions.ts
Implemented executeTip utility that validates amounts, fetches USD prices, converts to asset quantities, and broadcasts transfer/custom_json operations. Extended broadcast function signature to accept optional authorityType for keychain signing (required for POINTS).
Feature Integration
features/blog/components/blog-post-footer.tsx, features/blog/layout/blog-sidebar.tsx, features/tipping/index.ts
Added TipButton rendering in blog post footer (when post tipping enabled) and blog sidebar (when general tipping enabled). Created barrel export file for tipping feature public API.

Sequence Diagram

sequenceDiagram
    participant User
    participant TipButton
    participant TippingPopover
    participant TippingStepAmount
    participant TippingStepCurrency
    participant executeTip
    participant broadcast as Broadcast<br/>(Auth)
    participant Blockchain

    User->>TipButton: Click tip button
    TipButton->>TippingPopover: Open popover
    TippingPopover->>TippingStepAmount: Show amount selection
    User->>TippingStepAmount: Select amount or custom
    TippingStepAmount->>TippingPopover: onSelect(amount)
    TippingPopover->>TippingStepCurrency: Show currency selection
    TippingPopover->>TippingStepCurrency: Load currency cards
    User->>TippingStepCurrency: Select currency/asset
    TippingStepCurrency->>TippingStepCurrency: Fetch wallet address<br/>(if external asset)
    TippingStepCurrency->>TippingStepCurrency: Render QR code
    User->>TippingStepCurrency: Click Send
    TippingStepCurrency->>executeTip: executeTip(from, to, amount,<br/>asset, memo)
    executeTip->>executeTip: Fetch USD price for asset
    executeTip->>executeTip: Convert USD to asset quantity
    executeTip->>executeTip: Build transfer/custom_json operation
    executeTip->>broadcast: broadcast(operations,<br/>{ authorityType: 'Active' })
    broadcast->>Blockchain: Sign & submit transaction
    Blockchain-->>broadcast: Transaction confirmed
    broadcast-->>executeTip: Success
    executeTip-->>TippingStepCurrency: Success
    TippingStepCurrency->>TippingPopover: onClose()
    TippingPopover->>User: Tip sent confirmation
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

Suggested labels

patch

Poem

🐰 A rabbit hops with glee today,
Tips now flow in every way!
From HIVE to HBD, a generous spread,
QR codes bloom where kindness is bred!
Pop-overs float, amounts dance with care—
Tipping magic floats through the air! ✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 17.65% 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 'Self-hosted tipping' directly and clearly describes the primary feature being added throughout the changeset: a complete tipping system implementation.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/tipping

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.

coderabbitai[bot]

This comment was marked as resolved.

coderabbitai[bot]

This comment was marked as resolved.

@feruzm feruzm merged commit 71eb072 into develop Apr 13, 2026
2 checks passed
@feruzm feruzm deleted the feature/tipping branch April 13, 2026 05:56
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