@@ -256,7 +256,7 @@ func TestGetTokenAccountInfos_RemoteSendGiftCard_HappyPath(t *testing.T) {
256256 env , cleanup := setup (t )
257257 defer cleanup ()
258258
259- coreVmConfig := testutil .NewRandomVmConfig (t , true )
259+ vmConfig := testutil .NewRandomVmConfig (t , false )
260260
261261 // Test cases represent main iterations of a gift card account's state throughout
262262 // its lifecycle. All states beyond claimed status are not fully tested here and
@@ -385,13 +385,13 @@ func TestGetTokenAccountInfos_RemoteSendGiftCard_HappyPath(t *testing.T) {
385385 giftCardIssuerOwnerAccount := testutil .NewRandomAccount (t )
386386 giftCardOwnerAccount := testutil .NewRandomAccount (t )
387387
388- accountRecords := setupAccountRecords (t , env , giftCardOwnerAccount , giftCardOwnerAccount , coreVmConfig , 0 , commonpb .AccountType_REMOTE_SEND_GIFT_CARD )
388+ accountRecords := setupAccountRecords (t , env , giftCardOwnerAccount , giftCardOwnerAccount , vmConfig , 0 , commonpb .AccountType_REMOTE_SEND_GIFT_CARD )
389389
390390 giftCardIssuedIntentRecord := & intent.Record {
391391 IntentId : testutil .NewRandomAccount (t ).PublicKey ().ToBase58 (),
392392 IntentType : intent .SendPublicPayment ,
393393
394- MintAccount : common . CoreMintAccount .PublicKey ().ToBase58 (),
394+ MintAccount : vmConfig . Mint .PublicKey ().ToBase58 (),
395395
396396 InitiatorOwnerAccount : giftCardIssuerOwnerAccount .PublicKey ().ToBase58 (),
397397
@@ -460,7 +460,7 @@ func TestGetTokenAccountInfos_RemoteSendGiftCard_HappyPath(t *testing.T) {
460460 testutil .NewRandomAccount (t ),
461461 giftCardIssuerOwnerAccount ,
462462 } {
463- timelockAccounts , err := giftCardOwnerAccount .GetTimelockAccounts (coreVmConfig )
463+ timelockAccounts , err := giftCardOwnerAccount .GetTimelockAccounts (vmConfig )
464464 require .NoError (t , err )
465465
466466 req := & accountpb.GetTokenAccountInfosRequest {
@@ -495,7 +495,7 @@ func TestGetTokenAccountInfos_RemoteSendGiftCard_HappyPath(t *testing.T) {
495495 assert .Equal (t , giftCardOwnerAccount .PublicKey ().ToBytes (), accountInfo .Owner .Value )
496496 assert .Equal (t , giftCardOwnerAccount .PublicKey ().ToBytes (), accountInfo .Authority .Value )
497497 assert .Equal (t , timelockAccounts .Vault .PublicKey ().ToBytes (), accountInfo .Address .Value )
498- assert .Equal (t , common . CoreMintAccount .PublicKey ().ToBytes (), accountInfo .Mint .Value )
498+ assert .Equal (t , vmConfig . Mint .PublicKey ().ToBytes (), accountInfo .Mint .Value )
499499 assert .EqualValues (t , 0 , accountInfo .Index )
500500
501501 assert .Equal (t , tc .expectedBalanceSource , accountInfo .BalanceSource )
@@ -516,12 +516,13 @@ func TestGetTokenAccountInfos_RemoteSendGiftCard_HappyPath(t *testing.T) {
516516 assert .Equal (t , giftCardIssuedIntentRecord .SendPublicPaymentMetadata .ExchangeRate , accountInfo .OriginalExchangeData .ExchangeRate )
517517 assert .Equal (t , giftCardIssuedIntentRecord .SendPublicPaymentMetadata .NativeAmount , accountInfo .OriginalExchangeData .NativeAmount )
518518 assert .Equal (t , giftCardIssuedIntentRecord .SendPublicPaymentMetadata .Quantity , accountInfo .OriginalExchangeData .Quarks )
519+ assert .Equal (t , vmConfig .Mint .PublicKey ().ToBytes (), accountInfo .OriginalExchangeData .Mint .Value )
519520
520521 assert .Equal (t , requestingOwnerAccount != nil && requestingOwnerAccount == giftCardIssuerOwnerAccount , accountInfo .IsGiftCardIssuer )
521522
522523 accountInfoRecordsByMint , err := env .data .GetLatestAccountInfoByOwnerAddressAndType (env .ctx , giftCardOwnerAccount .PublicKey ().ToBase58 (), commonpb .AccountType_REMOTE_SEND_GIFT_CARD )
523524 require .NoError (t , err )
524- assert .False (t , accountInfoRecordsByMint [common . CoreMintAccount .PublicKey ().ToBase58 ()].RequiresDepositSync )
525+ assert .False (t , accountInfoRecordsByMint [vmConfig . Mint .PublicKey ().ToBase58 ()].RequiresDepositSync )
525526 }
526527 }
527528}
0 commit comments