aboutsummaryrefslogtreecommitdiffstats
path: root/ui/qt/qwhisper/whisper.go
diff options
context:
space:
mode:
authorJeffrey Wilcke <jeffrey@ethereum.org>2015-03-18 04:31:42 +0800
committerJeffrey Wilcke <jeffrey@ethereum.org>2015-03-18 04:31:42 +0800
commit3ea99f989ff98432cbfa864d2e7e26628e16cc6f (patch)
tree45dfc571907fcfc36e415ac3d0f706ef462f1030 /ui/qt/qwhisper/whisper.go
parent048d4ec5be5352dcb06f5123e3458b99aa151e6b (diff)
parent7330c97b5b00255db9dc1ffaff942992f80fb7d1 (diff)
downloaddexon-3ea99f989ff98432cbfa864d2e7e26628e16cc6f.tar
dexon-3ea99f989ff98432cbfa864d2e7e26628e16cc6f.tar.gz
dexon-3ea99f989ff98432cbfa864d2e7e26628e16cc6f.tar.bz2
dexon-3ea99f989ff98432cbfa864d2e7e26628e16cc6f.tar.lz
dexon-3ea99f989ff98432cbfa864d2e7e26628e16cc6f.tar.xz
dexon-3ea99f989ff98432cbfa864d2e7e26628e16cc6f.tar.zst
dexon-3ea99f989ff98432cbfa864d2e7e26628e16cc6f.zip
Merge pull request #498 from maran/feature/drytoHex
DRY up the use of toHex in the project and move it to common
Diffstat (limited to 'ui/qt/qwhisper/whisper.go')
-rw-r--r--ui/qt/qwhisper/whisper.go6
1 files changed, 2 insertions, 4 deletions
diff --git a/ui/qt/qwhisper/whisper.go b/ui/qt/qwhisper/whisper.go
index 90ec822aa..bf165bbcc 100644
--- a/ui/qt/qwhisper/whisper.go
+++ b/ui/qt/qwhisper/whisper.go
@@ -4,8 +4,8 @@ package qwhisper
import (
"time"
- "github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/common"
+ "github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/logger"
"github.com/ethereum/go-ethereum/whisper"
"github.com/obscuren/qml"
@@ -13,8 +13,6 @@ import (
var qlogger = logger.NewLogger("QSHH")
-func toHex(b []byte) string { return "0x" + common.Bytes2Hex(b) }
-
type Whisper struct {
*whisper.Whisper
view qml.Object
@@ -66,7 +64,7 @@ func (self *Whisper) Post(payload []string, to, from string, topics []string, pr
func (self *Whisper) NewIdentity() string {
key := self.Whisper.NewIdentity()
- return toHex(crypto.FromECDSAPub(&key.PublicKey))
+ return common.ToHex(crypto.FromECDSAPub(&key.PublicKey))
}
func (self *Whisper) HasIdentity(key string) bool {