Skip to content

Conversation

@fEst1ck
Copy link

@fEst1ck fEst1ck commented Dec 1, 2025

We fix two tests in the coin module. In short, the tests failed due to the unconsistenty: we updated the two tests as in framework v1.34, but did not update some of the functions, which the tests depend on, to v1.34 exactly.

  1. test_migration_with_existing_primary_fungible_store. We change

    assert!(can_receive_paired_fungible_asset(account_addr, ensure_paired_metadata<FakeMoney>()), 0);
    

    back to

    assert!(!can_receive_paired_fungible_asset(account_addr, ensure_paired_metadata<FakeMoney>()), 0);
    

    as before the framework update, which is the expected behavior since we did not enable NEW_ACCOUNTS_DEFAULT_TO_FA_SUPRA_STORE as in the updated framework.

  2. test_migration_coin_store_with_non_coin_type. We change the expected behavior back to

    #[expected_failure(abort_code = 0x10003, location = Self)]
    

    and revert the deleted

    assert!(is_coin_initialized<CoinType>(), error::invalid_argument(ECOIN_INFO_NOT_PUBLISHED));
    

    as before the framework update.
    The test does not abort in v1.34 because the aborting line

    let metadata = ensure_paired_metadata<CoinType>();
    

    is guarded by

    if (is_coin_initialized<CoinType>())
    

Copy link

@dhaval-supraoracles dhaval-supraoracles left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only have 1 comment.

// migrate_to_fungible_store_internal<String>(&other);
// }
#[test(other = @0x123)]
#[expected_failure(abort_code = 0x10003, location = Self)]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So it should fail right?
I thought it should be passed without abort.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. We can update to the new behaviour in 1.34 when we eventually update maybe_convert_to_fungible_store.

@zekun-supra zekun-supra merged commit 1a3c9f6 into Entropy-Foundation:issue/fix_building_issue_on_upgrade Dec 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants