Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
firelizzard18 committed Jul 12, 2024
1 parent 50b6d5e commit ae2415c
Showing 1 changed file with 9 additions and 26 deletions.
35 changes: 9 additions & 26 deletions protocol/signature_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -495,19 +495,10 @@ func TestTypesFromCerts(t *testing.T) {
}

func TestEip712TypedDataSignature(t *testing.T) {
txn := &Transaction{}
err := txn.UnmarshalJSON([]byte(`{
"header": {
"principal": "acc://adi.acme/ACME",
},
"body": {
"type": "sendTokens",
"to": [{
"url": "acc://other.acme/ACME",
"amount": "10000000000"
}]
}
}`))
txn, err := build.Transaction().
For("adi.acme", "tokens").
SendTokens(100, AcmePrecisionPower).To("other.acme", "tokens").
Done()
require.NoError(t, err)

eip712sig := &Eip712TypedDataSignature{
Expand All @@ -527,19 +518,11 @@ func TestEip712TypedDataSignature(t *testing.T) {
}

func TestEIP712DelegatedKeyPageUpdate(t *testing.T) {
txn := &Transaction{}
err := txn.UnmarshalJSON([]byte(`{
"header": {
"principal": "acc://adi.acme/ACME",
},
"body": {
"type": "updateKeyPage",
"operation": [{
"type": "add",
"entry": { "keyHash": "e55d973bf691381c94602354d1e1f655f7b1c4bd56760dffeffa2bef4541ec11" }
}]
}
}`))
txn, err := build.Transaction().
For("adi.acme", "book", "1").
UpdateKeyPage().
Add().Entry().Hash([32]byte{1, 2, 3}).FinishEntry().FinishOperation().
Done()
require.NoError(t, err)

inner := &Eip712TypedDataSignature{
Expand Down

0 comments on commit ae2415c

Please sign in to comment.