This repository was archived by the owner on Mar 11, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +21
-3
lines changed Expand file tree Collapse file tree 1 file changed +21
-3
lines changed Original file line number Diff line number Diff line change @@ -1228,12 +1228,21 @@ async fn withdraw_withheld_tokens_from_mint() {
1228
1228
);
1229
1229
1230
1230
// fail frozen account
1231
+ let account = create_and_transfer_to_account(
1232
+ &token,
1233
+ &alice_account,
1234
+ &alice,
1235
+ &alice.pubkey(),
1236
+ amount,
1237
+ decimals,
1238
+ )
1239
+ .await;
1231
1240
token
1232
- .freeze_account(&bob_account , &freeze_authority)
1241
+ .freeze_account(&account , &freeze_authority)
1233
1242
.await
1234
1243
.unwrap();
1235
1244
let error = token
1236
- .withdraw_withheld_tokens_from_mint(&bob_account , &withdraw_withheld_authority)
1245
+ .withdraw_withheld_tokens_from_mint(&account , &withdraw_withheld_authority)
1237
1246
.await
1238
1247
.unwrap_err();
1239
1248
assert_eq!(
@@ -1247,6 +1256,15 @@ async fn withdraw_withheld_tokens_from_mint() {
1247
1256
);
1248
1257
1249
1258
// set to none, fail
1259
+ let account = create_and_transfer_to_account(
1260
+ &token,
1261
+ &alice_account,
1262
+ &alice,
1263
+ &alice.pubkey(),
1264
+ amount,
1265
+ decimals,
1266
+ )
1267
+ .await;
1250
1268
token
1251
1269
.set_authority(
1252
1270
token.get_address(),
@@ -1257,7 +1275,7 @@ async fn withdraw_withheld_tokens_from_mint() {
1257
1275
.await
1258
1276
.unwrap();
1259
1277
let error = token
1260
- .withdraw_withheld_tokens_from_mint(&alice_account , &withdraw_withheld_authority)
1278
+ .withdraw_withheld_tokens_from_mint(&account , &withdraw_withheld_authority)
1261
1279
.await
1262
1280
.unwrap_err();
1263
1281
assert_eq!(
You can’t perform that action at this time.
0 commit comments