Skip to content

Duplicate wallet creation in non-persistent path #232

@Mshehu5

Description

@Mshehu5

Describe the bug

Location: src/handlers.rs:1000-1008 (in #[cfg(not(any(feature = "sqlite", feature = "redb")))] block)

Problem:
Wallet created twice:

  1. Line 1002: let wallet = new_wallet(...) (immutable)
  2. Line 1005: let mut wallet = new_wallet(...) (mutable, shadows first)
    blockchain_client is created with the first wallet, then the second wallet is used with that client, causing a mismatch.

Expected behavior

Should only use one wallet this affects builds without sqlite/redb features. May cause incorrect wallet state.

Remove line 1005 and add mut to wallet creation on 1002

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions