add fixes by marcell
[epoint] / pkg / server / server.go
index e3c3d29..53ef664 100644 (file)
@@ -133,7 +133,7 @@ func ParseDraft(d []byte) (draft *document.Draft, draftid string, err error) {
        }
        draft, ok := iv.(*document.Draft)
        if !ok {
-               err = fmt.Errorf("ParseDraft: expected a draft docuent")
+               err = fmt.Errorf("ParseDraft: expected a draft document")
                return
        }
        draftid = document.Id(signed)
@@ -231,7 +231,7 @@ func NewDebitCert(draftid string, draft *document.Draft) (*document.DebitCert, e
        if err != nil {
                // first cert: drawer is issuer
                if draft.Drawer != draft.Issuer {
-                       return nil, fmt.Errorf("drawer must be the issuer when drawing an empty account")
+                       return nil, fmt.Errorf("drawer must be the issuer when drawing an empty account (%s != %s)", draft.Drawer, draft.Issuer)
                }
                cert.Serial = 1
                cert.Balance = cert.Difference