From 07acdbb85baa2d3185c24b104055b0ed7aec2047 Mon Sep 17 00:00:00 2001 From: Alain Brenzikofer Date: Thu, 10 Sep 2026 12:31:23 +0000 Subject: [PATCH] core: say same seed, not same key, for the other profiles Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_01Rvc3HbiWBTqbAvRT45G5oX --- src/Simplex/Chat/View.hs | 2 +- tests/WalletTests.hs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Simplex/Chat/View.hs b/src/Simplex/Chat/View.hs index b6e2b58eb8..3fb3357ecd 100644 --- a/src/Simplex/Chat/View.hs +++ b/src/Simplex/Chat/View.hs @@ -190,7 +190,7 @@ chatResponseToView hu cfg@ChatConfig {logLevel, showReactions, showFullLinks, te CRServiceReplyAccepted u (AgentConnId cId) -> ttyUser u [plain $ "service reply accepted, connection id: " <> safeDecodeUtf8 (strEncode cId)] CRWallet u exists paths profiles | not exists -> ttyUser u ["no wallet key"] - | otherwise -> ttyUser u $ keyRows <> [plain $ "also on this key: " <> T.intercalate ", " profiles | not (null profiles)] + | otherwise -> ttyUser u $ keyRows <> [plain $ "also on same seed: " <> T.intercalate ", " profiles | not (null profiles)] where keyRows | null paths = ["this profile has no wallet key"] diff --git a/tests/WalletTests.hs b/tests/WalletTests.hs index aaef7c82d6..14f7a8f12f 100644 --- a/tests/WalletTests.hs +++ b/tests/WalletTests.hs @@ -97,13 +97,13 @@ testWalletSecondProfile ps = withNewTestChat ps "alice" aliceProfile $ \alice -> -- other profiles are named, never numbered alice ##> "/_wallet" alice <## "this profile has no wallet key" - alice <## "also on this key: alice" + alice <## "also on same seed: alice" -- the key belongs to the device, so a profile without an account exports it too alice ##> "/_wallet export" alice <## phrase alice ##> "/_wallet create" rows' <- nameRows alice - alice <## "also on this key: alice" + alice <## "also on same seed: alice" map fst rows' `shouldBe` ["m/44'/60'/1'/0/0", "m/44'/60'/1'/0/1"] null (map snd rows `intersect` map snd rows') `shouldBe` True @@ -166,5 +166,5 @@ testWalletBind ps = withNewTestChat ps "alice" aliceProfile $ \alice -> do -- the counter moved past the account bound by hand alice ##> "/_wallet create" rows' <- nameRows alice - alice <## "also on this key: alice" + alice <## "also on same seed: alice" map fst rows' `shouldBe` ["m/44'/60'/4'/0/0", "m/44'/60'/4'/0/1"]