Identity - cycles wallet - ledger wallet - import and backup

hi, I have an identity file that had 1 ICP and 1T cycles and its backup pem file that I was able to import successfully. now in that identity there was 1 ICP which I still see correctly with the command “dfx ledger balance --network ic” but with the command “dfx wallet balance --network ic” it gives me this error: clod@desktop-mint: ~/Documents/code/icp-azle/randomizer$ dfx wallet balance --network ic
Error: Failed to setup wallet caller.
Caused by: Failed to setup wallet caller.
No wallet configured for combination of identity ‘dorellik’ and network ‘ic’
clod@desktop-mint:~/Documents/code/icp-azle/randomizer$

How can I recover the cycles? Thanks in advance for the time that I hope someone will kindly dedicate to me.

Side note: this is one of the reasons why we’re working on the cycles ledger so that this doesn’t happen.

If you didn’t back up the cycles wallet id you need to recover it somehow and then run dfx identity --network ic set-wallet <wallet id>. To find the id there are a few ways:

  • Search on a chain explorer (e.g. icscan.io) for your principal and see which canisters your identity controls. If a canister interface shows wallet functions then it’s likely your cycles wallet
  • Look at the controllers of canisters that you deployed using that identity. Your projects would have a canister_ids.json file that lists your canister ids. If you check their controllers with e.g. dfx canister --network ic info <canister id> you will see which principals control the canister. dfx by defaults makes your identity and your wallet a controller

----------I made it just when I thought I would give up… I tried to redeem the coupon again thinking that maybe I hadn’t done it:

clod@desktop-mint:~$ dfx wallet --network ic redeem-faucet-coupon 99BD3-F6CEA-xxxxx
Redeeming coupon. This may take up to 30 seconds…
Error: Failed ‘redeem’ call.
Caused by: Failed ‘redeem’ call.
The replica returned a replica error: reject code CanisterReject, reject message Code is already redeemed: {canister = bjrqo-2aaaa-aaaap-abpxa-cai; controller = velmh-rpxqi-jo35v-m7uyy-y3zlu-33fuu-2hu7k-ma2lf-wthaq-jawen-gqe; coupon = ?“99BD3-F6CEA-xxxxx”; creation = +1_711_057_222_768_994_710; cycle = 10_000_000_000_000; hash = null}, error code None

---------------here I notice that it tells me in which canister the coupon was deployed:
clod@desktop-mint:~$ dfx canister --network ic call bjrqo-2aaaa-aaaap-abpxa-cai; wallet_balance
(record { 3_573_748_184 = 10_096_392_205_927 : nat64 })

---------------i try to set up as my wallet but error in local :
clod@desktop-mint:~$ dfx identity set-wallet bjrqo-2aaaa-aaaap-abpxa-cai;
Checking availability of the canister on the network…
Error: Failed to construct wallet canister caller: Certificate verification failed.

---------------BUT WORKS IN IC NETWORK :
clod@desktop-mint:~$ dfx identity set-wallet bjrqo-2aaaa-aaaap-abpxa-cai; --network ic
Checking availability of the canister on the network…
Setting wallet for identity ‘dorellik’ on network ‘ic’ to id ‘bjrqo-2aaaa-aaaap-abpxa-cai;’
Wallet set successfully.

AND NOW I HAVE MY 10.098 TC in mainet !!!
clod@desktop-mint:~$ dfx wallet balance --network ic
10.098 TC (trillion cycles).
:rocket: :white_check_mark: :call_me_hand:t3:

thanks to the icp community they tried to help me right away, with patience and kindness… especially on the faucet Discord group: TedR, thank you very much and then here Severin who was also very quick in trying to help me.

1 Like

ps the value of the canister - controller and coupon are fake , very similar to original lenght and form but fake

so I think that when I used the faucet with my identity, it created a new canister that only acted as a wallet. but this canister doesn’t seem to come out of icp scan in any way with the data I inserted… the fact is that instead trying to use the coupon again it tells us which is the canister into which the cycles were poured and correctly I’m going to recover, so let’s say that the pem file of the identity of the person who redeemed the coupon is sufficient to recover the cycles… but knowing the number of coupons, it seems strange to me that there isn’t another way but I I have not found it .