From 7db0e665c046f08899035a8cbbf9d603afefb1dc Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Mon, 25 Sep 2017 11:17:09 +0200 Subject: [PATCH] mobile: fix TransactionSender --- mobile/ethclient.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/mobile/ethclient.go b/mobile/ethclient.go index 75af309175..09ae3e42b9 100644 --- a/mobile/ethclient.go +++ b/mobile/ethclient.go @@ -77,9 +77,10 @@ func (ec *EthereumClient) GetTransactionByHash(ctx *Context, hash *Hash) (tx *Tr return &Transaction{rawTx}, err } -// GetTransactionSender returns the sender address of a transaction. -func (ec *EthereumClient) GetTransactionSender(ctx *Context, tx *Transaction) (sender *Address, _ error) { - addr, err := ec.client.TransactionSender(ctx.context, tx.tx) +// GetTransactionSender returns the sender address of a transaction. The transaction must +// be included in the blockchain. +func (ec *EthereumClient) GetTransactionSender(ctx *Context, tx *Transaction, hash *Hash, index int) (sender *Address, _ error) { + addr, err := ec.client.TransactionSender(ctx.context, tx.tx, hash.hash, uint(index)) return &Address{addr}, err }