[#144] sdk/token: Use MarshalBinary to uuid of session token

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
remotes/KirillovDenis/feature/refactor-sig-rpc
Alex Vanin 2020-09-16 15:19:43 +03:00 committed by Stanislav Bogatyrev
parent 5fa271e141
commit 2a7e91fa13
1 changed files with 6 additions and 1 deletions

View File

@ -31,5 +31,10 @@ func (s SessionToken) SessionKey() []byte {
}
func (s SessionToken) ID() []byte {
return s.id[:]
data, err := s.id.MarshalBinary()
if err != nil {
panic(err) // must never panic
}
return data
}