Skip to content

Commit e79f102

Browse files
Preparing to merge TransactionOptions into CodableTransaction,
by making accessibility level of following properties to `public private (set)`: - `maxFeePerGas` - `maxPriorityFeePerGas` - `nonce`
1 parent 3c4e9d5 commit e79f102

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

Sources/Core/TransactionOptions.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ public struct TransactionOptions {
5757
case automatic
5858
case manual(BigUInt)
5959
}
60-
public var maxFeePerGas: FeePerGasPolicy?
61-
public var maxPriorityFeePerGas: FeePerGasPolicy?
60+
public private (set) var maxFeePerGas: FeePerGasPolicy?
61+
public private (set) var maxPriorityFeePerGas: FeePerGasPolicy?
6262

6363
/// The value transferred for the transaction in wei, also the endowment if it’s a contract-creation transaction.
6464
public var value: BigUInt?
@@ -69,7 +69,7 @@ public struct TransactionOptions {
6969
case manual(BigUInt)
7070
}
7171

72-
public var nonce: NoncePolicy?
72+
public private (set) var nonce: NoncePolicy?
7373

7474
public var callOnBlock: BlockNumber?
7575

Sources/web3swift/Utils/Hooks/NonceMiddleware.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@ extension Web3.Utils {
6666
// var modifiedTX = tx
6767
// modifiedTX.nonce = newNonce
6868
var newOptions = transactionOptions
69-
newOptions.nonce = .manual(newNonce)
69+
// FIXME: Make this wotk again.
70+
// newOptions.nonce = .manual(newNonce)
7071
return (tx, contract, newOptions, true)
7172
}
7273

Sources/web3swift/Web3/Web3+MutatingTransaction.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,8 @@ public class WriteTransaction: ReadTransaction {
143143

144144
var finalOptions = TransactionOptions()
145145
finalOptions.type = mergedOptions.type
146-
finalOptions.nonce = .manual(nonce)
146+
// FIXME: Make this work again.
147+
// finalOptions.nonce = .manual(nonce)
147148
finalOptions.gasLimit = .manual(mergedOptions.resolveGasLimit(gasEstimate))
148149
finalOptions.accessList = mergedOptions.accessList
149150

0 commit comments

Comments
 (0)