We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 89392c8 commit da91dfaCopy full SHA for da91dfa
Sources/ThresholdKey/Modules/TssModule.swift
@@ -546,9 +546,17 @@ public final class TssModule {
546
guard let resultJson = try JSONSerialization.jsonObject(with: resultData) as? [String: Any] else {
547
throw "Invalid factor key"
548
}
549
- guard let deviceShareJson = resultJson["deviceShare"] as? [String: Any] else {
550
- throw "Invalid factor key"
+
+ var deviceShareJson = resultJson;
551
552
+ // backward competible
553
+ if resultJson["deviceShare"] != nil {
554
+ guard let deviceShare = resultJson["deviceShare"] as? [String: Any] else {
555
+ throw "Invalid factor key"
556
+ }
557
+ deviceShareJson = deviceShare
558
559
560
guard let shareJson = deviceShareJson["share"] as? [String: Any] else {
561
562
0 commit comments