Skip to content

Commit b40f12f

Browse files
authored
Merge pull request #873 from Adamant-im/trello.com/c/aIVBEdjR
[trello.com/c/SL4zLZnb] Small code improvments
2 parents d89a78d + fa80ffd commit b40f12f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Adamant/Models/BTCRawTransaction.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ struct BTCRawTransaction {
2727

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

3333
if let confirmations = confirmations {

Adamant/Modules/Wallets/Bitcoin/BtcWalletService+RichMessageProviderWithStatusCheck.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ extension BtcWalletService {
4444
transaction: CoinTransaction,
4545
btcTransaction: BtcTransaction
4646
) async -> TransactionStatus {
47-
// Before we already stored another status in RawBtcTransactionResponse.asBtcTransaction(_:for:height:).
48-
// So we don't need to double check anything here because it is already at least "registered".
47+
// The status was already set in RawBtcTransactionResponse.asBtcTransaction(_:for:height:),
48+
// so there's no need to check again for `.registered` — at this point it's guaranteed to be at least that.
4949
guard let status = btcTransaction.transactionStatus else {
5050
return .inconsistent(.unknown)
5151
}

0 commit comments

Comments
 (0)