Skip to content

Commit

Permalink
[trello.com/c/4QaDmVkg]: review fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisBenua committed Jan 17, 2025
1 parent 21e3727 commit afc394b
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 22 deletions.
31 changes: 31 additions & 0 deletions Adamant/Modules/Wallets/Bitcoin/BitcoinKitTransactionFactory.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
//
// Untitled.swift
// Adamant
//
// Created by Christian Benua on 17.01.2025.
// Copyright © 2025 Adamant. All rights reserved.
//

import BitcoinKit

final class BitcoinKitTransactionFactory: BitcoinKitTransactionFactoryProtocol {
func createTransaction(
toAddress address: Address,
amount: UInt64,
fee: UInt64,
changeAddress: Address,
utxos: [UnspentTransaction],
lockTime: UInt32,
keys: [PrivateKey]
) -> Transaction {
BitcoinKit.Transaction.createNewTransaction(
toAddress: address,
amount: amount,
fee: fee,
changeAddress: changeAddress,
utxos: utxos,
lockTime: lockTime,
keys: keys
)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,25 +19,3 @@ protocol BitcoinKitTransactionFactoryProtocol {
keys: [PrivateKey]
) -> Transaction
}

final class BitcoinKitTransactionFactory: BitcoinKitTransactionFactoryProtocol {
func createTransaction(
toAddress address: Address,
amount: UInt64,
fee: UInt64,
changeAddress: Address,
utxos: [UnspentTransaction],
lockTime: UInt32,
keys: [PrivateKey]
) -> Transaction {
BitcoinKit.Transaction.createNewTransaction(
toAddress: address,
amount: amount,
fee: fee,
changeAddress: changeAddress,
utxos: utxos,
lockTime: lockTime,
keys: keys
)
}
}

0 comments on commit afc394b

Please sign in to comment.