From d4a2976a2059551a126d793ca533adeacc3c39b8 Mon Sep 17 00:00:00 2001 From: Rico Date: Mon, 1 Aug 2022 15:02:40 +0800 Subject: [PATCH] graphql-server: Update eip4361 abnf spelling for LikeCoin refs #328 --- graphql-server/pkg/abnf/eip4361.go | 4 ++-- graphql-server/pkg/abnf/eip4361_test.go | 20 ++++++++++---------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/graphql-server/pkg/abnf/eip4361.go b/graphql-server/pkg/abnf/eip4361.go index 61d4b904..7892a350 100644 --- a/graphql-server/pkg/abnf/eip4361.go +++ b/graphql-server/pkg/abnf/eip4361.go @@ -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 ] @@ -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())), diff --git a/graphql-server/pkg/abnf/eip4361_test.go b/graphql-server/pkg/abnf/eip4361_test.go index e91e6999..78688c78 100644 --- a/graphql-server/pkg/abnf/eip4361_test.go +++ b/graphql-server/pkg/abnf/eip4361_test.go @@ -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"+ @@ -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" + @@ -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"+ @@ -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"+ @@ -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"+ @@ -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"+ @@ -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"+ @@ -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"+ @@ -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"+