Merge pull request #635 from alpha-wallet/fix-wrong-message-shown-when-token-transfer-fails

Fix: wrong text shown in token transfer UI
pull/639/head
James Sangalli 6 years ago committed by GitHub
commit 707158a5af
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 10
      AlphaWallet/Transfer/Coordinators/TransferNFTCoordinator.swift

@ -20,14 +20,17 @@ class TransferNFTCoordinator: Coordinator {
let account: Account
let viewController: UIViewController
var statusViewController: StatusViewController?
var address: Address?
weak var delegate: TransferNFTCoordinatorDelegate?
var status = StatusViewControllerViewModel.State.processing {
didSet {
guard let address = address else { return }
let tokenTypeName = XMLHandler(contract: address.eip55String).getTokenTypeName(.singular)
statusViewController?.configure(viewModel: .init(
state: status,
inProgressText: R.string.localizable.aClaimTicketInProgressTitle(),
succeededTextText: R.string.localizable.aClaimTicketSuccessTitle(),
failedText: R.string.localizable.aClaimTicketFailedTitle()
inProgressText: R.string.localizable.aWalletTicketTokenTransferInProgressTitle(tokenTypeName),
succeededTextText: R.string.localizable.aWalletTicketTokenTransferSuccessTitle(tokenTypeName),
failedText: R.string.localizable.aWalletTicketTokenTransferFailedTitle(tokenTypeName)
))
}
}
@ -44,6 +47,7 @@ class TransferNFTCoordinator: Coordinator {
func start() {
guard let address = validateAddress() else { return }
self.address = address
showProgressViewController(address: address)
transfer(address: address)
}

Loading…
Cancel
Save