electrum icon indicating copy to clipboard operation
electrum copied to clipboard

tx: replace all whitespace chars in raw tx (convert_raw_tx_to_hex)

Open f321x opened this issue 1 month ago • 0 comments

Removes all whitespace characters from a raw transaction string in convert_raw_tx_to_hex(). This is useful for example when loading raw transactions from text input as it happens that there are some newline characters in the text. I noticed this when copying-pasting from a timelock recovery pdf.

E.g. this is a single tx, removing the newlines manually is quite annoying:

02000000000104AA2F554D78B5B785B52CC396B20DC1259A63438D9B9851B717C232EA4CD7A41B0000000000FDFFFFFF5B0F29
67003923F338AA0CEB628C0012329881DD98DBB4A17D8F798A1FA7FE330000000000FDFFFFFFD164BEB8792B7871DBFB17FAE1
FB8C103F566A6DA53B8D137A87EE13AB029AB50100000000FDFFFFFF667821EE01F47A9F833B6298A2817AF82D4767901C42CD
9885179E1D84F493E80100000000FDFFFFFF0358020000000000001600140D10180CA80C936E8060229FB4754F4174F5B06E58
020000000000001600144FC93671899237C42AE13A0DEA50D1838822FCAE65981F00000000001600146E777C49135536FA4F40
B6D15CF0D2E5389B90D302473044022059EA1286E440A94E086334192B0DC8FA3B48183D87D91987230F7DDBECCA794402207A
1A88A4146A9E46A486720FD849D861490E6F267527A9D1DB65D11B1A42F8BA012102D1589A49839AD6C9E88770B6E6B9069FC4
04AEF6F5F27DF92C3C336843ECFDAC02473044022009CBC46F47F7F27F6BED007D4DD38FF861DDDF4537322CE8E5705B73D71A
AB27022052DAF39F31A72CA705C7C75CCC6C005FB77074A309892D093F662A55769CB98A012103E92383B64B878F55210EDBD2
CD2FBF54760E6B02A180605CC981438D8BE4EF1E02473044022059DA0981CC3349325B80510B74D7B3D8029A3E74ED81307379
542121FAC4AFF20220084A8B998FF492A1BB85CF2CF4F829465AE4C377C1E4E8BCA36ED18777093BD0012102481C80E2785E84
6C47B2008F1B977C24931447021CC119C59B08FFFDDA09363A0247304402203110947852D71A2E743F4136D65E594EAE22C8BB
55145F2E70D3E0B8EBA6985B022022C4DF0C8FD5C9CA41A94427FA8888A0FC3693C3DFBADF7540733DB088EC4ED701210263F2
46322CB912A056634890AC2142C1CDDC7BEEBBFD4D37ABCA7B5CDB60ABC22C032900

f321x avatar Dec 10 '25 14:12 f321x