[Frontend] Prevent or warn when sender and recipient Stellar addresses are identical in StreamCreationWizard

未关闭 适合新手
#1,632 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 3 天内回复

还没有人认领这个 Issue。

  • #1691 来自 @aazminu —— 已关闭,未合并

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
84/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
领域
frontend, payments

调研方向

从 frontend/src/components/stream-creation/RecipientStep.tsx 和 frontend/src/lib/stream-validation.ts 开始;跟踪已连接钱包地址和收件人的验证方式,以及 Next 按钮如何被禁用。然后阅读 frontend/src/lib/__tests__/stream-validation.test.ts,添加覆盖去除空白后且不区分大小写时相等的测试。匹配的地址显示指定的内联错误、Next 被禁用且单元测试通过时,即为完成。

由索引模型根据 Issue 内容生成。

描述

drips-wave forms frontend good-first-issue ux

Overview

In frontend/src/components/stream-creation/RecipientStep.tsx, a user can paste their own connected wallet public key as the stream recipient without receiving any warning.

Problem

  • Creating a payment stream to oneself wastes Soroban transaction fees and locks token liquidity unnecessarily.
  • Users testing or copying addresses from their clipboard frequently paste their own connected address by mistake.

Proposed Changes

  1. Compare the normalized recipient input against the currently connected wallet address in RecipientStep.tsx and frontend/src/lib/stream-validation.ts.
  2. Display an inline validation error ("Recipient address cannot be the same as your connected sender wallet") and disable the "Next" button.

Acceptance Criteria

  • Entering the connected wallet's public key triggers an immediate inline error message.
  • Comparison is case-insensitive and trims leading/trailing whitespace.
  • Unit test added in frontend/src/lib/__tests__/stream-validation.test.ts.
主要语言
TypeScript
星标
18
派生
250
平均合并
4 天 12 小时
30 天内合并 PR
65

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

LabsCrypt/flowfi 的其他 Issue

查看 LabsCrypt/flowfi 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。