Skip to content

Commit

Permalink
Release - 0.27.0 (#1139)
Browse files Browse the repository at this point in the history
- Fixed reported issue. Now, the send button on the contact book screen will again start the transaction flow with the selected contact.
- Added screenshot prevention pop-up that informs users that screenshots and video recording are currently disabled.
- Switched methods executed in Wallet.destroy() method. Now, the app will log the "Wallet destroyed" message after it calls the wallet_destroy().
- Removed RotaryMenuOverlay and cleaned up code around that feature. Now, user when the user taps on the contact it will be navigated to the contact details.
- Updated Tor to v408.12.1
- Updated FFI to v1.4.1-rc.0
- Created AddressView UI component. The new component shows the network, features and spend key parts of the address.
- Replaced all occurrences of EmojiIdView with AddressView.
- Updated the FFI version to have access to the new TariAddress format
- PaymentInfo is now using TariAddressComponent instead of the hex string.
- Updated code around PaymentInfo to handle the new data type.
- Added uniqueIdentifier getter to TariAddressComponents. The new variable should be used to compare addresses.
- Used uniqueIdentifier in the project to compare TariAddress objects.
- Updated ContactsManager and all entities dependent on this manager to be able to handle the new Tari address format.
- Updated ContactBookCell to match new designs.
- Converted code related to deep links to be able to handle the new Tari address format.
- Removed AvatarView from most of the screens to match designs
- AvatarView is now presenting the first emoji from the spendKey
- The AddressView no longer has padding and rounded corners
- Created RoundedAddressView. The new view is a replacement for the previous implementation of the AddressView.
- Updated AddressPoisoningManager code to be able to handle addresses in the new format.
- Fixed reported issues with BLE contact shearing. Now, the user will be able to share his new Tari address using BLE.
- Now, partial backups will use the new Tari address format.
- The App is now using PaymentID for one-sided payments.
- Fixed unit tests.
- Push notification manager is now using the spend key to send remote push notifications.
- Fixed broken animations on the Splash screen on iOS 15
- Adjusted AddressView sizes for "normal" screen sizes
- Reverted recent changes in AddressView to get access to the singleLabel
- Added "chain tip" label to the "connection status" pop-up
- Replaced full obfuscated address (text) with formatted "new" address.
- Updated Yat related features to be able to handle new Tari address format.
- The user is no longer able to enter empty name when he is editing contact name (including itself).
- Fixed issue with the yat data after connecting the Yat. Now the data related to the Yat are updated after the user return to the app after connecting the Yat.
- Fixed reported issue. Now, the App will clean up wallet folder after the recovery failure and before the recovery.
- Fixed issue with selecting base node for recovery. Now, when user doesn't specify the base node the recovery will be performed on a random one from the fetched peer list.
- Disabled navigation to the settings screen when it's unavailable (e.g. when user still doesn't reach the home screen).
- Coinbase transaction titles was changed to "Mining Reward!" for inbound transactions and "You paid the Miner" for outbound transactions.
- Fixed reported issue. Now, the app will no longer show onboarding on every start when user recover his wallet from seed words.
- Fixed reported issue. Now the PopUpPresenter will be enforce SwiftEntryKit.display() to run on the main thread.
  • Loading branch information
TruszczynskiA authored Sep 12, 2024
1 parent 0c8565e commit ed7f916
Show file tree
Hide file tree
Showing 170 changed files with 2,390 additions and 3,828 deletions.
138 changes: 61 additions & 77 deletions MobileWallet.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion MobileWallet/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ final class AppDelegate: UIResponder, UIApplicationDelegate {
didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data
) {
let hexString = deviceToken.map { String(format: "%02.2hhx", $0) }.joined()
Logger.log(message: "Registed for push notifications with token \(hexString).", domain: .general, level: .info)
Logger.log(message: "Registered for push notifications with token \(hexString).", domain: .general, level: .info)
NotificationManager.shared.registerDeviceToken(deviceToken)
}

