Skip to content

Commit 25e83ac

Browse files
committed
IOS-5986 Ignore only concrete errors
1 parent 2ffb346 commit 25e83ac

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

TangemSdk/TangemSdk/Operations/Derivation/DeriveWalletPublicKeysTask.swift

+8-2
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,18 @@ public class DeriveWalletPublicKeysTask: CardSessionRunnable {
4040
let task = DeriveWalletPublicKeyTask(walletPublicKey: walletPublicKey, derivationPath: path)
4141
task.run(in: session) { result in
4242
var keys = keys
43-
43+
4444
switch result {
4545
case .success(let key):
4646
keys[path] = key
4747
case .failure(let error):
48-
Log.error(error)
48+
switch error {
49+
case .nonHardenedDerivationNotSupported, .walletNotFound, .unsupportedCurve:
50+
Log.error(error)
51+
default:
52+
completion(.failure(error))
53+
return
54+
}
4955
}
5056

5157
self.runDerivation(at: index + 1, keys: keys, in: session, completion: completion)

0 commit comments

Comments
 (0)