@@ -614,6 +614,8 @@ func TestGetTokenAccountInfos_NoTokenAccounts(t *testing.T) {
614614}
615615
616616func TestLinkAdditionalAccounts_HappyPath (t * testing.T ) {
617+ t .Skip ("rpc disabled" )
618+
617619 env , cleanup := setup (t )
618620 defer cleanup ()
619621
@@ -656,6 +658,8 @@ func TestLinkAdditionalAccounts_HappyPath(t *testing.T) {
656658}
657659
658660func TestLinkAdditionalAccounts_UserAccountsNotOpened (t * testing.T ) {
661+ t .Skip ("rpc disabled" )
662+
659663 env , cleanup := setup (t )
660664 defer cleanup ()
661665
@@ -683,6 +687,8 @@ func TestLinkAdditionalAccounts_UserAccountsNotOpened(t *testing.T) {
683687}
684688
685689func TestLinkAdditionalAccounts_InvalidSwapAuthority (t * testing.T ) {
690+ t .Skip ("rpc disabled" )
691+
686692 ownerAccount := testutil .NewRandomAccount (t )
687693 swapAuthorityAccount := testutil .NewRandomAccount (t )
688694 expectedSwapUsdcAta , err := swapAuthorityAccount .ToAssociatedTokenAccount (common .UsdcMintAccount )
@@ -763,7 +769,7 @@ func TestUnauthenticatedRPC(t *testing.T) {
763769 defer cleanup ()
764770
765771 ownerAccount := testutil .NewRandomAccount (t )
766- swapAuthorityAccount := testutil .NewRandomAccount (t )
772+ // swapAuthorityAccount := testutil.NewRandomAccount(t)
767773 maliciousAccount := testutil .NewRandomAccount (t )
768774
769775 isCodeAccountReq := & accountpb.IsCodeAccountRequest {
@@ -790,23 +796,25 @@ func TestUnauthenticatedRPC(t *testing.T) {
790796 _ , err = env .client .GetTokenAccountInfos (env .ctx , getTokenAccountInfosReq )
791797 testutil .AssertStatusErrorWithCode (t , err , codes .Unauthenticated )
792798
793- for i := 0 ; i < 2 ; i ++ {
794- linkReq := & accountpb.LinkAdditionalAccountsRequest {
795- Owner : ownerAccount .ToProto (),
796- SwapAuthority : swapAuthorityAccount .ToProto (),
797- }
798- reqBytes , err = proto .Marshal (linkReq )
799- require .NoError (t , err )
800- signatures := []* commonpb.Signature {
801- {Value : ed25519 .Sign (ownerAccount .PrivateKey ().ToBytes (), reqBytes )},
802- {Value : ed25519 .Sign (swapAuthorityAccount .PrivateKey ().ToBytes (), reqBytes )},
803- }
804- signatures [i ].Value = ed25519 .Sign (maliciousAccount .PrivateKey ().ToBytes (), reqBytes )
805- linkReq .Signatures = signatures
799+ /*
800+ for i := 0; i < 2; i++ {
801+ linkReq := &accountpb.LinkAdditionalAccountsRequest{
802+ Owner: ownerAccount.ToProto(),
803+ SwapAuthority: swapAuthorityAccount.ToProto(),
804+ }
805+ reqBytes, err = proto.Marshal(linkReq)
806+ require.NoError(t, err)
807+ signatures := []*commonpb.Signature{
808+ {Value: ed25519.Sign(ownerAccount.PrivateKey().ToBytes(), reqBytes)},
809+ {Value: ed25519.Sign(swapAuthorityAccount.PrivateKey().ToBytes(), reqBytes)},
810+ }
811+ signatures[i].Value = ed25519.Sign(maliciousAccount.PrivateKey().ToBytes(), reqBytes)
812+ linkReq.Signatures = signatures
806813
807- _ , err = env .client .LinkAdditionalAccounts (env .ctx , linkReq )
808- testutil .AssertStatusErrorWithCode (t , err , codes .Unauthenticated )
809- }
814+ _, err = env.client.LinkAdditionalAccounts(env.ctx, linkReq)
815+ testutil.AssertStatusErrorWithCode(t, err, codes.Unauthenticated)
816+ }
817+ */
810818}
811819
812820func setupAccountRecords (t * testing.T , env testEnv , ownerAccount , authorityAccount * common.Account , index uint64 , accountType commonpb.AccountType ) * common.AccountRecords {
0 commit comments