Skip to content

Switch from indexer to node endpoints for BTC and DOGE #882

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 76 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
2174c22
[trello.com/c/dEf1yVQr] Improve overall code and its logic
Lainaaa May 8, 2025
7285d37
[trello.com/c/IwfruyRT] Improve logic of reloading rows in wallets vi…
Lainaaa May 12, 2025
8321eca
[trello.com/c/dEf1yVQr] Improve pull-to-refresh logic for updating ba…
Lainaaa May 13, 2025
f64b0b9
[trello.com/c/dEf1yVQr] Remove unessesary update logic
Lainaaa May 13, 2025
8c7db47
[trello.com/c/x0o1aqih] remove extra space for media cell with comment
vovameister May 13, 2025
4c3bd38
[trello.com/c/dEf1yVQr] Improve overall code and its logic
Lainaaa May 14, 2025
2db0f94
[trello.com/c/7YVA2NTe] update animation and resend error catch
vovameister May 14, 2025
83919a5
[trello.com/c/jKqpxiCa/12] scroll to newMessage fix
vovameister May 14, 2025
0b96991
[trello.com/c/jKqpxiCa/12] update scroll to bottom reading
vovameister May 15, 2025
71dd074
[trello.com/c/jKqpxiCa/12] enter reading improvements
vovameister May 15, 2025
927e606
[trello.com/c/dEf1yVQr] Update balance after reconnection to a node
Lainaaa May 14, 2025
e3c10d1
Update CommonKit/Sources/CommonKit/Helpers/UIHelpers/UIColor+adamant.…
vovameister May 15, 2025
511cab8
Merge pull request #859 from Adamant-im/trello.com/c/7YVA2NTe
vovameister May 15, 2025
e4a7415
[release/3.11.0] fix typo
vovameister May 15, 2025
a4eb372
[trello.com/c/sG80IZan/v2] fix reading Under transaction details
vovameister May 16, 2025
099f116
[trello.com/c/x0o1aqih] Improve code quality
Lainaaa May 16, 2025
0f8d217
[trello.com/c/jKqpxiCa/12] typo fix
vovameister May 16, 2025
f79a265
Merge pull request #858 from Adamant-im/trello.com/c/x0o1aqih
vovameister May 16, 2025
4a91aac
Merge pull request #860 from Adamant-im/trello.com/c/jKqpxiCa/12
vovameister May 16, 2025
563efa2
Merge branch 'release/3.11.0' into trello.com/c/sG80IZan/v2
vovameister May 16, 2025
6f9da98
[trello.com/c/sG80IZan/v2] fix logic
vovameister May 16, 2025
31c860f
Merge branch 'trello.com/c/sG80IZan/v2' of https://github.com/Adamant…
vovameister May 16, 2025
976838e
Merge pull request #861 from Adamant-im/trello.com/c/sG80IZan/v2
vovameister May 16, 2025
fdd98e9
[trello.com/c/dEf1yVQr] Increase speed of loading ADM wallet after re…
Lainaaa May 16, 2025
a9eb7bc
Merge pull request #856 from Adamant-im/trello.com/c/IwfruyRT
Lainaaa May 16, 2025
9315df9
Merge pull request #854 from Adamant-im/trello.com/c/dEf1yVQr
Lainaaa May 16, 2025
73a0485
[trello.com/c/dEf1yVQr] Fix crash because of unsafe access for Accoun…
Lainaaa May 19, 2025
90d114d
[trello.com/c/7YVA2NTe] fix layout macOs
vovameister May 19, 2025
e835eb1
[trello.com/c/7YVA2NTe] avarageProgress -> total size progress
vovameister May 19, 2025
2aa72c4
Merge branch 'trello.com/c/aZtAfZ44' into release/3.11.0
vovameister May 19, 2025
0e05129
[trello.com/c/aZtAfZ44] fix message replace
vovameister May 19, 2025
901ae1f
[trello.com/c/aZtAfZ44] make read reaction faster
vovameister May 20, 2025
4f486a8
[trello.com/c/aZtAfZ44] remove extra if
vovameister May 20, 2025
d9d32de
Merge pull request #862 from Adamant-im/trello.com/c/dEf1yVQr
Lainaaa May 20, 2025
643f811
Merge pull request #864 from Adamant-im/trello.com/c/aZtAfZ44
vovameister May 20, 2025
68ba923
[trello.com/c/7YVA2NTe] syntactic improve
vovameister May 20, 2025
77164d9
Merge pull request #863 from Adamant-im/trello.com/c/7YVA2NTe
vovameister May 20, 2025
ae0f448
[trello.com/c/jKqpxiCa] update scroll to bottom
vovameister May 20, 2025
8161202
[trello.com/c/jKqpxiCa] always show scroll down if have some new mess…
vovameister May 21, 2025
008e9b2
[trello.com/c/jKqpxiCa] remove fast reading message to show to fix se…
vovameister May 21, 2025
74e08fb
[trello.com/c/SL4zLZnb] Improve coin tx sending algorithm
Lainaaa May 21, 2025
3f13cf6
[trello.com/c/jKqpxiCa] improved syntax
vovameister May 23, 2025
ec4724f
Merge pull request #866 from Adamant-im/trello.com/c/jKqpxiCa/15
vovameister May 23, 2025
41b94e7
Merge pull request #865 from Adamant-im/trello.com/c/jKqpxiCa/8&13
vovameister May 23, 2025
640384e
[trello.com/c/pRsTtPYQ] fix reply + file sending fix
vovameister May 26, 2025
0a40abd
Remove unused image
Lainaaa May 26, 2025
916e332
[trello.com/c/m0k5mrQR] fix swiftui ios menu layout
vovameister May 27, 2025
0f568f2
[trello.com/c/m0k5mrQR] fix macOs context menu layout
vovameister May 27, 2025
0b2e3e6
Merge pull request #870 from Adamant-im/remove_unused_image
Lainaaa May 27, 2025
0be6051
Merge branch 'release/3.11.0'
Lainaaa May 27, 2025
1a3a357
Merge pull request #871 from Adamant-im/trello.com/c/m0k5mrQR
vovameister May 28, 2025
5948b15
[trello.com/c/pRsTtPYQ] add failed status for incorrect media message
vovameister May 27, 2025
e28c8c5
Merge pull request #869 from Adamant-im/trello.com/c/pRsTtPYQ
vovameister May 28, 2025
416a4ae
[trello.com/c/aZtAfZ44] fix select row when we enter the chat via popup
vovameister May 23, 2025
0140920
[trello.com/c/sG80IZan] delay badge update for current chat
vovameister May 27, 2025
c39c5b0
Merge pull request #867 from Adamant-im/trello.com/c/aIVBEdjR
Lainaaa May 28, 2025
365cac0
Merge pull request #872 from Adamant-im/trello.com/c/sG80IZan
vovameister May 28, 2025
d89a78d
Merge pull request #868 from Adamant-im/trello.com/c/aZtAfZ44
vovameister May 28, 2025
fa80ffd
[trello.com/c/SL4zLZnb] Small code improvments
Lainaaa May 29, 2025
b40f12f
Merge pull request #873 from Adamant-im/trello.com/c/aIVBEdjR
Lainaaa May 29, 2025
244b876
Merge branch 'trello.com/c/1lX3h2xx' into release/3.11.0
vovameister May 29, 2025
07f32f4
Dependency update
Lainaaa May 30, 2025
86ae216
[trello.com/c/jKqpxiCa] fix chatbot loaded message setBottomOffset
vovameister Jun 4, 2025
26663a7
update wallets jsons
vovameister Jun 4, 2025
0459616
Merge pull request #876 from Adamant-im/dependency_update
vovameister Jun 4, 2025
c919ae0
[trello.com/c/1lX3h2xx] fix eth transaction show 0 instead of pending
vovameister Jun 4, 2025
39e9671
[trello.com/c/FUnqFz3u] Improve dialogs in crypto sending screens
Lainaaa May 29, 2025
cb250bf
Merge branch 'release/3.11.0'
Lainaaa Jun 5, 2025
5f6938f
[trello.com/c/FUnqFz3u] Syntax error fix
Lainaaa Jun 5, 2025
eefc307
Merge pull request #874 from Adamant-im/trello.com/c/FUnqFz3u
Lainaaa Jun 5, 2025
2ecacae
[trello.com/c/IE07BHsc] Add badge for the MacOS/iPad app
Lainaaa Jun 5, 2025
16e325e
Merge pull request #877 from Adamant-im/trello.com/c/IE07BHsc
Lainaaa Jun 5, 2025
4f94bcd
Merge pull request #879 from Adamant-im/update-wallets-jsons
vovameister Jun 6, 2025
28a9fbd
Merge pull request #880 from Adamant-im/trello.com/c/1lX3h2xx
vovameister Jun 6, 2025
42baa1f
Merge pull request #878 from Adamant-im/trello.com/c/jKqpxiCa/16
vovameister Jun 6, 2025
36dbed3
[trello.com/c/9lwbzVAp] Use suffixes (displayName like "eth-indexer")…
Lainaaa Jun 12, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
83 changes: 46 additions & 37 deletions Adamant.xcworkspace/xcshareddata/swiftpm/Package.resolved

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions Adamant/Helpers/NodeGroup+Constants.swift
Original file line number Diff line number Diff line change
Expand Up @@ -129,20 +129,20 @@ extension NodeGroup {
var name: String {
switch self {
case .btc:
return BtcWalletService.tokenNetworkSymbol
return BtcWalletService.nodeDisplayName ?? BtcWalletService.tokenNetworkSymbol
case .eth:
return EthWalletService.tokenNetworkSymbol
return EthWalletService.nodeDisplayName ?? EthWalletService.tokenNetworkSymbol
case .klyNode:
return KlyWalletService.tokenNetworkSymbol
return KlyWalletService.nodeDisplayName ?? KlyWalletService.tokenNetworkSymbol
case .klyService:
return KlyWalletService.tokenNetworkSymbol
return KlyWalletService.indexerDisplayName ?? KlyWalletService.tokenNetworkSymbol
+ " " + .adamant.coinsNodesList.serviceNode
case .doge:
return DogeWalletService.tokenNetworkSymbol
return DogeWalletService.nodeDisplayName ?? DogeWalletService.tokenNetworkSymbol
case .dash:
return DashWalletService.tokenNetworkSymbol
return DashWalletService.nodeDisplayName ?? DashWalletService.tokenNetworkSymbol
case .adm:
return AdmWalletService.tokenNetworkSymbol
return AdmWalletService.nodeDisplayName ?? AdmWalletService.tokenNetworkSymbol
case .ipfs:
return IPFSApiService.symbol
case .infoService:
Expand Down
17 changes: 0 additions & 17 deletions Adamant/Helpers/UserDefaultsManager.swift

This file was deleted.

11 changes: 5 additions & 6 deletions Adamant/Models/BTCRawTransaction.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,14 @@ struct BTCRawTransaction {

func asBtcTransaction<T: BaseBtcTransaction>(_ as: T.Type, for address: String, blockId: String? = nil) -> T {
// MARK: Known values
let confirmationsValue: String?
let transactionStatus: TransactionStatus
var confirmationsValue: String?
var transactionStatus: TransactionStatus = .registered

if let confirmations = confirmations {
confirmationsValue = String(confirmations)
transactionStatus = confirmations > 0 ? .success : .pending
} else {
confirmationsValue = nil
transactionStatus = .registered
if confirmations > 0 {
transactionStatus = .success
}
}

// Transfers
Expand Down
13 changes: 9 additions & 4 deletions Adamant/Models/CoreData/Chatroom+CoreDataClass.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,11 @@ public class Chatroom: NSManagedObject, @unchecked Sendable {

func markAsReaded() {
hasUnreadMessages = false

if let trs = transactions as? Set<ChatTransaction> {
trs.filter { $0.isUnread }.forEach { $0.isUnread = false }
trs.filter { $0.isUnread }.forEach {
$0.isUnread = false
}
}
}

Expand All @@ -29,8 +31,11 @@ public class Chatroom: NSManagedObject, @unchecked Sendable {
return
}
message.isUnread = false

message.richMessageTransactions?.forEach { $0.isUnread = false }


message.richMessageTransactions?.forEach {
$0.isUnread = false
}

if let context = message.managedObjectContext, context.hasChanges {
try? context.save()
Expand Down
26 changes: 14 additions & 12 deletions Adamant/Models/EthTransaction.swift
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ struct EthTransaction: @unchecked Sendable {
let from: String
let to: String
let gasUsed: Decimal?
let gasPrice: Decimal
let gasPrice: Decimal?
let confirmations: String?
let isError: Bool
let receiptStatus: TransactionReceipt.TXStatus
Expand Down Expand Up @@ -149,10 +149,10 @@ extension EthTransaction: TransactionDetails {
var feeCurrencySymbol: String? { EthWalletService.currencySymbol }

var feeValue: Decimal? {
guard let gasUsed = gasUsed else {
return nil
}

guard let gasUsed = gasUsed,
let gasPrice
else { return nil }
return gasPrice * gasUsed
}

Expand Down Expand Up @@ -207,12 +207,14 @@ extension CodableTransaction {
txValue = nil
}

let feePrice: BigUInt
if type == .eip1559 {
feePrice = (maxFeePerGas ?? BigUInt(0)) + (maxPriorityFeePerGas ?? BigUInt(0))
} else {
feePrice = gasPrice ?? BigUInt(0)
}
let feePrice: BigUInt? = {
if type == .eip1559 {
guard let maxFeePerGas, let maxPriorityFeePerGas else { return nil }
return maxFeePerGas + maxPriorityFeePerGas
} else {
return gasPrice
}
}()

let gasPrice = gasPrice ?? feePrice

Expand All @@ -223,7 +225,7 @@ extension CodableTransaction {
from: sender?.address ?? "",
to: recipient.address,
gasUsed: gasUsed?.asDecimal(exponent: 0),
gasPrice: gasPrice.asDecimal(exponent: EthWalletService.currencyExponent),
gasPrice: gasPrice?.asDecimal(exponent: EthWalletService.currencyExponent),
confirmations: confirmations,
isError: receiptStatus != .failed,
receiptStatus: receiptStatus,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -981,7 +981,7 @@ final class AccountViewController: FormViewController {
}

Task { @MainActor in
accountService.update(shouldUpdateUIBalance: true, updateOnlyADM: false, updateOnlyVisible: true)
accountService.update(resetBalanceAndUpdate: true, updateOnlyADM: false, updateOnlyVisible: true)
}
refreshControl.endRefreshing()
}
Expand Down Expand Up @@ -1057,7 +1057,7 @@ extension AccountViewController: PagingViewControllerDataSource, PagingViewContr

nonisolated func pagingViewController(_: PagingViewController, pagingItemAt index: Int) -> PagingItem {
MainActor.assertIsolated()

return DispatchQueue.onMainThreadSyncSafe {
return viewModel.state.wallets[safe: index] ?? AccountWalletCellState.default
}
Expand Down
Loading