Skip to content

Commit 5a699ea

Browse files
authored
Merge pull request #289 from tangem/release/3.8.0
2 parents 06e1372 + af99635 commit 5a699ea

File tree

8 files changed

+31
-23
lines changed

8 files changed

+31
-23
lines changed

CHANGELOG

+13-9
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
1-
* 36a3eb9 - (HEAD -> release/3.7.0, tag: develop-230, origin/develop, develop) Merge pull request #283 from tangem/master
2-
* 134866c - (tag: develop-229, tag: 29) Merge pull request #280 from tangem/IOS-3575-sdk-research-implement-custom-card-image
3-
* 4751c9c - Merge branch 'develop' into IOS-3575-sdk-research-implement-custom-card-image
4-
* b6fabd2 - IOS-3575 Displaying UIImage as an NFC tag for more flexibility
5-
* 15cfa9a - IOS-3575 Renamed the type
6-
* e3d7b78 - IOS-3575 Changed the code order
7-
* 69bf337 - IOS-3575 Added some docs
8-
* 83fe4f6 - IOS-3575 Whitespace
9-
* 3f9e59c - IOS-3575 Added a way to show an image in the ReadView
1+
* 8fc17cbf - (HEAD -> release/3.8.0, tag: develop-233, origin/develop, develop) Merge pull request #288 from tangem/IOS-3632-refactor-the-way-nfc-tag-is-used-in-the-sdk
2+
|\
3+
| * ee3bf439 - IOS-3632 Renamed the NFCTag enum
4+
| * 9c2b4d77 - IOS-3632 Revert "IOS-3632 Renamed NFCTag -> ScanTagImage. Moved it out of style into config"
5+
| * b38f991c - IOS-3632 Revert "IOS-3632 Grammar"
6+
| * 560d5ae8 - IOS-3632 Grammar
7+
| * 83385d67 - IOS-3632 Renamed NFCTag -> ScanTagImage. Moved it out of style into config
8+
|/
9+
* 4d94be84 - (tag: develop-232) Merge pull request #286 from tangem/IOS-3604_add_schnorr
10+
|\
11+
| * c8c63b70 - IOS-3604 Add support for schnorr wallet creation
12+
|/
13+
* 057dc40d - (tag: develop-231) Merge pull request #285 from tangem/master

TangemSdk.podspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
Pod::Spec.new do |s|
1010
s.name = 'TangemSdk'
11-
s.version = '3.7.0'
11+
s.version = '3.8.0'
1212
s.summary = 'Use TangemSdk for Tangem cards integration'
1313

1414
# This description is used to generate tags and improve search results.

TangemSdk/TangemSdk/Common/Card/EllipticCurve.swift

+1
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,5 @@ public enum EllipticCurve: String, StringCodable, CaseIterable {
1717
case bls12381_G2
1818
case bls12381_G2_AUG
1919
case bls12381_G2_POP
20+
case bip0340
2021
}

TangemSdk/TangemSdk/Crypto/CryptoUtils.swift

