Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: account not exist after removing functionality register_if_not_exist #83

Closed
mrLSD opened this issue May 16, 2024 · 1 comment · Fixed by #84
Closed

Bug: account not exist after removing functionality register_if_not_exist #83

mrLSD opened this issue May 16, 2024 · 1 comment · Fixed by #84

Comments

@mrLSD
Copy link
Collaborator

mrLSD commented May 16, 2024

Description

With the latest PR merge #79 was discovered the bug related to account registration.

🔖 Test reproduced it: https://github.com/aurora-is-near/aurora-engine/actions/runs/9113376000/job/25054713709?pr=930#step:8:568

This particular test fails, as an account in deposit logic does not exist.

🖥️ Explanation

It was special logic with function register_if_not_exists, that controls account registration. It was removed to self.ft.storage_deposit and it broke the logic that a guaranty account exists.

@mrLSD
Copy link
Collaborator Author

mrLSD commented May 17, 2024

I found where the issue is:

    ///  Mint `nETH` tokens
    fn mint_eth_on_near(&mut self, owner_id: &AccountId, amount: Balance) {
        log!("Mint {} nETH tokens for: {}", amount, owner_id);
        // Create account to avoid panic with deposit
        self.ft.internal_deposit(owner_id, amount);
    }

before changes in line with comment:

    // Create account to avoid panic with deposit

was created the account. Now it's removed. And in finish_deposit function account not created.

cc: @karim-en @olga24912

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 a pull request may close this issue.

1 participant