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.
let historyIndex = 0;
let inst = null;
- try {
- let args = ["_", "-d", desc];
- if (change_desc) {
- args.push("-c");
- args.push(change_desc);
- }
- inst = await new WasmWallet("testnet", args);
- } catch (e) {
- console.error(e);
+ let args = ["_", "-d", desc];
+ if (change_desc) {
+ args.push("-c");
+ args.push(change_desc);
}
+ inst = await new WasmWallet("testnet", args);
const run = (command) => {
if (command == "clear") {