@@ -73,7 +73,6 @@ private func nilOrValue<T>(_ value: Any?) -> T? {
7373 return value as! T ?
7474}
7575
76- // swift-format-ignore: AlwaysUseLowerCamelCase
7776func deepEqualssk2_pigeon( _ lhs: Any ? , _ rhs: Any ? ) -> Bool {
7877 let cleanLhs = nilOrValue ( lhs) as Any ?
7978 let cleanRhs = nilOrValue ( rhs) as Any ?
@@ -115,7 +114,6 @@ func deepEqualssk2_pigeon(_ lhs: Any?, _ rhs: Any?) -> Bool {
115114 }
116115}
117116
118- // swift-format-ignore: AlwaysUseLowerCamelCase
119117func deepHashsk2_pigeon( value: Any ? , hasher: inout Hasher ) {
120118 if let valueList = value as? [ AnyHashable ] {
121119 for item in valueList { deepHashsk2_pigeon ( value: item, hasher: & hasher) }
@@ -211,6 +209,9 @@ struct SK2SubscriptionOfferMessage: Hashable {
211209 paymentMode,
212210 ]
213211 }
212+ static func == ( lhs: SK2SubscriptionOfferMessage , rhs: SK2SubscriptionOfferMessage ) -> Bool {
213+ return deepEqualssk2_pigeon ( lhs. toList ( ) , rhs. toList ( ) )
214+ }
214215 func hash( into hasher: inout Hasher ) {
215216 deepHashsk2_pigeon ( value: toList ( ) , hasher: & hasher)
216217 }
@@ -239,6 +240,9 @@ struct SK2SubscriptionPeriodMessage: Hashable {
239240 unit,
240241 ]
241242 }
243+ static func == ( lhs: SK2SubscriptionPeriodMessage , rhs: SK2SubscriptionPeriodMessage ) -> Bool {
244+ return deepEqualssk2_pigeon ( lhs. toList ( ) , rhs. toList ( ) )
245+ }
242246 func hash( into hasher: inout Hasher ) {
243247 deepHashsk2_pigeon ( value: toList ( ) , hasher: & hasher)
244248 }
@@ -272,6 +276,9 @@ struct SK2SubscriptionInfoMessage: Hashable {
272276 subscriptionPeriod,
273277 ]
274278 }
279+ static func == ( lhs: SK2SubscriptionInfoMessage , rhs: SK2SubscriptionInfoMessage ) -> Bool {
280+ return deepEqualssk2_pigeon ( lhs. toList ( ) , rhs. toList ( ) )
281+ }
275282 func hash( into hasher: inout Hasher ) {
276283 deepHashsk2_pigeon ( value: toList ( ) , hasher: & hasher)
277284 }
@@ -333,6 +340,9 @@ struct SK2ProductMessage: Hashable {
333340 priceLocale,
334341 ]
335342 }
343+ static func == ( lhs: SK2ProductMessage , rhs: SK2ProductMessage ) -> Bool {
344+ return deepEqualssk2_pigeon ( lhs. toList ( ) , rhs. toList ( ) )
345+ }
336346 func hash( into hasher: inout Hasher ) {
337347 deepHashsk2_pigeon ( value: toList ( ) , hasher: & hasher)
338348 }
@@ -359,6 +369,9 @@ struct SK2PriceLocaleMessage: Hashable {
359369 currencySymbol,
360370 ]
361371 }
372+ static func == ( lhs: SK2PriceLocaleMessage , rhs: SK2PriceLocaleMessage ) -> Bool {
373+ return deepEqualssk2_pigeon ( lhs. toList ( ) , rhs. toList ( ) )
374+ }
362375 func hash( into hasher: inout Hasher ) {
363376 deepHashsk2_pigeon ( value: toList ( ) , hasher: & hasher)
364377 }
@@ -396,6 +409,11 @@ struct SK2SubscriptionOfferSignatureMessage: Hashable {
396409 signature,
397410 ]
398411 }
412+ static func == (
413+ lhs: SK2SubscriptionOfferSignatureMessage , rhs: SK2SubscriptionOfferSignatureMessage
414+ ) -> Bool {
415+ return deepEqualssk2_pigeon ( lhs. toList ( ) , rhs. toList ( ) )
416+ }
399417 func hash( into hasher: inout Hasher ) {
400418 deepHashsk2_pigeon ( value: toList ( ) , hasher: & hasher)
401419 }
@@ -422,6 +440,11 @@ struct SK2SubscriptionOfferPurchaseMessage: Hashable {
422440 promotionalOfferSignature,
423441 ]
424442 }
443+ static func == (
444+ lhs: SK2SubscriptionOfferPurchaseMessage , rhs: SK2SubscriptionOfferPurchaseMessage
445+ ) -> Bool {
446+ return deepEqualssk2_pigeon ( lhs. toList ( ) , rhs. toList ( ) )
447+ }
425448 func hash( into hasher: inout Hasher ) {
426449 deepHashsk2_pigeon ( value: toList ( ) , hasher: & hasher)
427450 }
@@ -456,6 +479,11 @@ struct SK2ProductPurchaseOptionsMessage: Hashable {
456479 winBackOfferId,
457480 ]
458481 }
482+ static func == ( lhs: SK2ProductPurchaseOptionsMessage , rhs: SK2ProductPurchaseOptionsMessage )
483+ -> Bool
484+ {
485+ return deepEqualssk2_pigeon ( lhs. toList ( ) , rhs. toList ( ) )
486+ }
459487 func hash( into hasher: inout Hasher ) {
460488 deepHashsk2_pigeon ( value: toList ( ) , hasher: & hasher)
461489 }
@@ -518,6 +546,9 @@ struct SK2TransactionMessage: Hashable {
518546 jsonRepresentation,
519547 ]
520548 }
549+ static func == ( lhs: SK2TransactionMessage , rhs: SK2TransactionMessage ) -> Bool {
550+ return deepEqualssk2_pigeon ( lhs. toList ( ) , rhs. toList ( ) )
551+ }
521552 func hash( into hasher: inout Hasher ) {
522553 deepHashsk2_pigeon ( value: toList ( ) , hasher: & hasher)
523554 }
@@ -695,6 +726,8 @@ protocol InAppPurchase2API {
695726 func isIntroductoryOfferEligible(
696727 productId: String , completion: @escaping ( Result < Bool , Error > ) -> Void )
697728 func transactions( completion: @escaping ( Result < [ SK2TransactionMessage ] , Error > ) -> Void )
729+ func unfinishedTransactions(
730+ completion: @escaping ( Result < [ SK2TransactionMessage ] , Error > ) -> Void )
698731 func finish( id: Int64 , completion: @escaping ( Result < Void , Error > ) -> Void )
699732 func startListeningToTransactions( ) throws
700733 func stopListeningToTransactions( ) throws
@@ -828,6 +861,24 @@ class InAppPurchase2APISetup {
828861 } else {
829862 transactionsChannel. setMessageHandler ( nil )
830863 }
864+ let unfinishedTransactionsChannel = FlutterBasicMessageChannel (
865+ name:
866+ " dev.flutter.pigeon.in_app_purchase_storekit.InAppPurchase2API.unfinishedTransactions \( channelSuffix) " ,
867+ binaryMessenger: binaryMessenger, codec: codec)
868+ if let api = api {
869+ unfinishedTransactionsChannel. setMessageHandler { _, reply in
870+ api. unfinishedTransactions { result in
871+ switch result {
872+ case . success( let res) :
873+ reply ( wrapResult ( res) )
874+ case . failure( let error) :
875+ reply ( wrapError ( error) )
876+ }
877+ }
878+ }
879+ } else {
880+ unfinishedTransactionsChannel. setMessageHandler ( nil )
881+ }
831882 let finishChannel = FlutterBasicMessageChannel (
832883 name: " dev.flutter.pigeon.in_app_purchase_storekit.InAppPurchase2API.finish \( channelSuffix) " ,
833884 binaryMessenger: binaryMessenger, codec: codec)
0 commit comments