diff --git a/Thirdweb.Tests/Thirdweb.SmartAccount.Tests.cs b/Thirdweb.Tests/Thirdweb.SmartAccount.Tests.cs index 54cde86..14f01e2 100644 --- a/Thirdweb.Tests/Thirdweb.SmartAccount.Tests.cs +++ b/Thirdweb.Tests/Thirdweb.SmartAccount.Tests.cs @@ -141,6 +141,17 @@ public async Task GetAddress_WithOverride() Assert.NotNull(sig); } + [Fact] + public async Task IsValidSiganture_Invalid() + { + var account = await GetSmartAccount(); + var sig = await account.PersonalSign("Hello, world!"); + Assert.NotNull(sig); + sig += "1"; + var res = await account.IsValidSignature("Hello, world!", sig); + Assert.False(res); + } + [Fact] public async Task CreateSessionKey() { diff --git a/Thirdweb.Tests/Thirdweb.Wallets.Tests.cs b/Thirdweb.Tests/Thirdweb.Wallets.Tests.cs index dce9dde..28a79ef 100644 --- a/Thirdweb.Tests/Thirdweb.Wallets.Tests.cs +++ b/Thirdweb.Tests/Thirdweb.Wallets.Tests.cs @@ -32,6 +32,15 @@ public async Task EthSign() Assert.NotNull(signature); } + [Fact] + public async Task PersonalSignRaw() + { + var wallet = await GetAccount(); + var message = "Hello, world!"; + var signature = await wallet.PersonalSign(System.Text.Encoding.UTF8.GetBytes(message)); + Assert.NotNull(signature); + } + [Fact] public async Task PersonalSign() {