File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Sources/web3swift/Utils/EIP Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -461,7 +461,9 @@ extension Web3 {
461461 /// Dropping first and last square brackets.
462462 /// That modifies the upper bound value of the first match of `squareBracketRegex`.
463463 let rawValue = String ( rawValue. dropFirst ( ) . dropLast ( ) )
464-
464+
465+ // TODO: try replacing this manual parsing with JSONDecoder and RawRepresentable
466+
465467 let squareBracketRegex = try ! NSRegularExpression ( pattern: " ( \\ [*) " )
466468 let match = squareBracketRegex. firstMatch ( in: rawValue, range: rawValue. fullNSRange)
467469
@@ -504,7 +506,9 @@ extension Web3 {
504506 private static func splitArrayOfStrings( _ rawValue: String ) -> [ String ] ? {
505507 /// Dropping first and last square brackets to exclude them from the first and the last separated element.
506508 let rawValue = String ( rawValue. dropFirst ( ) . dropLast ( ) )
507-
509+
510+ // TODO: try replacing this manual parsing with JSONDecoder and RawRepresentable
511+
508512 let elementsBoundary = try ! NSRegularExpression ( pattern: " \" , \" " )
509513 var indices = Array ( elementsBoundary
510514 . matches ( in: rawValue, range: rawValue. fullNSRange)
You can’t perform that action at this time.
0 commit comments