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

fix: Ledger create canister with --next-to transferring funds too early #3760

Merged
merged 12 commits into from
May 21, 2024

Conversation

fxgst
Copy link
Contributor

@fxgst fxgst commented May 15, 2024

Description

When creating a canister with dfx ledger create-canister --next-to on a canister that does not exist (e.g., aaaa-aa), then the funds are first transferred away from the users account, but the call then fails to create the new canister, and the funds are not returned to the user's account.

Fixes # (issue)

How Has This Been Tested?

Steps to reproduce: dfx ledger --ic create-canister --amount 0.01 --next-to aaaaa-aa $(dfx identity get-principal --ic)

Checklist:

  • The title of this PR complies with Conventional Commits.
  • I have edited the CHANGELOG accordingly.
  • I have made corresponding changes to the documentation.

@fxgst fxgst requested review from chenyan-dfinity and a team as code owners May 15, 2024 18:35
@adamspofford-dfinity
Copy link
Contributor

Can you add a test-case to ledger.bash?

@mraszyk
Copy link
Contributor

mraszyk commented May 15, 2024

and the funds are not returned to the user's account.

they should be if notify_create is called - is there a way to trigger that with dfx "manually"?

@adamspofford-dfinity
Copy link
Contributor

@mraszyk Yes, with dfx ledger notify create-canister.

@fxgst fxgst enabled auto-merge (squash) May 16, 2024 07:28
e2e/tests-dfx/ledger.bash Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
@fxgst fxgst merged commit fb3c639 into master May 21, 2024
179 checks passed
@fxgst fxgst deleted the elias/fix-next-to branch May 21, 2024 15:13
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