Skip to content

Commit b9cc1b7

Browse files
lklimekclaude
andcommitted
fix: remove incorrect "globally unique" claim from error messages
Only unique key types (ECDSA_SECP256K1, BLS12_381) require platform-wide uniqueness. Non-unique types (ECDSA_HASH160, BIP13_SCRIPT_HASH, EDDSA_25519_HASH160) can be shared across identities. Simplified messages to avoid misleading users about key uniqueness rules. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 5a43c1a commit b9cc1b7

3 files changed

Lines changed: 7 additions & 11 deletions

File tree

docs/ai-design/2026-03-11-duplicate-key-error/manual-test-scenarios.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ a key whose public key data already exists on the identity.
3838
### Expected Result
3939

4040
- An **error banner** appears at the top of the screen with the message:
41-
> This public key is already registered on the platform. Each key must be globally unique — try a different key.
41+
> This public key is already registered on the platform. Try a different key.
4242
- The message is plain text -- no base64, no CBOR encoding, no raw error dump.
4343
- The banner type is **Error** (red/error styling).
4444
- The app does **not** crash or freeze.
@@ -74,7 +74,7 @@ error display path regardless of trigger.
7474
### Expected Result
7575

7676
- An **error banner** appears with the message:
77-
> This key hash is already registered on the platform. Each key must be globally unique — try a different key.
77+
> This key hash is already registered on the platform. Try a different key.
7878
- The message is plain text -- no encoded data.
7979
- The banner type is **Error**.
8080
- The app does **not** crash.

src/backend_task/error.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,15 +62,11 @@ pub enum TaskError {
6262
MustRetry(String),
6363

6464
/// Duplicate identity public key — the key data already exists on the platform.
65-
#[error(
66-
"This public key is already registered on the platform. Each key must be globally unique — try a different key."
67-
)]
65+
#[error("This public key is already registered on the platform. Try a different key.")]
6866
DuplicateIdentityPublicKey,
6967

7068
/// Duplicate identity public key ID — the key hash is already taken platform-wide.
71-
#[error(
72-
"This key hash is already registered on the platform. Each key must be globally unique — try a different key."
73-
)]
69+
#[error("This key hash is already registered on the platform. Try a different key.")]
7470
DuplicateIdentityPublicKeyId,
7571

7672
/// Identity public key conflicts with an existing key's unique contract bounds.

src/backend_task/identity/add_key_to_identity.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ mod tests {
179179
let msg = broadcast_error_message(&sdk_err);
180180
assert_eq!(
181181
msg,
182-
"This public key is already registered on the platform. Each key must be globally unique — try a different key."
182+
"This public key is already registered on the platform. Try a different key."
183183
);
184184
}
185185

@@ -190,7 +190,7 @@ mod tests {
190190
let msg = broadcast_error_message(&sdk_err);
191191
assert_eq!(
192192
msg,
193-
"This key hash is already registered on the platform. Each key must be globally unique — try a different key."
193+
"This key hash is already registered on the platform. Try a different key."
194194
);
195195
}
196196

@@ -232,7 +232,7 @@ mod tests {
232232
let msg = broadcast_error_message(&sdk_err);
233233
assert_eq!(
234234
msg,
235-
"This public key is already registered on the platform. Each key must be globally unique — try a different key."
235+
"This public key is already registered on the platform. Try a different key."
236236
);
237237
}
238238

0 commit comments

Comments
 (0)