]> Untitled Git - bdk/commit
Merge bitcoindevkit/bdk#1981: refactor(electrum): remove `unwrap()`s and `expect()`s
authormerge-script <hello@evanlinjin.me>
Fri, 18 Jul 2025 11:15:10 +0000 (11:15 +0000)
committermerge-script <hello@evanlinjin.me>
Fri, 18 Jul 2025 11:15:10 +0000 (11:15 +0000)
commite5f25a861048dd9062e1b4dbaa771e2969251542
tree6c8f91504248620c5fac0c4af2dcd836e2a67de2
parentedf0279a30a3df11734005688999befaa4052f70
parentb24ae6d71815e268417034fda44f2d57325f6166
Merge bitcoindevkit/bdk#1981: refactor(electrum): remove `unwrap()`s and `expect()`s

b24ae6d71815e268417034fda44f2d57325f6166 test(electrum): test sync with incorrect network (Wei Chen)
0fdbe9d170941218dddd396c7204bfb8de035d43 fix(electrum): Return error on incorrect network (志宇)
2b56f1a0487742d9a5a3043c8235c3ecca96a487 refactor(electrum): remove `unwrap()`s and `expect()`s (Wei Chen)

Pull request description:

  Partially resolves https://github.com/bitcoindevkit/bdk_wallet/issues/30.

  ### Description

  This PR eliminates all `unwrap()` and `expect()` calls from `bdk_electrum_client`, replacing them with proper error handling. Given that all public methods already return `Result`, we now propagate error messages instead of panicking.

  ### Changelog notice

  * Removed all `unwrap()`s and `expect()`s from `bdk_electrum_client.rs`.

  ### Checklists

  #### All Submissions:

  * [x] I've signed all my commits
  * [x] I followed the [contribution guidelines](https://github.com/bitcoindevkit/bdk/blob/master/CONTRIBUTING.md)
  * [x] I ran `cargo +nightly fmt` and `cargo clippy` before committing

ACKs for top commit:
  evanlinjin:
    ACK b24ae6d71815e268417034fda44f2d57325f6166

Tree-SHA512: 33c08031fda35ecc12100202fe7cba2f107bc4537e7519e2ed4df9c1ea70f4a644f0fce0d92175af9745d0bf352c61094eee2ff353636ba8342691d12e3b47cc