bwt-electrum-plugin icon indicating copy to clipboard operation
bwt-electrum-plugin copied to clipboard

--tx-broadcast-cmd is parsed incorrectly

Open oriolpont opened this issue 4 years ago • 2 comments

the plugin's gui provides a window for custom options to be passed to bwt; however I've been unsuccessful with --tx-broadcast-cmd, it seems it seems the way the arguments are parsed breaks it.

Arguments at that input area get cut at every space, and --tx-broadcast-cmd requires at the very least a space, between the command and the {tx_hex} field, alas I find no way to escape the espace

oriolpont avatar Oct 22 '21 11:10 oriolpont

Thanks for reporting this!

Back when I implemented thus, bwt had no arguments that could contain spaces so I didn't bother supporting them:

https://github.com/bwt-dev/bwt-electrum-plugin/blob/ae06054c8e4335ed2b6f4e53d654f2c4b70cd10a/src/bwt.py#L93-L94

... But didn't revisit this when --tx-broadcast-cmd was added. Will look into fixing it.

shesek avatar Nov 10 '21 12:11 shesek

Fixed by 46b6d9d09b84a76a28fd5c7b516aa2ffe4331806. You can now quote arguments, for example --tx-broadcast-cmd "broadcast-tx {tx_hex}".

It might take awhile to get this released in a new version, but for now you could replace the bwt.py file in your plugin directory with updated bwt.py.

shesek avatar Nov 10 '21 12:11 shesek