diff --git a/KinBase.podspec b/KinBase.podspec index f59e6aa..403eabd 100644 --- a/KinBase.podspec +++ b/KinBase.podspec @@ -8,7 +8,7 @@ # Pod::Spec.new do |s| s.name = 'KinBase' - s.version = '2.1.1' + s.version = '2.1.2' s.summary = 'Kin SDK for iOS' s.description = <<-DESC diff --git a/KinBase/KinBase.xcodeproj/project.pbxproj b/KinBase/KinBase.xcodeproj/project.pbxproj index bfdc9f8..0ebd704 100644 --- a/KinBase/KinBase.xcodeproj/project.pbxproj +++ b/KinBase/KinBase.xcodeproj/project.pbxproj @@ -1799,7 +1799,7 @@ "@executable_path/Frameworks", "@loader_path/Frameworks", ); - MARKETING_VERSION = 2.1.1; + MARKETING_VERSION = 2.1.2; OTHER_LDFLAGS = ( "$(inherited)", "-l\"c++\"", @@ -1841,7 +1841,7 @@ "@executable_path/Frameworks", "@loader_path/Frameworks", ); - MARKETING_VERSION = 2.1.1; + MARKETING_VERSION = 2.1.2; ONLY_ACTIVE_ARCH = YES; OTHER_LDFLAGS = ( "$(inherited)", diff --git a/KinBase/KinBase/Src/Model/KinTransaction.swift b/KinBase/KinBase/Src/Model/KinTransaction.swift index 9b321a5..7e492c0 100644 --- a/KinBase/KinBase/Src/Model/KinTransaction.swift +++ b/KinBase/KinBase/Src/Model/KinTransaction.swift @@ -100,23 +100,26 @@ public class KinTransaction: Equatable, KinTransactionType { self.network = network self.invoiceList = invoiceList - if let solanaTransaction = Transaction(data: Data(envelopeXdrBytes)) { - self.transactionHash = solanaTransaction.transactionHash - self.sourceAccount = solanaTransaction.sourceAccount - self.memo = solanaTransaction.memo - self.paymentOperations = solanaTransaction.paymentOperations - } else { - guard let historyItem = historyItem else { + if let historyItem = historyItem { + guard let payments = historyItem.paymentsArray as NSArray as? [APBTransactionV4HistoryItem_Payment] else { + throw Errors.unknown + } + guard let payment = payments.first else { throw Errors.unknown } - let payments = historyItem.paymentsArray as NSArray as! [APBTransactionV4HistoryItem_Payment] - let payment = payments.first! self.transactionHash = KinTransactionHash(historyItem.transactionId.value) self.sourceAccount = payment.source.publicKey self.memo = KinMemo.none self.paymentOperations = payments.compactMap { KinPaymentOperation(amount: Kin($0.amount), source: $0.source.publicKey, destination: $0.destination.publicKey, isNonNativeAsset: false) } + } else if let solanaTransaction = Transaction(data: Data(envelopeXdrBytes)) { + self.transactionHash = solanaTransaction.transactionHash + self.sourceAccount = solanaTransaction.sourceAccount + self.memo = solanaTransaction.memo + self.paymentOperations = solanaTransaction.paymentOperations + } else { + throw Errors.unknown } } diff --git a/KinBase/README.md b/KinBase/README.md index 0a8aebd..880c21b 100644 --- a/KinBase/README.md +++ b/KinBase/README.md @@ -7,7 +7,7 @@ The KinBase module is the foundation upon which the rest of the SDK stands. ## Installation Add the following to your Podfile. ``` -pod 'KinBase', '~> 2.1.1' +pod 'KinBase', '~> 2.1.2' ``` ## Overview diff --git a/KinDesign.podspec b/KinDesign.podspec index 3ad662c..407d416 100644 --- a/KinDesign.podspec +++ b/KinDesign.podspec @@ -3,7 +3,7 @@ # Pod::Spec.new do |s| s.name = 'KinDesign' - s.version = '2.1.1' + s.version = '2.1.2' s.summary = 'Kin Design Library for iOS' s.description = <<-DESC diff --git a/KinDesign/KinDesign.xcodeproj/project.pbxproj b/KinDesign/KinDesign.xcodeproj/project.pbxproj index 5f77334..b370cd5 100644 --- a/KinDesign/KinDesign.xcodeproj/project.pbxproj +++ b/KinDesign/KinDesign.xcodeproj/project.pbxproj @@ -430,7 +430,7 @@ "@executable_path/Frameworks", "@loader_path/Frameworks", ); - MARKETING_VERSION = 2.1.1; + MARKETING_VERSION = 2.1.2; PRODUCT_BUNDLE_IDENTIFIER = org.kin..KinDesign; PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; SKIP_INSTALL = YES; @@ -458,7 +458,7 @@ "@executable_path/Frameworks", "@loader_path/Frameworks", ); - MARKETING_VERSION = 2.1.1; + MARKETING_VERSION = 2.1.2; PRODUCT_BUNDLE_IDENTIFIER = org.kin..KinDesign; PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; SKIP_INSTALL = YES; diff --git a/KinDesign/README.md b/KinDesign/README.md index b116467..64a5c21 100644 --- a/KinDesign/README.md +++ b/KinDesign/README.md @@ -10,7 +10,7 @@ All of these components can be tested out and browsed in the [sample app](../Kin ## Installation Add the following to your project's Podfile. ``` -pod 'KinDesign', '~> 2.1.1' +pod 'KinDesign', '~> 2.1.2' ``` ### Primary Button diff --git a/KinSampleApp/KinSampleApp.xcodeproj/project.pbxproj b/KinSampleApp/KinSampleApp.xcodeproj/project.pbxproj index 3bcd414..15e023e 100644 --- a/KinSampleApp/KinSampleApp.xcodeproj/project.pbxproj +++ b/KinSampleApp/KinSampleApp.xcodeproj/project.pbxproj @@ -580,7 +580,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 2.1.1; + MARKETING_VERSION = 2.1.2; PRODUCT_BUNDLE_IDENTIFIER = org.kin..KinSampleApp; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_VERSION = 5.0; @@ -602,7 +602,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 2.1.1; + MARKETING_VERSION = 2.1.2; PRODUCT_BUNDLE_IDENTIFIER = org.kin..KinSampleApp; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_VERSION = 5.0; diff --git a/KinUX.podspec b/KinUX.podspec index 5820af3..16aae2e 100644 --- a/KinUX.podspec +++ b/KinUX.podspec @@ -3,7 +3,7 @@ # Pod::Spec.new do |s| s.name = 'KinUX' - s.version = '2.1.1' + s.version = '2.1.2' s.summary = 'UX Library for Kin SDK iOS' s.description = <<-DESC @@ -20,8 +20,8 @@ Pod::Spec.new do |s| s.source_files = 'KinUX/KinUX/Src/**/*' - s.dependency 'KinBase', '~> 2.1.1' - s.dependency 'KinDesign', '~> 2.1.1' + s.dependency 'KinBase', '~> 2.1.2' + s.dependency 'KinDesign', '~> 2.1.2' # Dependencies needed for KinGrpcApi s.dependency 'gRPC-ProtoRPC' diff --git a/KinUX/KinUX.xcodeproj/project.pbxproj b/KinUX/KinUX.xcodeproj/project.pbxproj index 9d3ed85..c105a79 100644 --- a/KinUX/KinUX.xcodeproj/project.pbxproj +++ b/KinUX/KinUX.xcodeproj/project.pbxproj @@ -589,7 +589,7 @@ "@executable_path/Frameworks", "@loader_path/Frameworks", ); - MARKETING_VERSION = 2.1.1; + MARKETING_VERSION = 2.1.2; PRODUCT_BUNDLE_IDENTIFIER = org.kin..KinUX; PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; SKIP_INSTALL = YES; @@ -619,7 +619,7 @@ "@executable_path/Frameworks", "@loader_path/Frameworks", ); - MARKETING_VERSION = 2.1.1; + MARKETING_VERSION = 2.1.2; PRODUCT_BUNDLE_IDENTIFIER = org.kin..KinUX; PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; SKIP_INSTALL = YES; diff --git a/KinUX/README.md b/KinUX/README.md index 6b19c87..cd91443 100644 --- a/KinUX/README.md +++ b/KinUX/README.md @@ -6,7 +6,7 @@ The KinUX module provides an easy to use out of the box spend flow UI that is pr Add the following to your project's Podfile. This will also transitively pull in KinBase and KinDesign into your project as well. ``` -pod 'KinUX', '~> 2.1.1' +pod 'KinUX', '~> 2.1.2' ``` ## Overview diff --git a/README.md b/README.md index c145d47..c722dd5 100644 --- a/README.md +++ b/README.md @@ -26,13 +26,13 @@ In your Podfile ``` // If you just want to access the blockchain & no UI -pod 'KinBase', '~> 2.1.1' +pod 'KinBase', '~> 2.1.2' // Add spend to use the modal spend flow to allow users to buy things with Kin -pod 'KinUX', '~> 2.1.1' +pod 'KinUX', '~> 2.1.2' // Add design for direct access to UI views you can use in your own app -pod 'KinDesign', '~> 2.1.1' +pod 'KinDesign', '~> 2.1.2' ``` ## Sample App