@@ -116,11 +116,11 @@ module aptos_framework::aptos_coin {
116
116
117
117
/// Only callable in tests and testnets where the core resources account exists.
118
118
/// Create delegated token for the address so the account could claim MintCapability later.
119
- public entry fun delegate_mint_capability (account: & signer , to: address ) acquires Delegations {
120
- system_addresses::assert_aptos_framework (account);
119
+ public entry fun delegate_mint_capability (account: signer , to: address ) acquires Delegations {
120
+ system_addresses::assert_aptos_framework (& account);
121
121
let delegations = &mut borrow_global_mut <Delegations >(@aptos_framework ).inner;
122
- if (!exists <Delegations >(signer ::address_of (account))) {
123
- move_to (account, Delegations { inner: vector [] });
122
+ if (!exists <Delegations >(signer ::address_of (& account))) {
123
+ move_to (& account, Delegations { inner: vector [] });
124
124
};
125
125
vector ::for_each_ref (delegations, |element| {
126
126
let element: &DelegatedMintCapability = element;
@@ -231,8 +231,11 @@ module aptos_framework::aptos_coin {
231
231
// initialize the `aptos_coin`
232
232
let (burn_cap, mint_cap) = initialize_for_test (aptos_framework);
233
233
234
+ // get a copy of the framework signer for test
235
+ let aptos_framework_delegate = account::create_signer_for_test (signer ::address_of (aptos_framework));
236
+
234
237
// delegate and claim the mint capability
235
- delegate_mint_capability (aptos_framework , signer ::address_of (destination));
238
+ delegate_mint_capability (aptos_framework_delegate , signer ::address_of (destination));
236
239
claim_mint_capability (destination);
237
240
238
241
// destroy the mint Capability
0 commit comments