diff --git a/chan.go b/chan.go index ebe1e46..1a5e3c2 100644 --- a/chan.go +++ b/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) } diff --git a/sdk.go b/sdk.go index 01ddf42..599809e 100644 --- a/sdk.go +++ b/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 }