+8-8
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ public enum CryptoUtils {
5757
let sig = try P256.Signing.ECDSASignature(rawRepresentation: signature)
5858

5959
return pubKey.isValidSignature(sig, for: message)
60-
case .bls12381_G2, .bls12381_G2_AUG, .bls12381_G2_POP:
61-
// TODO: Add support for BLS keys.
60+
case .bls12381_G2, .bls12381_G2_AUG, .bls12381_G2_POP, .bip0340:
61+
// TODO: implement
6262
throw TangemSdkError.unsupportedCurve
6363
}
6464
}
@@ -73,8 +73,8 @@ public enum CryptoUtils {
7373
case .secp256r1:
7474
let key = try? P256.Signing.PrivateKey(rawRepresentation: privateKey)
7575
return key != nil
76-
case .bls12381_G2, .bls12381_G2_AUG, .bls12381_G2_POP:
77-
// TODO: Add support for BLS keys.
76+
case .bls12381_G2, .bls12381_G2_AUG, .bls12381_G2_POP, .bip0340:
77+
// TODO: implement
7878
throw TangemSdkError.unsupportedCurve
7979
}
8080
}
@@ -90,8 +90,8 @@ public enum CryptoUtils {
9090
case .secp256r1:
9191
let key = try P256.Signing.PrivateKey(rawRepresentation: privateKey)
9292
return key.publicKey.rawRepresentation
93-
case .bls12381_G2, .bls12381_G2_AUG, .bls12381_G2_POP:
94-
// TODO: Add support for BLS keys.
93+
case .bls12381_G2, .bls12381_G2_AUG, .bls12381_G2_POP, .bip0340:
94+
// TODO: implement
9595
throw TangemSdkError.unsupportedCurve
9696
}
9797
}
@@ -121,8 +121,8 @@ public enum CryptoUtils {
121121
let pubKey = try P256.Signing.PublicKey(x963Representation: publicKey)
122122
let sig = try P256.Signing.ECDSASignature(rawRepresentation: signature)
123123
return pubKey.isValidSignature(sig, for: CustomSha256Digest(hash: hash))
124-
case .bls12381_G2, .bls12381_G2_AUG, .bls12381_G2_POP:
125-
// TODO: Add support for BLS keys.
124+
case .bls12381_G2, .bls12381_G2_AUG, .bls12381_G2_POP, .bip0340:
125+
// TODO: implement
126126
throw TangemSdkError.unsupportedCurve
127127
}
128128
}

TangemSdk/TangemSdk/Crypto/HDWallet/BIP32/BIP32.swift

+3
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,9 @@ fileprivate extension EllipticCurve {
7474
case .bls12381_G2, .bls12381_G2_AUG, .bls12381_G2_POP:
7575
// https://eips.ethereum.org/EIPS/eip-2333#derive_master_sk
7676
fatalError("not applicable for this curve")
77+
case .bip0340:
78+
// TODO: https://tangem.atlassian.net/browse/IOS-3606
79+
fatalError("not applicable for this curve")
7780
}
7881
}
7982
}

TangemSdk/TangemSdk/UI/TangemSdkStyle.swift

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public class TangemSdkStyle: ObservableObject {
1414
public var colors: Colors = .default
1515
public var textSizes: TextSizes = .default
1616
public var indicatorWidth: Float = 12
17-
public var nfcTag: NFCTag = .genericCard
17+
public var scanTagImage: ScanTagImage = .genericCard
1818

1919
public static var `default`: TangemSdkStyle = .init()
2020
}
@@ -71,11 +71,11 @@ public extension TangemSdkStyle {
7171
@available(iOS 13.0, *)
7272
public extension TangemSdkStyle {
7373
/// Options for displaying different tags on the scanning screen
74-
enum NFCTag {
74+
enum ScanTagImage {
7575
/// Generic card provided by the SDK
7676
case genericCard
7777

78-
/// A custom tag made out of an UIImage instance.
78+
/// A custom tag made out of a UIImage instance.
7979
/// The image can be shifted vertically from the standard position by specifying `verticalOffset`.
8080
/// Note that the width of the image will be limited to a certain size, while the height will be determined by the aspect ratio of the image.
8181
/// The value of the width can be found in ReadView.swift and is 210 points at the time of the writing.

TangemSdk/TangemSdk/UI/Views/Scan/ReadView.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ struct ReadView: View {
4242

4343
@ViewBuilder
4444
private var tagView: some View {
45-
switch style.nfcTag {
45+
switch style.scanTagImage {
4646
case .genericCard:
4747
CardView(cardColor: style.colors.cardColor, starsColor: style.colors.starsColor)
4848
case .image(let uiImage, let verticalOffset):

VERSION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.7.0
1+
3.8.0

0 commit comments

Comments
 (0)