Skip to content

[Frontend] Add quick runway preset buttons (+7 days, +30 days, +90 days) to TopUpModal #1635

Open

Description

@blurbeast

Overview

When topping up an active stream in frontend/src/components/stream-creation/TopUpModal.tsx, senders must manually calculate how many tokens are needed to extend the stream by a specific number of days.

Problem

  • Calculating ratePerSecond * 86400 * days mentally is error-prone and slows down recurring payroll top-ups.

Proposed Changes

  1. Add three quick-fill pill buttons inside TopUpModal.tsx: +7 Days, +30 Days, and +90 Days.
  2. Clicking a preset automatically computes the token amount from the stream's ratePerSecond and populates the amount input field.

Acceptance Criteria

  • Clicking +7 Days, +30 Days, or +90 Days populates the exact deposit amount required.
  • Displays the new projected end date below the input when an amount is entered.
  • Unit test added in frontend/src/components/stream-creation/__tests__/TopUpModal.test.tsx.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions