From e813ec70a3b9b9669d21a13d44960696caf5a8dd Mon Sep 17 00:00:00 2001 From: Denis Subbotin Date: Tue, 21 May 2024 22:18:39 +0300 Subject: [PATCH] fix tests --- contract/jetton/jetton_test.go | 2 +- examples/jetton/main.go | 2 +- tonconnect/proof_test.go | 4 ++-- wallet/wallet_test.go | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/contract/jetton/jetton_test.go b/contract/jetton/jetton_test.go index 4780d4e7..c2ddfe1d 100644 --- a/contract/jetton/jetton_test.go +++ b/contract/jetton/jetton_test.go @@ -18,7 +18,7 @@ import ( func initDefaultWallet(blockchain *liteapi.Client) wallet.Wallet { pk, _ := base64.StdEncoding.DecodeString("OyAWIb4FeP1bY1VhALWrU2JN9/8O1Kv8kWZ0WfXXpOM=") privateKey := ed25519.NewKeyFromSeed(pk) - w, err := wallet.New(privateKey, wallet.V4R2, 0, nil, blockchain) + w, err := wallet.New(privateKey, wallet.V4R2, blockchain) if err != nil { panic("unable to create wallet") } diff --git a/examples/jetton/main.go b/examples/jetton/main.go index 103f4cef..c3af8605 100644 --- a/examples/jetton/main.go +++ b/examples/jetton/main.go @@ -24,7 +24,7 @@ func main() { pk, _ := base64.StdEncoding.DecodeString("OyAWIb4FeP1bY1VhALWrU2JN9/8O1Kv8kWZ0WfXXpOM=") privateKey := ed25519.NewKeyFromSeed(pk) - w, err := wallet.New(privateKey, wallet.V4R2, 0, nil, client) + w, err := wallet.New(privateKey, wallet.V4R2, client) if err != nil { panic("unable to create wallet") } diff --git a/tonconnect/proof_test.go b/tonconnect/proof_test.go index ee6712ce..3851a6e6 100644 --- a/tonconnect/proof_test.go +++ b/tonconnect/proof_test.go @@ -47,11 +47,11 @@ func TestCreateSignedProof(t *testing.T) { t.Fatalf("SeedToPrivateKey() failed: %v", err) } publicKey := privateKey.Public().(ed25519.PublicKey) - stateInit, err := wallet.GenerateStateInit(publicKey, tt.version, 0, nil) + stateInit, err := wallet.GenerateStateInit(publicKey, tt.version, nil, 0, nil) if err != nil { t.Fatalf("GenerateStateInit() failed: %v", err) } - accountID, err := wallet.GenerateWalletAddress(publicKey, tt.version, 0, nil) + accountID, err := wallet.GenerateWalletAddress(publicKey, tt.version, nil, 0, nil) if err != nil { t.Fatalf("GenerateWalletAddress() failed: %v", err) } diff --git a/wallet/wallet_test.go b/wallet/wallet_test.go index a4caa9bc..c1f21202 100644 --- a/wallet/wallet_test.go +++ b/wallet/wallet_test.go @@ -55,7 +55,7 @@ func TestGenerateWalletAddress(t *testing.T) { for ver, data := range testData { key, _ := hex.DecodeString(data.PublicKey) publicKey := ed25519.PublicKey(key) - address, err := GenerateWalletAddress(publicKey, ver, 0, nil) + address, err := GenerateWalletAddress(publicKey, ver, nil, 0, nil) if err != nil { t.Fatalf("address generation failed: %v", err) } @@ -148,7 +148,7 @@ func TestMockBlockchain(t *testing.T) { func initDefaultWallet(blockchain blockchain) Wallet { pk, _ := base64.StdEncoding.DecodeString("OyAWIb4FeP1bY1VhALWrU2JN9/8O1Kv8kWZ0WfXXpOM=") privateKey := ed25519.NewKeyFromSeed(pk) - w, err := New(privateKey, V4R2, 0, nil, blockchain) + w, err := New(privateKey, V4R2, blockchain) if err != nil { panic("unable to create wallet") }