attempt to decode signatures with base64

This commit is contained in:
Matthew Fosse 2024-04-24 10:14:57 -07:00
parent 843cff4cdf
commit c36e91237c

View file

@ -1246,7 +1246,13 @@ abstract class ElectrumWalletBase
return false; return false;
} }
final sigDecodedBytes = hex.decode(signature); List<int> sigDecodedBytes = [];
if (signature.endsWith('=')) {
sigDecodedBytes = base64.decode(signature);
} else {
sigDecodedBytes = hex.decode(signature);
}
if (sigDecodedBytes.length != 64 && sigDecodedBytes.length != 65) { if (sigDecodedBytes.length != 64 && sigDecodedBytes.length != 65) {
throw ArgumentException( throw ArgumentException(