diff options
author | Péter Szilágyi <peterke@gmail.com> | 2016-07-22 19:28:21 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-07-22 19:28:21 +0800 |
commit | f58ac2b46b66a81515a119a2b1924a831afdd0c9 (patch) | |
tree | 0cf614825eba881c9976fc6284b35cc3831e213f | |
parent | fb81bc32912e61ae83cd6962172c47c011f979ac (diff) | |
parent | 4ee00b230931b054576606ead90c56d8c984fc38 (diff) | |
download | dexon-f58ac2b46b66a81515a119a2b1924a831afdd0c9.tar.gz dexon-f58ac2b46b66a81515a119a2b1924a831afdd0c9.tar.zst dexon-f58ac2b46b66a81515a119a2b1924a831afdd0c9.zip |
Merge pull request #2712 from bas-vk/sendtx
eth/api: rename signAndSendTransaction to sendTransaction
-rw-r--r-- | internal/ethapi/api.go | 10 | ||||
-rw-r--r-- | internal/web3ext/web3ext.go | 4 |
2 files changed, 10 insertions, 4 deletions
diff --git a/internal/ethapi/api.go b/internal/ethapi/api.go index f604a0ef2..88bacc45b 100644 --- a/internal/ethapi/api.go +++ b/internal/ethapi/api.go @@ -303,10 +303,10 @@ func (s *PrivateAccountAPI) LockAccount(addr common.Address) bool { return s.am.Lock(addr) == nil } -// SignAndSendTransaction will create a transaction from the given arguments and +// SendTransaction will create a transaction from the given arguments and // tries to sign it with the key associated with args.To. If the given passwd isn't // able to decrypt the key it fails. -func (s *PrivateAccountAPI) SignAndSendTransaction(ctx context.Context, args SendTxArgs, passwd string) (common.Hash, error) { +func (s *PrivateAccountAPI) SendTransaction(ctx context.Context, args SendTxArgs, passwd string) (common.Hash, error) { var err error args, err = prepareSendTxArgs(ctx, args, s.b) if err != nil { @@ -336,6 +336,12 @@ func (s *PrivateAccountAPI) SignAndSendTransaction(ctx context.Context, args Sen return submitTransaction(ctx, s.b, tx, signature) } +// 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(ctx context.Context, args SendTxArgs, passwd string) (common.Hash, error) { + return s.SendTransaction(ctx, args, passwd) +} + // PublicBlockChainAPI provides an API to access the Ethereum blockchain. // It offers only methods that operate on public data that is freely available to anyone. type PublicBlockChainAPI struct { diff --git a/internal/web3ext/web3ext.go b/internal/web3ext/web3ext.go index 162cf7096..190fd57d2 100644 --- a/internal/web3ext/web3ext.go +++ b/internal/web3ext/web3ext.go @@ -418,8 +418,8 @@ web3._extend({ params: 2 }), new web3._extend.Method({ - name: 'signAndSendTransaction', - call: 'personal_signAndSendTransaction', + name: 'sendTransaction', + call: 'personal_sendTransaction', params: 2, inputFormatter: [web3._extend.formatters.inputTransactionFormatter, null] }) |