Skip to content
This repository has been archived by the owner on May 24, 2024. It is now read-only.

Commit

Permalink
Fixed test, replaced exception with argumentexception
Browse files Browse the repository at this point in the history
  • Loading branch information
Kirbyrawr committed Nov 9, 2020
1 parent 3c6cd94 commit aa6dcba
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion stellar-dotnet-sdk-test/WebAuthenticationTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1573,7 +1573,8 @@ public void TestBuildChallengeTransactionBadHomeDomain()
Network.UseTestNetwork();
try
{
WebAuthentication.BuildChallengeTransaction(serverKeypair, clientAccountId, $"{anchorName}bad");
var tx = WebAuthentication.BuildChallengeTransaction(serverKeypair, clientAccountId, anchorName);
WebAuthentication.ReadChallengeTransaction(tx, serverKeypair.AccountId, $"{anchorName}bad");
}
catch (InvalidWebAuthenticationException e)
{
Expand Down
2 changes: 1 addition & 1 deletion stellar-dotnet-sdk/WebAuthentication.cs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public static class WebAuthentication
.Build();

if (operation.Name.Split(' ')[0] != homeDomain)
throw new Exception("Operation key should contain homeDomain");
throw new ArgumentException("Operation key should contain homeDomain");

var tx = new TransactionBuilder(serverAccount)
.AddTimeBounds(timeBounds)
Expand Down

0 comments on commit aa6dcba

Please sign in to comment.