From 34bad8401bd119ed7b0c1d78989e695d87825fae Mon Sep 17 00:00:00 2001 From: ia Date: Thu, 29 Mar 2018 07:32:57 -0500 Subject: [PATCH 1/2] problem: personal_sendTransaction method not exposed to js console solution: add method to web3ext. Noting that SendTransaction method replaces deprecated SignAndSendTransaction. Fixes #547 --- internal/web3ext/web3ext.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/internal/web3ext/web3ext.go b/internal/web3ext/web3ext.go index e1aa668c5..3e5b62361 100644 --- a/internal/web3ext/web3ext.go +++ b/internal/web3ext/web3ext.go @@ -353,6 +353,12 @@ web3._extend({ call: 'personal_signAndSendTransaction', params: 2, inputFormatter: [web3._extend.formatters.inputTransactionFormatter, null] + }), + new web3._extend.Method({ + name: 'sendTransaction', + call: 'personal_sendTransaction', + params: 2, + inputFormatter: [web3._extend.formatters.inputTransactionFormatter, null] }) ] }); From d8e4a29d44a53606df14f95adfb8bcb6a0a50de4 Mon Sep 17 00:00:00 2001 From: ia Date: Thu, 29 Mar 2018 07:33:42 -0500 Subject: [PATCH 2/2] problem: personal_sendTransaction stack overflow solution: fix return method to not call itself Fixes #548 --- eth/api.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eth/api.go b/eth/api.go index e6f1233c4..8cbb8b59a 100644 --- a/eth/api.go +++ b/eth/api.go @@ -534,7 +534,7 @@ func (s *PrivateAccountAPI) SendTransaction(args SendTxArgs, passwd string) (com // SignAndSendTransaction was renamed to SendTransaction. This method is deprecated // and will be removed in the future. It primary goal is to give clients time to update. func (s *PrivateAccountAPI) SignAndSendTransaction(args SendTxArgs, passwd string) (common.Hash, error) { - return s.SignAndSendTransaction(args, passwd) + return s.SendTransaction(args, passwd) } // PublicBlockChainAPI provides an API to access the Ethereum blockchain.