From 1a502b20a6ad274b0abbbe884b024cf8138f93c9 Mon Sep 17 00:00:00 2001 From: ant013 Date: Tue, 12 Sep 2023 12:41:34 +0600 Subject: [PATCH] Change deposit format/network type for coins --- .../Receive/Address/ReceiveAddressViewItemFactory.swift | 5 ++++- .../UnstoppableWallet/en.lproj/Localizable.strings | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/UnstoppableWallet/UnstoppableWallet/Modules/Wallet/Receive/Address/ReceiveAddressViewItemFactory.swift b/UnstoppableWallet/UnstoppableWallet/Modules/Wallet/Receive/Address/ReceiveAddressViewItemFactory.swift index d61639897e..63fbb6a823 100644 --- a/UnstoppableWallet/UnstoppableWallet/Modules/Wallet/Receive/Address/ReceiveAddressViewItemFactory.swift +++ b/UnstoppableWallet/UnstoppableWallet/Modules/Wallet/Receive/Address/ReceiveAddressViewItemFactory.swift @@ -18,10 +18,13 @@ class ReceiveAddressViewItemFactory: IReceiveAddressViewItemFactory { var viewItems = [ReceiveAddressModule.Item]() viewItems.append(.value(title: "deposit.address".localized, value: item.address.address, copyable: false)) + var title: String = "deposit.address_network".localized var value: String = "" if let derivation = item.token.type.derivation { + title = "deposit.address_format".localized value = derivation.addressType + " (\(derivation.title))" } else if let addressType = item.token.type.bitcoinCashCoinType { + title = "deposit.address_format".localized value = addressType.description + " (\(addressType.title))" } else { value = item.token.blockchain.name @@ -29,7 +32,7 @@ class ReceiveAddressViewItemFactory: IReceiveAddressViewItemFactory { if !item.isMainNet { value += " (TestNet)" } - viewItems.append(.value(title: "deposit.address_format".localized, value: value, copyable: false)) + viewItems.append(.value(title: title, value: value, copyable: false)) var popupViewItem: ReceiveAddressModule.PopupWarningItem? if let address = item.address as? ActivatedDepositAddress, !address.isActive { diff --git a/UnstoppableWallet/UnstoppableWallet/en.lproj/Localizable.strings b/UnstoppableWallet/UnstoppableWallet/en.lproj/Localizable.strings index 4da457ce88..a27e8784e2 100644 --- a/UnstoppableWallet/UnstoppableWallet/en.lproj/Localizable.strings +++ b/UnstoppableWallet/UnstoppableWallet/en.lproj/Localizable.strings @@ -350,6 +350,7 @@ Go to Settings - > %@ and allow access to the camera."; "deposit.no_adapter.error" = "Can't provide address"; "deposit.address_format" = "Format"; +"deposit.address_network" = "Network"; "deposit.qr_code_description" = "Your address for depositing %@"; "deposit.qr_code_description.watch" = "Watch address of %@"; "deposit.account" = "Account";