Commit 3ab31bfb authored by Sietse Ringers's avatar Sietse Ringers
Browse files

Simplify code

parent c80f2f6c
......@@ -170,18 +170,11 @@ func (session *session) panicFailure() {
func parseSigrequestJSON(sigrequestJSONString string) (*irma.SignatureRequest, error) {
sigrequestJSON := []byte(sigrequestJSONString)
sigrequest := &irma.SignatureRequest{}
err := json.Unmarshal(sigrequestJSON, sigrequest)
return sigrequest, err
// Start a manual session
// NewManualSession starts a manual session, given a signature request in JSON and a handler to pass messages to
func (client *Client) NewManualSession(sigrequestJSONString string, handler Handler) {
sigrequest, err := parseSigrequestJSON(sigrequestJSONString)
if err != nil {
var err error
sigrequest := &irma.SignatureRequest{}
if err = json.Unmarshal([]byte(sigrequestJSONString), sigrequest); err != nil {
handler.Failure(irma.ActionUnknown, &irma.SessionError{Err: err})
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment