aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/ethereum/js.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/ethereum/js.go')
-rw-r--r--cmd/ethereum/js.go9
1 files changed, 8 insertions, 1 deletions
diff --git a/cmd/ethereum/js.go b/cmd/ethereum/js.go
index b4b54b7e6..88d16d6a8 100644
--- a/cmd/ethereum/js.go
+++ b/cmd/ethereum/js.go
@@ -91,7 +91,14 @@ func newJSRE(ethereum *eth.Ethereum, libPath string) *jsre {
func (js *jsre) apiBindings() {
ethApi := rpc.NewEthereumApi(js.xeth, js.ethereum.DataDir)
- js.re.Bind("jeth", rpc.NewJeth(ethApi, js.re.ToVal))
+ //js.re.Bind("jeth", rpc.NewJeth(ethApi, js.re.ToVal))
+
+ jeth := rpc.NewJeth(ethApi, js.re.ToVal, js.re)
+ //js.re.Bind("jeth", jeth)
+ js.re.Set("jeth", struct{}{})
+ t, _ := js.re.Get("jeth")
+ jethObj := t.Object()
+ jethObj.Set("send", jeth.Send)
_, err := js.re.Eval(re.BigNumber_JS)