Fix invoice callback

This commit is contained in:
Ilya Laktyushin 2022-08-15 13:59:45 +03:00
parent 24be14be56
commit 24fb254948
3 changed files with 13 additions and 10 deletions

View File

@ -180,6 +180,7 @@ public final class BotCheckoutController: ViewController {
guard !self.didCancel && !self.didFail && !self.didComplete else {
return
}
self.didCancel = true
self.cancelled()
}
@ -188,6 +189,7 @@ public final class BotCheckoutController: ViewController {
guard !self.didCancel && !self.didFail && !self.didComplete else {
return
}
self.didFail = true
self.failed()
}
@ -196,6 +198,7 @@ public final class BotCheckoutController: ViewController {
guard !self.didCancel && !self.didFail && !self.didComplete else {
return
}
self.didComplete = true
self.completed(currencyValue, receiptMessageId)
}

View File

@ -1299,8 +1299,8 @@ final class BotCheckoutControllerNode: ItemListControllerNode, PKPaymentAuthoriz
}
if success {
strongSelf.dismissAnimated()
strongSelf.completed(currencyValue, receiptMessageId)
strongSelf.dismissAnimated()
} else {
strongSelf.dismissAnimated()
}

View File

@ -208,15 +208,15 @@ class PremiumStarComponent: Component {
"rotate",
"tapRotate"
]
if #available(iOS 11.0, *) {
for key in keys {
node.removeAnimation(forKey: key, blendOutDuration: 0.1)
}
} else {
// if #available(iOS 11.0, *) {
// for key in keys {
// node.removeAnimation(forKey: key, blendOutDuration: 0.1)
// }
// } else {
for key in keys {
node.removeAnimation(forKey: key)
}
}
// }
switch gesture.state {
case .began:
@ -535,9 +535,9 @@ class PremiumStarComponent: Component {
let to = SCNVector3(x: 0.0, y: toValue, z: 0.0)
let distance = rad2deg(to.y - from.y)
// guard !distance.isZero else {
// return
// }
guard !distance.isZero else {
return
}
let springAnimation = CASpringAnimation(keyPath: "eulerAngles")
springAnimation.fromValue = NSValue(scnVector3: from)