Skip to content

Commit

Permalink
eip6492 multiple deployments - fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
marino39 committed Jul 22, 2024
1 parent f9896d9 commit eefde60
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions signature_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,15 +81,18 @@ func TestIsValideMessageSignatureSequence_EIP6492SignatureWithMultipleDeployment
err = wallet.Connect(provider, nil)
assert.NoError(t, err)

err = walletChild.Connect(provider, nil)
assert.NoError(t, err)

_, eip191Message := accounts.TextAndHash([]byte(message))

signature, err := wallet.SignMessage([]byte(eip191Message))
signature, err := walletChild.SignMessage([]byte(eip191Message))
assert.NoError(t, err)

signature, err = sequence.EIP6492SignatureWithMultipleDeployments(signature, []core.WalletConfig{wallet.GetWalletConfig(), walletChild.GetWalletConfig()})
assert.NoError(t, err)

isValid, err := sequence.IsValidMessageSignature(wallet.Address(), []byte(message), signature, big.NewInt(1), provider, nil)
isValid, err := sequence.IsValidMessageSignature(walletChild.Address(), []byte(message), signature, big.NewInt(1), provider, nil)
assert.NoError(t, err)
assert.True(t, isValid)
}
Expand Down

0 comments on commit eefde60

Please sign in to comment.