Send pubkey instead of address to PNBroadcastAvailabilityRequest
This commit is contained in:
parent
ca2bf9faec
commit
e1c81b6cc6
2
chan.go
2
chan.go
|
@ -141,7 +141,7 @@ func (c *Channel) SendPostRawMsg(body string) error {
|
|||
// push notification server Public Key.
|
||||
func (c *Channel) PNBroadcastAvailabilityRequest() {
|
||||
format := `["%s",["%s"]]`
|
||||
msg := fmt.Sprintf(format, PNBroadcastAvailabilityType, c.conn.address)
|
||||
msg := fmt.Sprintf(format, PNBroadcastAvailabilityType, c.conn.pubkey)
|
||||
c.SendPostRawMsg(msg)
|
||||
}
|
||||
|
||||
|
|
5
sdk.go
5
sdk.go
|
@ -10,6 +10,8 @@ import (
|
|||
type SDK struct {
|
||||
RPCClient RPCClient
|
||||
address string
|
||||
pubkey string
|
||||
mnemonic string
|
||||
userName string
|
||||
channels []*Channel
|
||||
minimumPoW float64
|
||||
|
@ -47,6 +49,9 @@ func (c *SDK) Signup(pwd string) (addr string, pubkey string, mnemonic string, e
|
|||
if err != nil {
|
||||
return "", "", "", err
|
||||
}
|
||||
c.address = res.Result.Address
|
||||
c.pubkey = res.Result.Pubkey
|
||||
c.mnemonic = res.Result.Mnemonic
|
||||
|
||||
return res.Result.Address, res.Result.Pubkey, res.Result.Mnemonic, err
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue