Skip to content

Commit

Permalink
Change deposit format/network type for coins
Browse files Browse the repository at this point in the history
  • Loading branch information
ant013 committed Sep 12, 2023
1 parent c276b62 commit 3def8f8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,21 @@ 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
}
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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down

0 comments on commit 3def8f8

Please sign in to comment.