aboutsummaryrefslogtreecommitdiffstats
path: root/rpc/api/eth.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-06-15 23:21:08 +0800
committerobscuren <geffobscura@gmail.com>2015-06-15 23:21:08 +0800
commit2628103f1df35ad6a130f2f41e73c7703bf61886 (patch)
tree9ea2013174704e20cf6710a7df194cad7ab25d63 /rpc/api/eth.go
parente79cc42dfe36f6db61cebb37607f5bfe89e4cdcc (diff)
downloadgo-tangerine-2628103f1df35ad6a130f2f41e73c7703bf61886.tar.gz
go-tangerine-2628103f1df35ad6a130f2f41e73c7703bf61886.tar.zst
go-tangerine-2628103f1df35ad6a130f2f41e73c7703bf61886.zip
rpc/api: fixed default gas-(price) issue.
Diffstat (limited to 'rpc/api/eth.go')
-rw-r--r--rpc/api/eth.go9
1 files changed, 8 insertions, 1 deletions
diff --git a/rpc/api/eth.go b/rpc/api/eth.go
index a0b9dad86..d329dbf10 100644
--- a/rpc/api/eth.go
+++ b/rpc/api/eth.go
@@ -259,7 +259,14 @@ func (self *ethApi) SendTransaction(req *shared.Request) (interface{}, error) {
nonce = args.Nonce.String()
}
- v, err := self.xeth.Transact(args.From, args.To, nonce, args.Value.String(), args.Gas.String(), args.GasPrice.String(), args.Data)
+ var gas, price string
+ if args.Gas != nil {
+ gas = args.Gas.String()
+ }
+ if args.GasPrice != nil {
+ price = args.GasPrice.String()
+ }
+ v, err := self.xeth.Transact(args.From, args.To, nonce, args.Value.String(), gas, price, args.Data)
if err != nil {
return nil, err
}