Skip to content

Commit

Permalink
fix the error message in SEP-10
Browse files Browse the repository at this point in the history
Co-authored-by: Jake Urban <10968980+JakeUrban@users.noreply.github.com>
  • Loading branch information
overcat and JakeUrban committed Nov 13, 2020
1 parent 8b8fa49 commit b20d850
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/main/java/org/stellar/sdk/Sep10Challenge.java
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ public static ChallengeTransaction readChallengeTransaction(String challengeXdr,
}

if (matchedDomainName == null) {
throw new InvalidSep10ChallengeException("The transaction's operation key name does not include the expected home domain.");
throw new InvalidSep10ChallengeException("The transaction's operation key name does not include one of the expected home domains.");
}

if (StrKey.decodeVersionByte(clientAccountId) != StrKey.VersionByte.ACCOUNT_ID) {
Expand Down
4 changes: 2 additions & 2 deletions src/test/java/org/stellar/sdk/Sep10ChallengeTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -1015,7 +1015,7 @@ public void testReadChallengeTransactionInvalidDomainNamesMismatch() throws IOEx
Sep10Challenge.readChallengeTransaction(transaction.toEnvelopeXdrBase64(), server.getAccountId(), Network.TESTNET, new String[]{"example2.com", "example1.com"});
fail();
} catch (InvalidSep10ChallengeException e) {
assertEquals("The transaction's operation key name does not include the expected home domain.", e.getMessage());
assertEquals("The transaction's operation key name does not include one of the expected home domains.", e.getMessage());
}
}

Expand Down Expand Up @@ -1047,7 +1047,7 @@ public void testReadChallengeTransactionInvalidDomainNamesEmpty() throws IOExcep
Sep10Challenge.readChallengeTransaction(transaction.toEnvelopeXdrBase64(), server.getAccountId(), Network.TESTNET, new String[]{});
fail();
} catch (InvalidSep10ChallengeException e) {
assertEquals("The transaction's operation key name does not include the expected home domain.", e.getMessage());
assertEquals("The transaction's operation key name does not include one of the expected home domains.", e.getMessage());
}
}

Expand Down

0 comments on commit b20d850

Please sign in to comment.