Add Int initializer

pull/2/head
Michael Scoff 7 years ago
parent 0de268410b
commit 6fdfe02541
  1. 4
      Trust/Extensions/GethBigInt.swift

@ -20,4 +20,8 @@ extension GethBigInt {
let bignum = Bignum(double.description) let bignum = Bignum(double.description)
return GethBigInt.from(hex: bignum.asString(withBase: 16)) return GethBigInt.from(hex: bignum.asString(withBase: 16))
} }
static func from(int: Int) -> GethBigInt {
return GethNewBigInt(Int64(int))
}
} }

Loading…
Cancel
Save