aboutsummaryrefslogtreecommitdiffstats
path: root/mobile
diff options
context:
space:
mode:
authorBas van Kervel <basvankervel@gmail.com>2017-06-09 18:39:50 +0800
committerBas van Kervel <basvankervel@gmail.com>2017-06-13 15:13:59 +0800
commiteb92522278789ea6eda0f6f46af9a3149c9f1b11 (patch)
tree1a0b59c1b52c38477ededaa7cef836a422c72494 /mobile
parent80f7c6c2996ad47f70a5070c400b1fd87a20c59c (diff)
downloadgo-tangerine-eb92522278789ea6eda0f6f46af9a3149c9f1b11.tar.gz
go-tangerine-eb92522278789ea6eda0f6f46af9a3149c9f1b11.tar.zst
go-tangerine-eb92522278789ea6eda0f6f46af9a3149c9f1b11.zip
mobile: use EIP155 signer for determining sender
Diffstat (limited to 'mobile')
-rw-r--r--mobile/types.go7
1 files changed, 5 insertions, 2 deletions
diff --git a/mobile/types.go b/mobile/types.go
index 7900e7287..02282f7a3 100644
--- a/mobile/types.go
+++ b/mobile/types.go
@@ -264,8 +264,11 @@ func (tx *Transaction) GetHash() *Hash { return &Hash{tx.tx.Hash()} }
func (tx *Transaction) GetSigHash() *Hash { return &Hash{tx.tx.SigHash(types.HomesteadSigner{})} }
func (tx *Transaction) GetCost() *BigInt { return &BigInt{tx.tx.Cost()} }
-func (tx *Transaction) GetFrom() (address *Address, _ error) {
- from, err := types.Sender(types.HomesteadSigner{}, tx.tx)
+func (tx *Transaction) GetFrom(chainID *BigInt) (address *Address, _ error) {
+ if chainID == nil { // Null passed from mobile app
+ chainID = new(BigInt)
+ }
+ from, err := types.Sender(types.NewEIP155Signer(chainID.bigint), tx.tx)
return &Address{from}, err
}