diff --git a/Sources/ZcashLightClientKit/Transaction/PersistentTransactionManager.swift b/Sources/ZcashLightClientKit/Transaction/PersistentTransactionManager.swift index 3de2a12bd..54d940fb5 100644 --- a/Sources/ZcashLightClientKit/Transaction/PersistentTransactionManager.swift +++ b/Sources/ZcashLightClientKit/Transaction/PersistentTransactionManager.swift @@ -112,7 +112,7 @@ class PersistentTransactionManager: OutboundTransactionManager { do { let encodedTransaction = try self.encoder.createTransaction( spendingKey: spendingKey, - zatoshi: pendingTransaction.intValue, + zatoshi: pendingTransaction.value, to: pendingTransaction.toAddress, memo: pendingTransaction.memo?.asZcashTransactionMemo(), from: pendingTransaction.accountIndex diff --git a/Sources/ZcashLightClientKit/Transaction/TransactionEncoder.swift b/Sources/ZcashLightClientKit/Transaction/TransactionEncoder.swift index a87622277..e71f99a57 100644 --- a/Sources/ZcashLightClientKit/Transaction/TransactionEncoder.swift +++ b/Sources/ZcashLightClientKit/Transaction/TransactionEncoder.swift @@ -26,7 +26,7 @@ protocol TransactionEncoder { /// /// - Parameters: /// - Parameter spendingKey: a `SaplingExtendedSpendingKey` containing the spending key - /// - Parameter zatoshi: the amount to send in zatoshis + /// - Parameter zatoshi: the amount to send in `Zatoshi` /// - Parameter to: string containing the recipient address /// - Parameter memo: string containing the memo (optional) /// - Parameter accountIndex: index of the account that will be used to send the funds @@ -34,7 +34,7 @@ protocol TransactionEncoder { /// - Throws: a TransactionEncoderError func createTransaction( spendingKey: SaplingExtendedSpendingKey, - zatoshi: Int, + zatoshi: Zatoshi, to address: String, memo: String?, from accountIndex: Int @@ -48,7 +48,7 @@ protocol TransactionEncoder { /// /// - Parameters: /// - Parameter spendingKey: a `SaplingExtendedSpendingKey` containing the spending key - /// - Parameter zatoshi: the amount to send in zatoshis + /// - Parameter zatoshi: the amount to send in `Zatoshi` /// - Parameter to: string containing the recipient address /// - Parameter memo: string containing the memo (optional) /// - Parameter accountIndex: index of the account that will be used to send the funds @@ -56,7 +56,7 @@ protocol TransactionEncoder { // swiftlint:disable:next function_parameter_count func createTransaction( spendingKey: SaplingExtendedSpendingKey, - zatoshi: Int, + zatoshi: Zatoshi, to address: String, memo: String?, from accountIndex: Int, diff --git a/Sources/ZcashLightClientKit/Transaction/WalletTransactionEncoder.swift b/Sources/ZcashLightClientKit/Transaction/WalletTransactionEncoder.swift index c4a84c204..9f020410f 100644 --- a/Sources/ZcashLightClientKit/Transaction/WalletTransactionEncoder.swift +++ b/Sources/ZcashLightClientKit/Transaction/WalletTransactionEncoder.swift @@ -51,7 +51,7 @@ class WalletTransactionEncoder: TransactionEncoder { func createTransaction( spendingKey: SaplingExtendedSpendingKey, - zatoshi: Int, + zatoshi: Zatoshi, to address: String, memo: String?, from accountIndex: Int @@ -81,7 +81,7 @@ class WalletTransactionEncoder: TransactionEncoder { // swiftlint:disable:next function_parameter_count func createTransaction( spendingKey: SaplingExtendedSpendingKey, - zatoshi: Int, + zatoshi: Zatoshi, to address: String, memo: String?, from accountIndex: Int, @@ -109,7 +109,7 @@ class WalletTransactionEncoder: TransactionEncoder { func createSpend( spendingKey: SaplingExtendedSpendingKey, - zatoshi: Int, + zatoshi: Zatoshi, to address: String, memo: String?, from accountIndex: Int @@ -123,7 +123,7 @@ class WalletTransactionEncoder: TransactionEncoder { account: Int32(accountIndex), extsk: spendingKey.stringEncoded, to: address, - value: Int64(zatoshi), + value: zatoshi.amount, memo: memo, spendParamsPath: self.spendParamsURL.path, outputParamsPath: self.outputParamsURL.path,