Skip to content

Commit

Permalink
graphql-server: Update eip4361 abnf spelling for LikeCoin
Browse files Browse the repository at this point in the history
refs #328
  • Loading branch information
hochiw committed Aug 1, 2022
1 parent e9a4a0a commit d4a2976
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions graphql-server/pkg/abnf/eip4361.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const (

// https://eips.ethereum.org/EIPS/eip-4361

// domain %s" wants you to sign in with your Likecoin account:" LF
// domain %s" wants you to sign in with your LikeCoin account:" LF
// address LF
// LF
// [ statement LF ]
Expand All @@ -36,7 +36,7 @@ const (
// resources ]
func AuthenticationMessage() abnf.Rule {
return abnf.C(
abnf.K(Authority(), AuthorityFQDN), abnf.SP(), abnf.VS("wants you to sign in with your Likecoin account:"), abnf.LF(),
abnf.K(Authority(), AuthorityFQDN), abnf.SP(), abnf.VS("wants you to sign in with your LikeCoin account:"), abnf.LF(),
abnf.K(_address(), AddressFQDN), abnf.LF(),
abnf.LF(),
abnf.O(abnf.C(abnf.K(_statement(), StatementFQDN), abnf.LF())),
Expand Down
20 changes: 10 additions & 10 deletions graphql-server/pkg/abnf/eip4361_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ func Test_EIP4361Message(t *testing.T) {
authority := "likedao.com"
address := "like1cq425wdjy0lg6zswt38j06kepq782mxzsuveua"
uri := "https://likedao.com"
chainID := "likecoin-mainnet-2"
chainID := "LikeCoin-mainnet-2"
nonce := "12345678"
issuedAt := "2006-01-02T15:04:05Z"

message := fmt.Sprintf(
"%s wants you to sign in with your Likecoin account:\n"+
"%s wants you to sign in with your LikeCoin account:\n"+
"%s\n"+
"\n\n\n"+
"URI: %s\n"+
Expand Down Expand Up @@ -64,7 +64,7 @@ func Test_EIP4361Message(t *testing.T) {
})

t.Run("Official EIP Sample Message", func(t *testing.T) {
message := "service.org wants you to sign in with your Likecoin account:\n" +
message := "service.org wants you to sign in with your LikeCoin account:\n" +
"like1cq425wdjy0lg6zswt38j06kepq782mxzsuveua\n" +
"\n" +
"I accept the ServiceOrg Terms of Service: https://service.org/tos\n" +
Expand Down Expand Up @@ -93,7 +93,7 @@ func Test_EIP4361Message(t *testing.T) {
issuedAt := "2020-01-02T15:04:05Z"

message := fmt.Sprintf(
"%s wants you to sign in with your Likecoin account:\n"+
"%s wants you to sign in with your LikeCoin account:\n"+
"%s\n"+
"\n\n\n"+
"URI: %s\n"+
Expand All @@ -117,7 +117,7 @@ func Test_EIP4361Message(t *testing.T) {
issuedAt := "2020-01-02T15:04:05Z"

message := fmt.Sprintf(
"%s wants you to sign in with your Likecoin account:\n"+
"%s wants you to sign in with your LikeCoin account:\n"+
"%s\n"+
"\n\n\n"+
"URI: %s\n"+
Expand All @@ -141,7 +141,7 @@ func Test_EIP4361Message(t *testing.T) {
issuedAt := "2020-01-02T15:04:05Z"

message := fmt.Sprintf(
"%s wants you to sign in with your Likecoin account:\n"+
"%s wants you to sign in with your LikeCoin account:\n"+
"%s\n"+
"\n\n\n"+
"URI: %s\n"+
Expand All @@ -165,7 +165,7 @@ func Test_EIP4361Message(t *testing.T) {
issuedAt := "2020-01-02T15:04:05Z"

message := fmt.Sprintf(
"%s wants you to sign in with your Likecoin account:\n"+
"%s wants you to sign in with your LikeCoin account:\n"+
"%s\n"+
"\n\n\n"+
"URI: %s\n"+
Expand All @@ -189,7 +189,7 @@ func Test_EIP4361Message(t *testing.T) {
issuedAt := "2020-01-02T15:04:05Z"

message := fmt.Sprintf(
"%s wants you to sign in with your Likecoin account:\n"+
"%s wants you to sign in with your LikeCoin account:\n"+
"%s\n"+
"\n\n\n"+
"URI: %s\n"+
Expand All @@ -213,7 +213,7 @@ func Test_EIP4361Message(t *testing.T) {
issuedAt := "20200-01-02T15:04:05Z"

message := fmt.Sprintf(
"%s wants you to sign in with your Likecoin account:\n"+
"%s wants you to sign in with your LikeCoin account:\n"+
"%s\n"+
"\n\n\n"+
"URI: %s\n"+
Expand All @@ -237,7 +237,7 @@ func Test_EIP4361Message(t *testing.T) {
issuedAt := "2020-01-02T15:04:05Z"

message := fmt.Sprintf(
"%s wants you to sign in with your Likecoin account:\n"+
"%s wants you to sign in with your LikeCoin account:\n"+
"%s\n"+
"\n\n\n"+
"URI: %s\n"+
Expand Down

0 comments on commit d4a2976

Please sign in to comment.