Skip to content

Commit

Permalink
Merge pull request #1295 from threefoldtech/development-remove-raw-co…
Browse files Browse the repository at this point in the history
…nnection-in-rmb-peer

remove extra raw connection from rmb peer
  • Loading branch information
Eslam-Nawara authored Dec 22, 2024
2 parents 2244ce7 + f168fe9 commit 71ae238
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions rmb-sdk-go/peer/peer.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,8 @@ func NewPeer(
mnemonics string,
subManager substrate.Manager,
handler Handler,
opts ...PeerOpt) (*Peer, error) {

opts ...PeerOpt,
) (*Peer, error) {
cfg := &peerCfg{
relayURLs: []string{"wss://relay.grid.tf"},
session: "",
Expand Down Expand Up @@ -179,7 +179,7 @@ func NewPeer(
return nil, err
}

api, _, err := subManager.Raw()
api, _, err := subConn.GetClient()
if err != nil {
return nil, err
}
Expand Down Expand Up @@ -207,7 +207,6 @@ func NewPeer(
privKey, err = generateSecureKey(identity)
if err != nil {
return nil, errors.Wrapf(err, "could not generate secure key")

}
publicKey = privKey.PubKey().SerializeCompressed()
}
Expand Down Expand Up @@ -481,7 +480,6 @@ func (d *Peer) makeEnvelope(id string, dest uint32, session *string, cmd *string
}

return &env, nil

}

func (d *Peer) send(ctx context.Context, request *types.Envelope) error {
Expand Down

0 comments on commit 71ae238

Please # to comment.