]> Untitled Git - bitcoindevkit.org/commit
Don't create wallet instance in a try/catch block
authorDaniela Brozzoni <danielabrozzoni@protonmail.com>
Wed, 14 Sep 2022 13:21:52 +0000 (15:21 +0200)
committerDaniela Brozzoni <danielabrozzoni@protonmail.com>
Thu, 6 Oct 2022 11:22:11 +0000 (12:22 +0100)
commit6bbc3d93f2aeb49b718b23f8106bd3bfcd260747
treee206e6a6154168a79e202cc977ca43b450a772d8
parente8cfffc6866e31914bb977fcd2194da1a1858298
Don't create wallet instance in a try/catch block

Before, failing to create the wallet instance wouldn't report
the error back to the caller, which would usually go on
and call methods on inst, casuing null pointer exceptions.
You can try this by entering the current playground and inserting
a descriptor with a mismatched checksum: the error would be logged
in the console, but a weird error would be presented to the user.
playground/src/index.js