Skip to content

Commit

Permalink
fix: format message in auth engine
Browse files Browse the repository at this point in the history
  • Loading branch information
gigajuwels committed Jul 20, 2023
1 parent d96fd2c commit 7e9c765
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions WalletConnectSharp.Auth/Controllers/AuthEngine.cs
Original file line number Diff line number Diff line change
Expand Up @@ -367,8 +367,8 @@ public string FormatMessage(Cacao.CacaoPayload cacao)
{
string iss = cacao.Iss;
var header = $"{cacao.Domain} wants you to sign in with your Ethereum account:";
var walletAddress = IssDidUtils.DidAddress(iss);
var statement = cacao.Statement;
var walletAddress = IssDidUtils.DidAddress(iss) + "\n" + (cacao.Statement != null ? "" : "\n");
var statement = cacao.Statement + "\n";
var uri = $"URI: {cacao.Aud}";
var version = $"Version: {cacao.Version}";
var chainId = $"Chain ID: {IssDidUtils.DidChainId(iss)}";
Expand All @@ -379,7 +379,7 @@ public string FormatMessage(Cacao.CacaoPayload cacao)
: null;

var message = string.Join('\n',
new string[] { header, walletAddress, "", statement, "", uri, version, chainId, nonce, issuedAt, resources }
new string[] { header, walletAddress, statement, uri, version, chainId, nonce, issuedAt, resources }
.Where(val => !string.IsNullOrWhiteSpace(val)));

return message;
Expand Down

0 comments on commit 7e9c765

Please sign in to comment.