Skip to content

Commit

Permalink
Merge pull request #420 from Adamant-im/develop
Browse files Browse the repository at this point in the history
Release 3.4.0
  • Loading branch information
StanislavDevIOS authored Jan 19, 2024
2 parents ff2cc61 + 873478d commit 6a5c8d7
Show file tree
Hide file tree
Showing 98 changed files with 2,916 additions and 560 deletions.
23 changes: 21 additions & 2 deletions Adamant.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@
3AA50DF12AEBE66A00C58FC8 /* PartnerQRViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AA50DF02AEBE66A00C58FC8 /* PartnerQRViewModel.swift */; };
3AA50DF32AEBE67C00C58FC8 /* PartnerQRFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AA50DF22AEBE67C00C58FC8 /* PartnerQRFactory.swift */; };
3AC76E3D2AB09118008042C4 /* ElegantEmojiPicker in Frameworks */ = {isa = PBXBuildFile; productRef = 3AC76E3C2AB09118008042C4 /* ElegantEmojiPicker */; };
3AF08D5F2B4EB3A200EB82B1 /* LanguageService.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AF08D5E2B4EB3A200EB82B1 /* LanguageService.swift */; };
3AF08D612B4EB3C400EB82B1 /* LanguageStorageProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AF08D602B4EB3C400EB82B1 /* LanguageStorageProtocol.swift */; };
3AF53F8D2B3DCFA300B30312 /* NodeGroup+Constants.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AF53F8C2B3DCFA300B30312 /* NodeGroup+Constants.swift */; };
3C06931576393125C61FB8F6 /* Pods_Adamant.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 33975C0D891698AA7E74EBCC /* Pods_Adamant.framework */; };
41047B70294B5EE10039E956 /* VisibleWalletsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 41047B6F294B5EE10039E956 /* VisibleWalletsViewController.swift */; };
41047B72294B5F210039E956 /* VisibleWalletsTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 41047B71294B5F210039E956 /* VisibleWalletsTableViewCell.swift */; };
Expand Down Expand Up @@ -668,6 +671,12 @@
3AA50DEE2AEBE65D00C58FC8 /* PartnerQRView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PartnerQRView.swift; sourceTree = "<group>"; };
3AA50DF02AEBE66A00C58FC8 /* PartnerQRViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PartnerQRViewModel.swift; sourceTree = "<group>"; };
3AA50DF22AEBE67C00C58FC8 /* PartnerQRFactory.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PartnerQRFactory.swift; sourceTree = "<group>"; };
3AF08D5B2B4E7FFC00EB82B1 /* zh */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = zh; path = zh.lproj/InfoPlist.strings; sourceTree = "<group>"; };
3AF08D5C2B4E7FFC00EB82B1 /* zh */ = {isa = PBXFileReference; lastKnownFileType = text.plist.stringsdict; name = zh; path = zh.lproj/Localizable.stringsdict; sourceTree = "<group>"; };
3AF08D5D2B4E7FFC00EB82B1 /* zh */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = zh; path = zh.lproj/Localizable.strings; sourceTree = "<group>"; };
3AF08D5E2B4EB3A200EB82B1 /* LanguageService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LanguageService.swift; sourceTree = "<group>"; };
3AF08D602B4EB3C400EB82B1 /* LanguageStorageProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LanguageStorageProtocol.swift; sourceTree = "<group>"; };
3AF53F8C2B3DCFA300B30312 /* NodeGroup+Constants.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "NodeGroup+Constants.swift"; sourceTree = "<group>"; };
41047B6F294B5EE10039E956 /* VisibleWalletsViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VisibleWalletsViewController.swift; sourceTree = "<group>"; };
41047B71294B5F210039E956 /* VisibleWalletsTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VisibleWalletsTableViewCell.swift; sourceTree = "<group>"; };
41047B73294C61D10039E956 /* VisibleWalletsService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VisibleWalletsService.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -1924,6 +1933,7 @@
93ADC17C2B083C3B00F2DF77 /* NodesAdditionalParamsStorageProtocol.swift */,
3A2F55FB2AC6F885000A3F26 /* CoinStorage.swift */,
3A96E37B2AED27F8001F5A52 /* PartnerQRService.swift */,
3AF08D602B4EB3C400EB82B1 /* LanguageStorageProtocol.swift */,
);
path = ServiceProtocols;
sourceTree = "<group>";
Expand Down Expand Up @@ -1960,6 +1970,7 @@
93ADC17E2B083D7A00F2DF77 /* NodesAdditionalParamsStorage.swift */,
3A2F55FD2AC6F90E000A3F26 /* AdamantCoinStorageService.swift */,
3A96E3792AED27D7001F5A52 /* AdamantPartnerQRService.swift */,
3AF08D5E2B4EB3A200EB82B1 /* LanguageService.swift */,
);
path = Services;
sourceTree = "<group>";
Expand Down Expand Up @@ -2035,6 +2046,7 @@
93CCAE7F2B06E2D100EA5B94 /* ApiServiceError+Extension.swift */,
939FA3412B0D6F0000710EC6 /* SelfRemovableHostingController.swift */,
936658942B0AC15300BDB2D3 /* Node+UI.swift */,
3AF53F8C2B3DCFA300B30312 /* NodeGroup+Constants.swift */,
);
path = Helpers;
sourceTree = "<group>";
Expand Down Expand Up @@ -2702,6 +2714,7 @@
ru,
de,
Base,
zh,
);
mainGroup = E913C8E51FFFA51D001A83F7;
packageReferences = (
Expand Down Expand Up @@ -3139,6 +3152,7 @@
E9E7CDB32002B9FB00DFC4DB /* LoginFactory.swift in Sources */,
E941CCDE20E7B70200C96220 /* WalletCollectionViewCell.swift in Sources */,
4186B33A294200F4006594A3 /* DashWalletService+DynamicConstants.swift in Sources */,
3AF08D5F2B4EB3A200EB82B1 /* LanguageService.swift in Sources */,
E9AA8BFA212C166600F9249F /* EthWalletService+Send.swift in Sources */,
411743042A39B257008CD98A /* ContributeViewModel.swift in Sources */,
93E5D4DB293000BE00439298 /* UnregisteredTransaction.swift in Sources */,
Expand Down Expand Up @@ -3303,6 +3317,7 @@
E9B4E1A8210F079E007E77FC /* DoubleDetailsTableViewCell.swift in Sources */,
E9502740202E257E002C1098 /* RepeaterService.swift in Sources */,
E93D7AC02052CF63005D19DC /* AdamantNotificationService.swift in Sources */,
3AF53F8D2B3DCFA300B30312 /* NodeGroup+Constants.swift in Sources */,
411743002A39B1D2008CD98A /* ContributeFactory.swift in Sources */,
A5E04224282A830B0076CD13 /* BtcTransactionsViewController.swift in Sources */,
645938942378395E00A2BE7C /* EulaViewController.swift in Sources */,
Expand Down Expand Up @@ -3360,6 +3375,7 @@
93ADC17B2B08283500F2DF77 /* ForceQueryItemsEncoding.swift in Sources */,
41BCB310295C6082004B12AB /* VisibleWalletsResetTableViewCell.swift in Sources */,
93CCAE7B2B06D9B500EA5B94 /* DogeBlocksDTO.swift in Sources */,
3AF08D612B4EB3C400EB82B1 /* LanguageStorageProtocol.swift in Sources */,
E9E7CDB12002B97B00DFC4DB /* AccountFactory.swift in Sources */,
E9AA8BF82129F13000F9249F /* ComplexTransferViewController.swift in Sources */,
E9A174B52057EDCE003667CD /* AdamantTransfersProvider+backgroundFetch.swift in Sources */,
Expand Down Expand Up @@ -3454,6 +3470,7 @@
93E123302A6DF8EF004DF33B /* en */,
93E123322A6DF8F1004DF33B /* de */,
93E123332A6DF8F2004DF33B /* ru */,
3AF08D5B2B4E7FFC00EB82B1 /* zh */,
);
name = InfoPlist.strings;
sourceTree = "<group>";
Expand All @@ -3464,6 +3481,7 @@
93E123392A6DFD15004DF33B /* de */,
93E1233B2A6DFD18004DF33B /* ru */,
93E1233C2A6DFD19004DF33B /* en */,
3AF08D5D2B4E7FFC00EB82B1 /* zh */,
);
name = Localizable.strings;
sourceTree = "<group>";
Expand All @@ -3474,6 +3492,7 @@
93E123402A6DFE24004DF33B /* en */,
93E123422A6DFE27004DF33B /* de */,
93E123432A6DFE2E004DF33B /* ru */,
3AF08D5C2B4E7FFC00EB82B1 /* zh */,
);
name = Localizable.stringsdict;
sourceTree = "<group>";
Expand Down Expand Up @@ -3695,7 +3714,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 3.3.1;
MARKETING_VERSION = 3.4.0;
PRODUCT_BUNDLE_IDENTIFIER = "im.adamant.adamant-messenger-dev";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down Expand Up @@ -3726,7 +3745,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 3.3.1;
MARKETING_VERSION = 3.4.0;
PRODUCT_BUNDLE_IDENTIFIER = "im.adamant.adamant-messenger";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down
17 changes: 13 additions & 4 deletions Adamant/App/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,18 @@ import CommonKit

