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 {
461
461
/// Dropping first and last square brackets.
462
462
/// That modifies the upper bound value of the first match of `squareBracketRegex`.
463
463
let rawValue = String ( rawValue. dropFirst ( ) . dropLast ( ) )
464
-
464
+
465
+ // TODO: try replacing this manual parsing with JSONDecoder and RawRepresentable
466
+
465
467
let squareBracketRegex = try ! NSRegularExpression ( pattern: " ( \\ [*) " )
466
468
let match = squareBracketRegex. firstMatch ( in: rawValue, range: rawValue. fullNSRange)
467
469
@@ -504,7 +506,9 @@ extension Web3 {
504
506
private static func splitArrayOfStrings( _ rawValue: String ) -> [ String ] ? {
505
507
/// Dropping first and last square brackets to exclude them from the first and the last separated element.
506
508
let rawValue = String ( rawValue. dropFirst ( ) . dropLast ( ) )
507
-
509
+
510
+ // TODO: try replacing this manual parsing with JSONDecoder and RawRepresentable
511
+
508
512
let elementsBoundary = try ! NSRegularExpression ( pattern: " \" , \" " )
509
513
var indices = Array ( elementsBoundary
510
514
. matches ( in: rawValue, range: rawValue. fullNSRange)
You can’t perform that action at this time.
0 commit comments