Expand Down
23 changes: 0 additions & 23 deletions MobileWallet/Assets.xcassets/Assets/TxFee.imageset/Contents.json

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"images" : [
{
"filename" : "ico-star.pdf",
"filename" : "CellArrow.pdf",
"idiom" : "universal"
}
],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"images" : [
{
"filename" : "close.pdf",
"filename" : "Info.pdf",
"idiom" : "universal"
}
],
Expand Down
Binary file not shown.

This file was deleted.

Binary file not shown.

This file was deleted.

Binary file not shown.

This file was deleted.

Binary file not shown.
Binary file not shown.
9 changes: 0 additions & 9 deletions MobileWallet/Assets.xcassets/Icons/Rotary Menu/Contents.json

This file was deleted.

This file was deleted.

Binary file not shown.
Binary file not shown.
9 changes: 0 additions & 9 deletions MobileWallet/Assets.xcassets/Icons/Star/Contents.json

This file was deleted.

4 changes: 2 additions & 2 deletions MobileWallet/Backup/Manager/BackupFilesManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ enum BackupFilesManager {
.all
.map { try $0.json }

let model = PartialBackupModel(source: try Tari.shared.walletAddress.byteVector.hex, utxos: rawUTXOs)
let model = PartialBackupModel(source: try Tari.shared.walletAddress.components.fullRaw, utxos: rawUTXOs)
let data = try jsonEncoder.encode(model)

let fileURL = workingDirectory.appendingPathComponent(unencryptedFileName)
Expand Down Expand Up @@ -142,7 +142,7 @@ enum BackupFilesManager {

try await Tari.shared.startWallet()

let sourceAddress = try TariAddress(hex: model.source)
let sourceAddress = try TariAddress(base58: model.source)

try model.utxos
.map { try UnblindedOutput(json: $0) }
Expand Down
2 changes: 1 addition & 1 deletion MobileWallet/Common/Data Models/PaymentInfo.swift
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
*/

struct PaymentInfo {
let address: String
let addressComponents: TariAddressComponents
let alias: String?
let yatID: String?
let amount: MicroTari?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@ enum DeepLinkDefaultActionsHandler {
amount = MicroTari(rawAmount)
}

let paymentInfo = PaymentInfo(address: transactionSendDeepLink.receiverAddress, alias: nil, yatID: nil, amount: amount, feePerGram: nil, note: transactionSendDeepLink.note)
guard let addressComponents = try? TariAddress(base58: transactionSendDeepLink.receiverAddress).components else { return }
let paymentInfo = PaymentInfo(addressComponents: addressComponents, alias: nil, yatID: nil, amount: amount, feePerGram: nil, note: transactionSendDeepLink.note)

Task { @MainActor in
AppRouter.presentSendTransaction(paymentInfo: paymentInfo)
Expand Down Expand Up @@ -165,7 +166,7 @@ enum DeepLinkDefaultActionsHandler {
// MARK: - Actions

private static func contactData(deeplink: ContactListDeeplink) -> [ContactData] {
deeplink.list.map { ContactData(name: $0.alias, address: $0.hex) }
deeplink.list.map { ContactData(name: $0.alias, address: $0.tariAddress) }
}

private static func contactData(deeplink: UserProfileDeeplink) -> [ContactData] {
Expand All @@ -178,7 +179,7 @@ enum DeepLinkDefaultActionsHandler {

try contacts.forEach {

let address = try TariAddress(hex: $0.address)
let address = try TariAddress(base58: $0.address)

if Tari.shared.isWalletConnected {
_ = try contactsManager.createInternalModel(name: $0.name, isFavorite: false, address: address)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ struct ContactListDeeplink {

struct Contact: Codable {
let alias: String
let hex: String
let tariAddress: String
}

let list: [Contact]
Expand Down
52 changes: 0 additions & 52 deletions MobileWallet/Common/Extensions/CGPoint+Utils.swift

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// RoundedTextView.swift
// ContactsManager+Utils.swift

/*
Package MobileWallet
Created by Adrian Truszczynski on 20/07/2021
Created by Adrian Truszczyński on 16/07/2024
Using Swift 5.0
Running on macOS 12.0
Running on macOS 14.4

Copyright 2019 The Tari Project

Expand Down Expand Up @@ -38,34 +38,19 @@
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

import UIKit

final class RoundedTextView: DynamicThemeTextView {

// MARK: - Initializers

override init() {
super.init()
setupView()
}

required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}

// MARK: - Setups

private func setupView() {

layer.cornerRadius = 10.0
textContainerInset = UIEdgeInsets(top: 12.0, left: 12.0, bottom: 12.0, right: 12.0)
textContainer.lineFragmentPadding = 0.0
}

// MARK: - Updates

override func update(theme: ColorTheme) {
super.update(theme: theme)
backgroundColor = theme.backgrounds.primary
extension ContactsManager.Model {

var contactBookCellAddressViewModel: AddressView.ViewModel {
if let alias, !alias.isEmpty {
return AddressView.ViewModel(prefix: nil, text: .single(alias), isDetailsButtonVisible: false)
} else if let addressComponents = internalModel?.addressComponents {
return AddressView.ViewModel(
prefix: addressComponents.networkAndFeatures,
text: .truncated(prefix: addressComponents.coreAddressPrefix, suffix: addressComponents.coreAddressSuffix),
isDetailsButtonVisible: false
)
} else {
return AddressView.ViewModel(prefix: nil, text: .single(""), isDetailsButtonVisible: false)
}
}
}
9 changes: 4 additions & 5 deletions MobileWallet/Common/Extensions/Data+Utlis.swift
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ extension Data {
case last
}

var string: String { String(decoding: self, as: UTF8.self) }

var isBLEChunk: Bool { bleChunkType != nil }

var bleChunkType: BLEChunkType? {
Expand Down Expand Up @@ -92,14 +94,11 @@ extension Data {

extension Array where Element == Data {

var stringFromBLEChunks: String? { dataFromBLEChunks?.string }

var dataFromBLEChunks: Data? {
guard first(where: { !$0.isBLEChunk }) == nil else { return nil }
return map { $0.dropLast() }
.reduce(into: Data()) { $0.append($1) }
}

var stringFromBLEChunks: String? {
guard let dataFromBLEChunks else { return nil }
return String(data: dataFromBLEChunks, encoding: .utf8)
}
}
7 changes: 2 additions & 5 deletions MobileWallet/Common/Extensions/String.swift
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,13 @@ import UIKit

extension String {

static var dots: Self { "•••" }

var firstOrEmpty: String {
guard let first else { return "" }
return String(first)
}

var obfuscatedText: String {
guard count >= 9 else { return self }
return "\(prefix(3))•••\(suffix(3))"
}

func insertSeparator(_ separatorString: String, atEvery n: Int) -> String {
guard 0 < n else { return self }
return self.enumerated().map({String($0.element) + (($0.offset != self.count - 1 && $0.offset % n == n - 1) ? "\(separatorString)" : "")}).joined()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// CGFloat+Utils.swift
// UInt8+Utils.swift

/*
Package MobileWallet
Created by Adrian Truszczyński on 19/06/2023
Created by Adrian Truszczyński on 03/07/2024
Using Swift 5.0
Running on macOS 13.4
Running on macOS 14.4

Copyright 2019 The Tari Project

Expand Down Expand Up @@ -38,11 +38,13 @@
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

extension CGFloat {
extension UInt8 {

var degToRad: CGFloat { self * .pi / 180.0 }

static func angle(normalizedDegrees: CGFloat) -> CGFloat {
normalizedDegrees.degToRad - (.pi / 2.0)
var tariEmoji: String {
get throws {
try TariEmojis().all[Int(self)]
}
}

func flag(bitmask: UInt8) -> Bool { self & bitmask == bitmask }
}
Loading

0 comments on commit ed7f916

Please sign in to comment.