BUG: Inconsistent Prop Naming (Drilling)

Open
#58 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Refactor
Clarity
Mostly clear
Activity status
Stale
Tech stack
javascript, react
Domain
frontend, payments

Research direction

Read Widget.jsx and TransactionReview.jsx to trace how onSuccess and onTransactionComplete are accepted and passed down. Decide which callback name is the intended standard from the existing implementations, then check the related usage and tests. Done means the callback naming is consistent across both components and the relevant behavior remains covered.

Written by the indexing model from the issue text.

Description

[y] I have checked for duplicate issues

Description
The Widget component accepts onTransactionComplete OR onSuccess (for backward comp), but allows TransactionReview only to accept onTransactionComplete. While currently handled by a variable assignment, this inconsistent naming convention makes the API surface unclear for developers reading the implementations.

How to Reproduce

  1. Inspect Widget.jsx: accepts onSuccess.
  2. Inspect TransactionReview.jsx: accepts onTransactionComplete.

Expected Behavior
The SDK should have a standardized casing and naming convention for event callbacks passed down the tree.

Actual Behavior
The props are aliased inside Widget.jsx: const handleTransactionComplete = onTransactionComplete || onSuccess;.

[y] I want to work on this issue

Dominant language
JavaScript
Stars
16
Forks
29
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from StabilityNexus/StablePay

All issues in StabilityNexus/StablePay

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.