Skip to content

Swe 24 show pending transactions and allow cancel #16

Merged
merged 9 commits into from Apr 9, 2019
Prev

SWE-24 add some basic error handling for the user

  • Loading branch information
ahm11003 committed Apr 9, 2019
commit 017b7827f5f6a9499e2a1cb4fdaf71bea7dd1e28
@@ -53,7 +53,11 @@ class TransactionDetailsInterfaceController: WKInterfaceController {
contentGroup.setHidden(true)

FetchData.cancelPayment(accountAlias: acct.accountAlias, confirmationNum: t.confirmationNum, paymentId: t.paymentId) { conf, error in
guard error == nil else { return }
guard error == nil else {
self.presentAlert(withTitle: "Error", message: "We were unable to process your cancellation at this time. Please try again later.", preferredStyle: .alert, actions: [WKAlertAction(title: "Dismiss", style: .default, handler:{})])
return
}

self.activityIndicatorLabel.setHidden(true)
self.activityIndicator.stopAnimating()
self.contentGroup.setHidden(false)
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.