Fix bech32 decoding bug

Changelog-Fixed: Fix some lnurls not getting decoded properly
This commit is contained in:
William Casarin
2023-02-06 10:47:06 -08:00
parent 0b476faff7
commit 140b0e4fc4

View File

@@ -147,7 +147,7 @@ public func bech32_decode(_ str: String) throws -> (hrp: String, data: Data)? {
guard let strBytes = str.data(using: .utf8) else {
throw Bech32Error.nonUTF8String
}
guard strBytes.count <= 90 else {
guard strBytes.count <= 2024 else {
throw Bech32Error.stringLengthExceeded
}
var lower: Bool = false