@@ -233,9 +233,8 @@ type cancellableStream struct {
233
233
type clientConf struct {
234
234
// Simulations for invalid account
235
235
236
- simulateStaleRequestorAccountType bool
237
- simulateInvalidAccountType bool
238
- simulateAccountNotCodeAccount bool
236
+ simulateInvalidAccountType bool
237
+ simulateAccountNotCodeAccount bool
239
238
240
239
// Simulations for invalid exchange data
241
240
@@ -512,33 +511,23 @@ func (c *sendMessageCallMetadata) assertNoActiveStreamError(t *testing.T) {
512
511
func (c * clientEnv ) sendRequestToGrabBillMessage (t * testing.T , rendezvousKey * common.Account ) * sendMessageCallMetadata {
513
512
destination := testutil .NewRandomAccount (t )
514
513
514
+ ownerAccount := testutil .NewRandomAccount (t )
515
515
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 (),
518
518
TokenAccount : destination .PublicKey ().ToBase58 (),
519
519
MintAccount : common .CoreMintAccount .PublicKey ().ToBase58 (),
520
- AccountType : commonpb .AccountType_TEMPORARY_INCOMING ,
520
+ AccountType : commonpb .AccountType_PRIMARY ,
521
521
Index : 0 ,
522
522
}
523
523
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
525
526
}
526
527
if ! c .conf .simulateAccountNotCodeAccount {
527
528
require .NoError (t , c .directDataAccess .CreateAccountInfo (c .ctx , accountInfoRecord ))
528
529
}
529
530
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
-
542
531
req := & messagingpb.SendMessageRequest {
543
532
Message : & messagingpb.Message {
544
533
Kind : & messagingpb.Message_RequestToGrabBill {
0 commit comments