aboutsummaryrefslogtreecommitdiffstats
path: root/mobile
diff options
context:
space:
mode:
Diffstat (limited to 'mobile')
-rw-r--r--mobile/big.go10
-rw-r--r--mobile/ethclient.go4
-rw-r--r--mobile/interface.go2
3 files changed, 13 insertions, 3 deletions
diff --git a/mobile/big.go b/mobile/big.go
index 564fbad47..dd7b15878 100644
--- a/mobile/big.go
+++ b/mobile/big.go
@@ -62,6 +62,16 @@ func (bi *BigInt) SetInt64(x int64) {
bi.bigint.SetInt64(x)
}
+// Sign returns:
+//
+// -1 if x < 0
+// 0 if x == 0
+// +1 if x > 0
+//
+func (bi *BigInt) Sign() int {
+ return bi.bigint.Sign()
+}
+
// SetString sets the big int to x.
//
// The string prefix determines the actual conversion base. A prefix of "0x" or
diff --git a/mobile/ethclient.go b/mobile/ethclient.go
index 7f31a8998..758863b6d 100644
--- a/mobile/ethclient.go
+++ b/mobile/ethclient.go
@@ -198,8 +198,8 @@ func (ec *EthereumClient) FilterLogs(ctx *Context, query *FilterQuery) (logs *Lo
}
// Temp hack due to vm.Logs being []*vm.Log
res := make([]*types.Log, len(rawLogs))
- for i, log := range rawLogs {
- res[i] = &log
+ for i := range rawLogs {
+ res[i] = &rawLogs[i]
}
return &Logs{res}, nil
}
diff --git a/mobile/interface.go b/mobile/interface.go
index 72958e66a..ac0c26088 100644
--- a/mobile/interface.go
+++ b/mobile/interface.go
@@ -59,7 +59,7 @@ func (i *Interface) SetInt64(n int64) { i.object = &n }
func (i *Interface) SetUint8(bigint *BigInt) { n := uint8(bigint.bigint.Uint64()); i.object = &n }
func (i *Interface) SetUint16(bigint *BigInt) { n := uint16(bigint.bigint.Uint64()); i.object = &n }
func (i *Interface) SetUint32(bigint *BigInt) { n := uint32(bigint.bigint.Uint64()); i.object = &n }
-func (i *Interface) SetUint64(bigint *BigInt) { n := uint64(bigint.bigint.Uint64()); i.object = &n }
+func (i *Interface) SetUint64(bigint *BigInt) { n := bigint.bigint.Uint64(); i.object = &n }
func (i *Interface) SetBigInt(bigint *BigInt) { i.object = &bigint.bigint }
func (i *Interface) SetBigInts(bigints *BigInts) { i.object = &bigints.bigints }