Skip to content

Commit

Permalink
require memos of type ID in BuildChallengeTx
Browse files Browse the repository at this point in the history
  • Loading branch information
JakeUrban committed Jan 24, 2023
1 parent 87f653b commit 11d5a94
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion txnbuild/transaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -1027,7 +1027,7 @@ func BuildChallengeTx(serverSignerSecret, clientAccountID, webAuthDomain, homeDo
return nil, errors.New("memos are not valid for challenge transactions with a muxed client account")
}
} else if memo != nil {
if _, err := memo.ToXDR(); err != nil {
if xdrMemo, err := memo.ToXDR(); err != nil || xdrMemo.Type != xdr.MemoTypeMemoId {
return nil, errors.New("memo must be of type MemoID")
}
}
Expand Down

0 comments on commit 11d5a94

Please sign in to comment.