fix(identity): warn when the Cashu store cannot be read before an identity swap

オープン
#920 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
1〜2日
初心者へのやさしさ
54/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
dart, flutter
領域
backend, mobile

調査の方向性

Start by tracing api::identity::funds_at_risk, identity_balance_at_risk, and identity_invoices_at_risk to see how Cashu read failures are handled, then inspect _guardedIdentitySwap in account_screen.dart. The issue calls for a risk reason when either Cashu read fails, translations in seven locales, and a warning when fundsAtRisk() errors; done means unreadable stores warn without dropping existing trade risks.

索引モデルが issue の本文から書いたものです。

説明

api::identity::funds_at_risk skips the Cashu checks when the identity's proof store cannot be read: identity_balance_at_risk (since C3) and identity_invoices_at_risk (#869) both log the error and add no entry. Separately, _guardedIdentitySwap (account_screen.dart) treats any error from fundsAtRisk() as "no risks".

So an identity can be generated or imported over one whose ecash or open invoices could not be checked, with no warning. The store file outlives the deletion, so the old words still bring both back, but only for a user who kept them.

Proposal:

  • one reason, e.g. FundsAtRiskReason::CashuWalletUnreadable, pushed when either Cashu read fails, keeping the trade risks;
  • its copy in the seven locales;
  • in Dart, an error from fundsAtRisk() warns ("could not check") instead of passing as empty.

Raised by CodeRabbit on #869.

主要言語
Dart
スター
11
フォーク
9
平均マージ
2日 1時間
マージ済み PR(30日)
16

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

MostroP2P/app のほかの issue

MostroP2P/app の issue をすべて見る

似ている issue

Dart の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。