// MARK: - Constants
extension String.adamant {
struct tabItems {
static let account = String.localized("Tabs.Account", comment: "Main tab bar: Account page")
static let chats = String.localized("Tabs.Chats", comment: "Main tab bar: Chats page")
static let settings = String.localized("Tabs.Settings", comment: "Main tab bar: Settings page")
enum tabItems {
static var account: String {
String.localized("Tabs.Account", comment: "Main tab bar: Account page")
}

static var chats: String {
String.localized("Tabs.Chats", comment: "Main tab bar: Chats page")
}

static var settings: String {
String.localized("Tabs.Settings", comment: "Main tab bar: Settings page")
}
}

struct application {
Expand Down Expand Up @@ -564,6 +572,7 @@ extension AppDelegate {
)
}

// TODO: Figireout why we cant use AdamantContacts.adamantWelcomeWallet.address for senderId (chat is not shown)
if let welcome = AdamantContacts.adamantWelcomeWallet.welcomeMessage {
_ = try? await chatProvider.fakeReceived(
message: welcome.message,
Expand Down
5 changes: 5 additions & 0 deletions Adamant/App/DI/AppAssembly.swift
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,11 @@ struct AppAssembly: Assembly {
service.accountService = r.resolve(AccountService.self)
}

// MARK: LanguageStorageProtocol
container.register(LanguageStorageProtocol.self) { r in
LanguageStorageService()
}.inObjectScope(.container)

// MARK: - Data Providers
// MARK: CoreData Stack
container.register(CoreDataStack.self) { _ in
Expand Down
10 changes: 7 additions & 3 deletions Adamant/Helpers/MyLittlePinpad+adamant.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,13 @@ import Foundation
import MyLittlePinpad

extension String.adamant {
struct pinpad {
static let createPin = String.localized("Pinpad.EnterNewPin", comment: "Pinpad: Ask user to create new pin")
static let reenterPin = String.localized("Pinpad.ReenterPin", comment: "Pinpad: Ask user to repeat new pin")
enum pinpad {
static var createPin: String {
String.localized("Pinpad.EnterNewPin", comment: "Pinpad: Ask user to create new pin")
}
static var reenterPin: String {
String.localized("Pinpad.ReenterPin", comment: "Pinpad: Ask user to repeat new pin")
}
}
}

Expand Down
60 changes: 36 additions & 24 deletions Adamant/Helpers/Node+UI.swift
Original file line number Diff line number Diff line change
Expand Up @@ -71,35 +71,47 @@ extension Node {

private extension Node {
enum Strings {
static let ping = String.localized(
"NodesList.NodeCell.Ping",
comment: "NodesList.NodeCell: Node ping"
)
static var ping: String {
String.localized(
"NodesList.NodeCell.Ping",
comment: "NodesList.NodeCell: Node ping"
)
}

static let milliseconds = String.localized(
"NodesList.NodeCell.Milliseconds",
comment: "NodesList.NodeCell: Milliseconds"
)
static var milliseconds: String {
String.localized(
"NodesList.NodeCell.Milliseconds",
comment: "NodesList.NodeCell: Milliseconds"
)
}

static let synchronizing = String.localized(
"NodesList.NodeCell.Synchronizing",
comment: "NodesList.NodeCell: Node is synchronizing"
)
static var synchronizing: String {
String.localized(
"NodesList.NodeCell.Synchronizing",
comment: "NodesList.NodeCell: Node is synchronizing"
)
}

static let offline = String.localized(
"NodesList.NodeCell.Offline",
comment: "NodesList.NodeCell: Node is offline"
)
static var offline: String {
String.localized(
"NodesList.NodeCell.Offline",
comment: "NodesList.NodeCell: Node is offline"
)
}

static let version = String.localized(
"NodesList.NodeCell.Version",
comment: "NodesList.NodeCell: Node version"
)
static var version: String {
String.localized(
"NodesList.NodeCell.Version",
comment: "NodesList.NodeCell: Node version"
)
}

static let disabled = String.localized(
"NodesList.NodeCell.Disabled",
comment: "NodesList.NodeCell: Node is disabled"
)
static var disabled: String {
String.localized(
"NodesList.NodeCell.Disabled",
comment: "NodesList.NodeCell: Node is disabled"
)
}
}

var versionString: String? {
Expand Down
87 changes: 87 additions & 0 deletions Adamant/Helpers/NodeGroup+Constants.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
//
// NodeGroup+Constants.swift
// Adamant
//
// Created by Stanislav Jelezoglo on 27.12.2023.
// Copyright © 2023 Adamant. All rights reserved.
//
import Foundation
import CommonKit

public extension NodeGroup {
var onScreenUpdateInterval: TimeInterval {
switch self {
case .adm:
return AdmWalletService.healthCheckParameters.onScreenUpdateInterval
case .btc:
return BtcWalletService.healthCheckParameters.onScreenUpdateInterval
case .eth:
return EthWalletService.healthCheckParameters.onScreenUpdateInterval
case .lskNode:
return LskWalletService.healthCheckParameters.onScreenUpdateInterval
case .lskService:
return LskWalletService.healthCheckParameters.onScreenServiceUpdateInterval
case .doge:
return DogeWalletService.healthCheckParameters.onScreenUpdateInterval
case .dash:
return DashWalletService.healthCheckParameters.onScreenUpdateInterval
}
}

var crucialUpdateInterval: TimeInterval {
switch self {
case .adm:
return AdmWalletService.healthCheckParameters.crucialUpdateInterval
case .btc:
return BtcWalletService.healthCheckParameters.crucialUpdateInterval
case .eth:
return EthWalletService.healthCheckParameters.crucialUpdateInterval
case .lskNode:
return LskWalletService.healthCheckParameters.crucialUpdateInterval
case .lskService:
return LskWalletService.healthCheckParameters.crucialServiceUpdateInterval
case .doge:
return DogeWalletService.healthCheckParameters.crucialUpdateInterval
case .dash:
return DashWalletService.healthCheckParameters.crucialUpdateInterval
}
}

var nodeHeightEpsilon: Int {
switch self {
case .adm:
return AdmWalletService.healthCheckParameters.threshold
case .btc:
return BtcWalletService.healthCheckParameters.threshold
case .eth:
return EthWalletService.healthCheckParameters.threshold
case .lskNode:
return LskWalletService.healthCheckParameters.threshold
case .lskService:
return LskWalletService.healthCheckParameters.threshold
case .doge:
return DogeWalletService.healthCheckParameters.threshold
case .dash:
return DashWalletService.healthCheckParameters.threshold
}
}

var normalUpdateInterval: TimeInterval {
switch self {
case .adm:
return AdmWalletService.healthCheckParameters.normalUpdateInterval
case .btc:
return BtcWalletService.healthCheckParameters.normalUpdateInterval
case .eth:
return EthWalletService.healthCheckParameters.normalUpdateInterval
case .lskNode:
return LskWalletService.healthCheckParameters.normalUpdateInterval
case .lskService:
return LskWalletService.healthCheckParameters.normalServiceUpdateInterval
case .doge:
return DogeWalletService.healthCheckParameters.normalUpdateInterval
case .dash:
return DashWalletService.healthCheckParameters.normalUpdateInterval
}
}
}
Loading

0 comments on commit 6a5c8d7

Please sign in to comment.