sdk
sdk copied to clipboard
fix: Ledger create canister with `--next-to` transferring funds too early
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:
- [x] The title of this PR complies with Conventional Commits.
- [x] I have edited the CHANGELOG accordingly.
- [x] I have made corresponding changes to the documentation.