fix merge errors
This commit is contained in:
parent
7f480e417d
commit
33f2f787e7
|
@ -18,30 +18,6 @@ public enum TransactionEncoderError: Error {
|
||||||
}
|
}
|
||||||
|
|
||||||
protocol TransactionEncoder {
|
protocol TransactionEncoder {
|
||||||
|
|
||||||
/// Creates a transaction, throwing an exception whenever things are missing. When the provided wallet implementation
|
|
||||||
/// doesn't throw an exception, we wrap the issue into a descriptive exception ourselves (rather than using
|
|
||||||
/// double-bangs for things).
|
|
||||||
/// Blocking
|
|
||||||
///
|
|
||||||
/// - Parameters:
|
|
||||||
/// - Parameter spendingKey: a `UnifiedSpendingKey` containing the spending key
|
|
||||||
/// - Parameter zatoshi: the amount to send in `Zatoshi`
|
|
||||||
/// - Parameter to: string containing the recipient address
|
|
||||||
/// - Parameter memoBytes: MemoBytes for this transaction
|
|
||||||
/// - Parameter accountIndex: index of the account that will be used to send the funds
|
|
||||||
///
|
|
||||||
/// - Throws: a TransactionEncoderError
|
|
||||||
///
|
|
||||||
func createTransaction(
|
|
||||||
spendingKey: UnifiedSpendingKey,
|
|
||||||
zatoshi: Zatoshi,
|
|
||||||
to address: String,
|
|
||||||
memoBytes: MemoBytes,
|
|
||||||
from accountIndex: Int
|
|
||||||
) throws -> EncodedTransaction
|
|
||||||
|
|
||||||
|
|
||||||
/// Creates a transaction, throwing an exception whenever things are missing. When the provided wallet implementation
|
/// Creates a transaction, throwing an exception whenever things are missing. When the provided wallet implementation
|
||||||
/// doesn't throw an exception, we wrap the issue into a descriptive exception ourselves (rather than using
|
/// doesn't throw an exception, we wrap the issue into a descriptive exception ourselves (rather than using
|
||||||
/// double-bangs for things).
|
/// double-bangs for things).
|
||||||
|
@ -76,7 +52,7 @@ protocol TransactionEncoder {
|
||||||
spendingKey: UnifiedSpendingKey,
|
spendingKey: UnifiedSpendingKey,
|
||||||
memoBytes: MemoBytes,
|
memoBytes: MemoBytes,
|
||||||
from accountIndex: Int
|
from accountIndex: Int
|
||||||
) throws -> EncodedTransaction
|
) async throws -> EncodedTransaction
|
||||||
|
|
||||||
///Fetch the Transaction Entity from the encoded representation
|
///Fetch the Transaction Entity from the encoded representation
|
||||||
/// - Parameter encodedTransaction: The encoded transaction to expand
|
/// - Parameter encodedTransaction: The encoded transaction to expand
|
||||||
|
|
|
@ -129,8 +129,7 @@ class WalletTransactionEncoder: TransactionEncoder {
|
||||||
throw TransactionEncoderError.notFound(transactionId: txId)
|
throw TransactionEncoderError.notFound(transactionId: txId)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
func createShieldingSpend(spendingKey: UnifiedSpendingKey, memo: MemoBytes, accountIndex: Int) throws -> Int {
|
||||||
func createShieldingSpend(spendingKey: String, tsk: String, memo: String?, accountIndex: Int) throws -> Int {
|
|
||||||
guard ensureParams(spend: self.spendParamsURL, output: self.spendParamsURL) else {
|
guard ensureParams(spend: self.spendParamsURL, output: self.spendParamsURL) else {
|
||||||
throw TransactionEncoderError.missingParams
|
throw TransactionEncoderError.missingParams
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue