Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: web3swift-team/web3swift
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 38a7c6e
Choose a base ref
...
head repository: web3swift-team/web3swift
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: c47647c
Choose a head ref
  • 2 commits
  • 2 files changed
  • 2 contributors

Commits on Apr 16, 2018

  1. fix regression of abi encoding

    Alex Vlasov committed Apr 16, 2018
    Copy the full SHA
    cc56825 View commit details
  2. Merge pull request #60 from BANKEX/develop

    fix regression of abi encoding
    shamatar authored Apr 16, 2018
    Copy the full SHA
    c47647c View commit details
Showing with 12 additions and 5 deletions.
  1. +1 −1 web3swift.podspec
  2. +11 −4 web3swift/ABIv2/Classes/ABIv2Encoding.swift
2 changes: 1 addition & 1 deletion web3swift.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "web3swift"
s.version = "0.5.2"
s.version = "0.5.4"
s.summary = "Web3 implementation in vanilla Swift for iOS ans macOS"

s.description = <<-DESC
15 changes: 11 additions & 4 deletions web3swift/ABIv2/Classes/ABIv2Encoding.swift
Original file line number Diff line number Diff line change
@@ -19,7 +19,12 @@ extension ABIv2Encoder {
case let v as BigUInt:
return v
case let v as BigInt:
return v.magnitude
switch v.sign {
case .minus:
return nil
case .plus:
return v.magnitude
}
case let v as String:
let base10 = BigUInt(v, radix: 10)
if base10 != nil {
@@ -103,9 +108,11 @@ extension ABIv2Encoder {
case let d as Data:
return d
case let d as String:
let hex = Data.fromHex(d.stripHexPrefix())
if hex != nil {
return hex
if d.hasHexPrefix() {
let hex = Data.fromHex(d)
if hex != nil {
return hex
}
}
let str = d.data(using: .utf8)
if str != nil {