Skip to content

Commit 545bf3a

Browse files
authored
Merge branch 'develop' into feature/pre-swiftlint-cleanup
2 parents 25d4fda + 2f090dd commit 545bf3a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Sources/web3swift/Web3/Web3+Structures.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,11 +114,13 @@ extension EthereumTransaction: Decodable {
114114
public init(from decoder: Decoder) throws {
115115
let options = try TransactionOptions(from: decoder)
116116
let container = try decoder.container(keyedBy: CodingKeys.self)
117+
117118
// test to see if it is a EIP-1559 wrapper
118119
if let envelope = try decodeHexToBigUInt(container, key: .type, allowOptional: true) {
119120
// if present and non-sero we are a new wrapper we can't decode
120121
if envelope != BigInt(0) { throw Web3Error.dataError }
121122
}
123+
122124
var data = try decodeHexToData(container, key: .data, allowOptional: true)
123125
if data != nil {
124126
self.data = data!

0 commit comments

Comments
 (0)