From da9fe951da4005761a014316c46771d628dc058e Mon Sep 17 00:00:00 2001 From: Gustav Simonsson Date: Thu, 2 Apr 2015 21:14:25 +0200 Subject: Use common.Address type for accounts.Address --- xeth/xeth.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'xeth/xeth.go') diff --git a/xeth/xeth.go b/xeth/xeth.go index 11dc506b8..74110c4ec 100644 --- a/xeth/xeth.go +++ b/xeth/xeth.go @@ -365,7 +365,7 @@ func (self *XEth) Accounts() []string { accounts, _ := self.backend.AccountManager().Accounts() accountAddresses := make([]string, len(accounts)) for i, ac := range accounts { - accountAddresses[i] = common.ToHex(ac.Address) + accountAddresses[i] = ac.Address.Str() } return accountAddresses } -- cgit v1.2.3 From ac3371bcb69b090fa9b5a8da96916fa0aa15ed0f Mon Sep 17 00:00:00 2001 From: Gustav Simonsson Date: Thu, 2 Apr 2015 22:54:55 +0200 Subject: Correct accounts hex in XETH API --- xeth/xeth.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'xeth/xeth.go') diff --git a/xeth/xeth.go b/xeth/xeth.go index 74110c4ec..7e6a2c184 100644 --- a/xeth/xeth.go +++ b/xeth/xeth.go @@ -365,7 +365,7 @@ func (self *XEth) Accounts() []string { accounts, _ := self.backend.AccountManager().Accounts() accountAddresses := make([]string, len(accounts)) for i, ac := range accounts { - accountAddresses[i] = ac.Address.Str() + accountAddresses[i] = "0x" + ac.Address.Hex() // wtf } return accountAddresses } -- cgit v1.2.3 From 8754f2b768ba00d8507a7990dccca80e6cea1cc0 Mon Sep 17 00:00:00 2001 From: Gustav Simonsson Date: Sun, 19 Apr 2015 01:09:41 +0200 Subject: Fix common.Address / []byte type conversions --- xeth/xeth.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'xeth/xeth.go') diff --git a/xeth/xeth.go b/xeth/xeth.go index 7e6a2c184..3b29eb3f7 100644 --- a/xeth/xeth.go +++ b/xeth/xeth.go @@ -781,7 +781,7 @@ func (self *XEth) Call(fromStr, toStr, valueStr, gasStr, gasPriceStr, dataStr st if err != nil || len(accounts) == 0 { from = statedb.GetOrNewStateObject(common.Address{}) } else { - from = statedb.GetOrNewStateObject(common.BytesToAddress(accounts[0].Address)) + from = statedb.GetOrNewStateObject(accounts[0].Address) } } else { from = statedb.GetOrNewStateObject(common.HexToAddress(fromStr)) -- cgit v1.2.3 From 940952f75741b3bfcfe290102874d24ccb11c3d0 Mon Sep 17 00:00:00 2001 From: Gustav Simonsson Date: Fri, 24 Apr 2015 17:35:10 +0200 Subject: Fix HEX hack in xeth accounts() --- xeth/xeth.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'xeth/xeth.go') diff --git a/xeth/xeth.go b/xeth/xeth.go index 3b29eb3f7..28ca05f47 100644 --- a/xeth/xeth.go +++ b/xeth/xeth.go @@ -365,7 +365,7 @@ func (self *XEth) Accounts() []string { accounts, _ := self.backend.AccountManager().Accounts() accountAddresses := make([]string, len(accounts)) for i, ac := range accounts { - accountAddresses[i] = "0x" + ac.Address.Hex() // wtf + accountAddresses[i] = ac.Address.Hex() } return accountAddresses } -- cgit v1.2.3 From 2c1b0ff17e020f300ed9d5a5a244f59b4febfe66 Mon Sep 17 00:00:00 2001 From: Gustav Simonsson Date: Sun, 10 May 2015 20:30:02 +0200 Subject: Update key store to new spec but keep address field for now * Also fix address types post-rebase --- xeth/xeth.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'xeth/xeth.go') diff --git a/xeth/xeth.go b/xeth/xeth.go index 28ca05f47..0fe68d175 100644 --- a/xeth/xeth.go +++ b/xeth/xeth.go @@ -817,7 +817,7 @@ func (self *XEth) ConfirmTransaction(tx string) bool { } func (self *XEth) doSign(from common.Address, hash common.Hash, didUnlock bool) ([]byte, error) { - sig, err := self.backend.AccountManager().Sign(accounts.Account{Address: from.Bytes()}, hash.Bytes()) + sig, err := self.backend.AccountManager().Sign(accounts.Account{Address: from}, hash.Bytes()) if err == accounts.ErrLocked { if didUnlock { return nil, fmt.Errorf("signer account still locked after successful unlock") -- cgit v1.2.3