Skip to content

Commit

Permalink
code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
windycrypto committed Nov 29, 2023
1 parent 0366a5e commit 8eff606
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 6 deletions.
2 changes: 1 addition & 1 deletion relay/wsconn.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ type client struct {

id string // randomly generate, just for logging
role RoleType // dapp or wallet
session string // session id

pubTopics *TopicSet
subTopics *TopicSet

Expand Down
1 change: 0 additions & 1 deletion relay/wshandlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ func (ws *WsServer) subMessage(message SocketMessage) {
// messages from wallet

if noti.Phase == string(SessionRequest) { // handle the 1st case stated above
subscriber.session = noti.Topic
metrics.IncReceivedSessions()
//log.Info("session been scanned", zap.Any("topic", topic), zap.Any("client", subscriber))

Expand Down
4 changes: 0 additions & 4 deletions relay/wsserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,6 @@ func (ws *WsServer) Run() {
// * relay generated fake "ack" for the wallet
for _, publisher := range ws.GetDappPublisher(message.Topic) {
log.Info("wallet updates, notify dapp", zap.Any("client", publisher), zap.Any("message", message))
// if SessionReceived, the message topic is the QRCode topic, use it as the session id
if message.Phase == string(SessionReceived) {
publisher.session = message.Topic
}
publisher.send(message)
}

Expand Down

0 comments on commit 8eff606

Please sign in to comment.