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

feat: use cycles ledger in deposit-cycles #3626

Merged
merged 10 commits into from
Mar 5, 2024

Conversation

sesi200
Copy link
Contributor

@sesi200 sesi200 commented Feb 29, 2024

Description

dfx canister deposit-cycles now is also capable of using cycles on the cycles ledger to top up a canister.

The test dfx/cycles-ledger/top-up and deposit-cycles passed when the feature flag was turned on, see e.g. this run: macos, ubuntu. It is now disabled until the feature flag gets enabled (ETA ~1 month)

Fixes SDK-1371

How Has This Been Tested?

added e2e

Checklist:

@sesi200 sesi200 marked this pull request as ready for review February 29, 2024 15:27
@sesi200 sesi200 requested review from chenyan-dfinity and a team as code owners February 29, 2024 15:27
@sesi200
Copy link
Contributor Author

sesi200 commented Feb 29, 2024

dfx/wallet test fails because the feature flag is turned on

call_sender = &proxy_sender;
}
Err(err) => {
if CYCLES_LEDGER_ENABLED && matches!(err, crate::lib::identity::wallet::GetOrCreateWalletCanisterError::NoWalletConfigured { .. }) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Why does the error handling of the get_or_create_wallet_canister depend on the flag CYCLES_LEDGER_ENABLED?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Because until we enable the cycles ledger functionality we want to preserve the previous behavior of erroring out because no cycles wallet is configured. Once the cycles ledger is enabled we will just try to use the cycles in the cycles ledger

@sesi200 sesi200 merged commit dd20e6f into master Mar 5, 2024
173 checks passed
@sesi200 sesi200 deleted the SDK-1371-add-withdraw-functions-in-dfx branch March 5, 2024 07:32
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