Skip to content
This repository was archived by the owner on Mar 11, 2025. It is now read-only.

Commit 5ed8c29

Browse files
committed
shift order of lamport_destination_account and record_account_authority in confidential_transfer_close_record_account
1 parent d3879b0 commit 5ed8c29

File tree

3 files changed

+18
-18
lines changed

3 files changed

+18
-18
lines changed

token/client/src/token.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2357,15 +2357,15 @@ where
23572357
pub async fn confidential_transfer_close_record_account<S: Signer>(
23582358
&self,
23592359
record_account: &Pubkey,
2360-
record_authority: &Pubkey,
2361-
receiver: &Pubkey,
2360+
lamport_destination_account: &Pubkey,
2361+
record_account_authority: &Pubkey,
23622362
record_authority_signer: &S,
23632363
) -> TokenResult<T::Output> {
23642364
self.process_ixs(
23652365
&[spl_record::instruction::close_account(
23662366
record_account,
2367-
record_authority,
2368-
receiver,
2367+
record_account_authority,
2368+
lamport_destination_account,
23692369
)],
23702370
&[record_authority_signer],
23712371
)

token/program-2022-test/tests/confidential_transfer.rs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,8 @@ async fn configure_account_with_option<S: Signers>(
110110
token
111111
.confidential_transfer_close_record_account(
112112
&pubkey_validity_proof_record_account.pubkey(),
113-
&record_account_authority.pubkey(),
114113
account,
114+
&record_account_authority.pubkey(),
115115
&record_account_authority,
116116
)
117117
.await
@@ -637,8 +637,8 @@ async fn empty_account_with_option<S: Signers>(
637637
token
638638
.confidential_transfer_close_record_account(
639639
&zero_ciphertext_proof_record_account.pubkey(),
640-
&record_account_authority.pubkey(),
641640
account,
641+
&record_account_authority.pubkey(),
642642
&record_account_authority,
643643
)
644644
.await
@@ -1054,8 +1054,8 @@ async fn withdraw_with_option<S: Signers>(
10541054
token
10551055
.confidential_transfer_close_record_account(
10561056
&equality_proof_record_account.pubkey(),
1057-
&record_account_authority.pubkey(),
10581057
source_account,
1058+
&record_account_authority.pubkey(),
10591059
&record_account_authority,
10601060
)
10611061
.await
@@ -1064,8 +1064,8 @@ async fn withdraw_with_option<S: Signers>(
10641064
token
10651065
.confidential_transfer_close_record_account(
10661066
&range_proof_record_account.pubkey(),
1067-
&record_account_authority.pubkey(),
10681067
source_account,
1068+
&record_account_authority.pubkey(),
10691069
&record_account_authority,
10701070
)
10711071
.await
@@ -1426,8 +1426,8 @@ async fn confidential_transfer_with_option<S: Signers>(
14261426
token
14271427
.confidential_transfer_close_record_account(
14281428
&equality_proof_record_account.pubkey(),
1429-
&record_account_authority.pubkey(),
14301429
source_account,
1430+
&record_account_authority.pubkey(),
14311431
&record_account_authority,
14321432
)
14331433
.await
@@ -1436,8 +1436,8 @@ async fn confidential_transfer_with_option<S: Signers>(
14361436
token
14371437
.confidential_transfer_close_record_account(
14381438
&ciphertext_validity_proof_record_account.pubkey(),
1439-
&record_account_authority.pubkey(),
14401439
source_account,
1440+
&record_account_authority.pubkey(),
14411441
&record_account_authority,
14421442
)
14431443
.await
@@ -1446,8 +1446,8 @@ async fn confidential_transfer_with_option<S: Signers>(
14461446
token
14471447
.confidential_transfer_close_record_account(
14481448
&range_proof_record_account.pubkey(),
1449-
&record_account_authority.pubkey(),
14501449
source_account,
1450+
&record_account_authority.pubkey(),
14511451
&record_account_authority,
14521452
)
14531453
.await
@@ -2024,8 +2024,8 @@ async fn confidential_transfer_with_fee_with_option<S: Signers>(
20242024
token
20252025
.confidential_transfer_close_record_account(
20262026
&equality_proof_record_account.pubkey(),
2027-
&record_account_authority.pubkey(),
20282027
source_account,
2028+
&record_account_authority.pubkey(),
20292029
&record_account_authority,
20302030
)
20312031
.await
@@ -2034,8 +2034,8 @@ async fn confidential_transfer_with_fee_with_option<S: Signers>(
20342034
token
20352035
.confidential_transfer_close_record_account(
20362036
&transfer_amount_ciphertext_validity_proof_record_account.pubkey(),
2037-
&record_account_authority.pubkey(),
20382037
source_account,
2038+
&record_account_authority.pubkey(),
20392039
&record_account_authority,
20402040
)
20412041
.await
@@ -2044,8 +2044,8 @@ async fn confidential_transfer_with_fee_with_option<S: Signers>(
20442044
token
20452045
.confidential_transfer_close_record_account(
20462046
&fee_sigma_proof_record_account.pubkey(),
2047-
&record_account_authority.pubkey(),
20482047
source_account,
2048+
&record_account_authority.pubkey(),
20492049
&record_account_authority,
20502050
)
20512051
.await
@@ -2054,8 +2054,8 @@ async fn confidential_transfer_with_fee_with_option<S: Signers>(
20542054
token
20552055
.confidential_transfer_close_record_account(
20562056
&fee_ciphertext_validity_proof_record_account.pubkey(),
2057-
&record_account_authority.pubkey(),
20582057
source_account,
2058+
&record_account_authority.pubkey(),
20592059
&record_account_authority,
20602060
)
20612061
.await
@@ -2064,8 +2064,8 @@ async fn confidential_transfer_with_fee_with_option<S: Signers>(
20642064
token
20652065
.confidential_transfer_close_record_account(
20662066
&range_proof_record_account.pubkey(),
2067-
&record_account_authority.pubkey(),
20682067
source_account,
2068+
&record_account_authority.pubkey(),
20692069
&record_account_authority,
20702070
)
20712071
.await

token/program-2022-test/tests/confidential_transfer_fee.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -534,8 +534,8 @@ async fn withdraw_withheld_tokens_from_mint_with_option<S: Signers>(
534534
token
535535
.confidential_transfer_close_record_account(
536536
&record_account.pubkey(),
537-
&record_account_authority.pubkey(),
538537
destination_account,
538+
&record_account_authority.pubkey(),
539539
&record_account_authority,
540540
)
541541
.await
@@ -859,8 +859,8 @@ async fn withdraw_withheld_tokens_from_accounts_with_option<S: Signers>(
859859
token
860860
.confidential_transfer_close_record_account(
861861
&record_account.pubkey(),
862-
&record_account_authority.pubkey(),
863862
destination_account,
863+
&record_account_authority.pubkey(),
864864
&record_account_authority,
865865
)
866866
.await

0 commit comments

Comments
 (0)