fix existing tests

This commit is contained in:
Sina Mahmoodi 2024-01-19 13:51:12 +03:30
parent e469b41a45
commit 26776a9336

View file

@ -989,10 +989,12 @@ func TestSignTransaction(t *testing.T) {
b.SetPoS() b.SetPoS()
}) })
api := NewTransactionAPI(b, nil) api := NewTransactionAPI(b, nil)
res, err := api.FillTransaction(context.Background(), TransactionArgs{ res, err := api.FillTransaction(context.Background(), BlobTransactionArgs{
From: &b.acc.Address, TransactionArgs: TransactionArgs{
To: &to, From: &b.acc.Address,
Value: (*hexutil.Big)(big.NewInt(1)), To: &to,
Value: (*hexutil.Big)(big.NewInt(1)),
},
}) })
if err != nil { if err != nil {
t.Fatalf("failed to fill tx defaults: %v\n", err) t.Fatalf("failed to fill tx defaults: %v\n", err)
@ -1027,11 +1029,13 @@ func TestSignBlobTransaction(t *testing.T) {
b.SetPoS() b.SetPoS()
}) })
api := NewTransactionAPI(b, nil) api := NewTransactionAPI(b, nil)
res, err := api.FillTransaction(context.Background(), TransactionArgs{ res, err := api.FillTransaction(context.Background(), BlobTransactionArgs{
From: &b.acc.Address, TransactionArgs: TransactionArgs{
To: &to, From: &b.acc.Address,
Value: (*hexutil.Big)(big.NewInt(1)), To: &to,
BlobHashes: []common.Hash{{0x01, 0x22}}, Value: (*hexutil.Big)(big.NewInt(1)),
BlobHashes: []common.Hash{{0x01, 0x22}},
},
}) })
if err != nil { if err != nil {
t.Fatalf("failed to fill tx defaults: %v\n", err) t.Fatalf("failed to fill tx defaults: %v\n", err)
@ -1061,11 +1065,13 @@ func TestSendBlobTransaction(t *testing.T) {
b.SetPoS() b.SetPoS()
}) })
api := NewTransactionAPI(b, nil) api := NewTransactionAPI(b, nil)
res, err := api.FillTransaction(context.Background(), TransactionArgs{ res, err := api.FillTransaction(context.Background(), BlobTransactionArgs{
From: &b.acc.Address, TransactionArgs: TransactionArgs{
To: &to, From: &b.acc.Address,
Value: (*hexutil.Big)(big.NewInt(1)), To: &to,
BlobHashes: []common.Hash{common.Hash{0x01, 0x22}}, Value: (*hexutil.Big)(big.NewInt(1)),
BlobHashes: []common.Hash{common.Hash{0x01, 0x22}},
},
}) })
if err != nil { if err != nil {
t.Fatalf("failed to fill tx defaults: %v\n", err) t.Fatalf("failed to fill tx defaults: %v\n", err)