@@ -233,9 +233,8 @@ type cancellableStream struct {
233233type clientConf struct {
234234 // Simulations for invalid account
235235
236- simulateStaleRequestorAccountType bool
237- simulateInvalidAccountType bool
238- simulateAccountNotCodeAccount bool
236+ simulateInvalidAccountType bool
237+ simulateAccountNotCodeAccount bool
239238
240239 // Simulations for invalid exchange data
241240
@@ -512,33 +511,23 @@ func (c *sendMessageCallMetadata) assertNoActiveStreamError(t *testing.T) {
512511func (c * clientEnv ) sendRequestToGrabBillMessage (t * testing.T , rendezvousKey * common.Account ) * sendMessageCallMetadata {
513512 destination := testutil .NewRandomAccount (t )
514513
514+ ownerAccount := testutil .NewRandomAccount (t )
515515 accountInfoRecord := & account.Record {
516- OwnerAccount : testutil . NewRandomAccount ( t ) .PublicKey ().ToBase58 (),
517- AuthorityAccount : testutil . NewRandomAccount ( t ) .PublicKey ().ToBase58 (),
516+ OwnerAccount : ownerAccount .PublicKey ().ToBase58 (),
517+ AuthorityAccount : ownerAccount .PublicKey ().ToBase58 (),
518518 TokenAccount : destination .PublicKey ().ToBase58 (),
519519 MintAccount : common .CoreMintAccount .PublicKey ().ToBase58 (),
520- AccountType : commonpb .AccountType_TEMPORARY_INCOMING ,
520+ AccountType : commonpb .AccountType_PRIMARY ,
521521 Index : 0 ,
522522 }
523523 if c .conf .simulateInvalidAccountType {
524- accountInfoRecord .AccountType = commonpb .AccountType_TEMPORARY_OUTGOING
524+ accountInfoRecord .AuthorityAccount = testutil .NewRandomAccount (t ).PublicKey ().ToBase58 ()
525+ accountInfoRecord .AccountType = commonpb .AccountType_TEMPORARY_INCOMING
525526 }
526527 if ! c .conf .simulateAccountNotCodeAccount {
527528 require .NoError (t , c .directDataAccess .CreateAccountInfo (c .ctx , accountInfoRecord ))
528529 }
529530
530- if c .conf .simulateStaleRequestorAccountType {
531- latestAccountInfoRecord := & account.Record {
532- OwnerAccount : accountInfoRecord .OwnerAccount ,
533- AuthorityAccount : testutil .NewRandomAccount (t ).PublicKey ().ToBase58 (),
534- TokenAccount : testutil .NewRandomAccount (t ).PublicKey ().ToBase58 (),
535- MintAccount : common .CoreMintAccount .PublicKey ().ToBase58 (),
536- AccountType : commonpb .AccountType_TEMPORARY_INCOMING ,
537- Index : accountInfoRecord .Index + 1 ,
538- }
539- require .NoError (t , c .directDataAccess .CreateAccountInfo (c .ctx , latestAccountInfoRecord ))
540- }
541-
542531 req := & messagingpb.SendMessageRequest {
543532 Message : & messagingpb.Message {
544533 Kind : & messagingpb.Message_RequestToGrabBill {
0 commit comments