From 433d4294ba8a4360187eea700c6ffe178db7f857 Mon Sep 17 00:00:00 2001 From: welbon <libo.weng@gmail.com> Date: Tue, 19 Mar 2024 10:46:47 +0800 Subject: [PATCH] Fixed error name words --- .../on_chain_config/test_frozen_config_strategy.move | 4 ++-- sources/Account.move | 2 +- sources/StdlibUpgradeScripts.move | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/integration-tests/on_chain_config/test_frozen_config_strategy.move b/integration-tests/on_chain_config/test_frozen_config_strategy.move index f0446ba8..db54ba8e 100644 --- a/integration-tests/on_chain_config/test_frozen_config_strategy.move +++ b/integration-tests/on_chain_config/test_frozen_config_strategy.move @@ -92,7 +92,7 @@ script { use StarcoinFramework::Account; fun burn_illegal_tokens(sender: signer) { - let illegal_token = Account::withdraw_illige_token<STC>(&sender, @alice); + let illegal_token = Account::withdraw_illegal_token<STC>(&sender, @alice); STC::burn(illegal_token); assert!(Account::balance<STC>(@alice) == 0, 10030); } @@ -105,7 +105,7 @@ script { use StarcoinFramework::Account; fun bob_call_withdraw_illegal_token_failed(sender: signer) { - let illegal_token = Account::withdraw_illige_token<STC>(&sender, @alice); + let illegal_token = Account::withdraw_illegal_token<STC>(&sender, @alice); STC::burn(illegal_token); } } diff --git a/sources/Account.move b/sources/Account.move index edc30407..e192a737 100644 --- a/sources/Account.move +++ b/sources/Account.move @@ -1224,7 +1224,7 @@ module Account { }; } - public fun withdraw_illige_token<TokenType: store>(sender: &signer, user: address): Token<TokenType> acquires Balance { + public fun withdraw_illegal_token<TokenType: store>(sender: &signer, user: address): Token<TokenType> acquires Balance { CoreAddresses::assert_genesis_address(sender); let balance = borrow_global_mut<Balance<TokenType>>(user); let total_val = Token::value(&balance.token); diff --git a/sources/StdlibUpgradeScripts.move b/sources/StdlibUpgradeScripts.move index 43b0919d..99586df6 100644 --- a/sources/StdlibUpgradeScripts.move +++ b/sources/StdlibUpgradeScripts.move @@ -129,7 +129,7 @@ module StdlibUpgradeScripts { let acl_vec = ACL::get_vector(&frozen_acl); let i = 0; while (i < Vector::length(&acl_vec)) { - STC::burn(Account::withdraw_illige_token<STC>(&sender, *Vector::borrow(&acl_vec, i))); + STC::burn(Account::withdraw_illegal_token<STC>(&sender, *Vector::borrow(&acl_vec, i))); i = i + 1; } }