why is dfx wallet addresses
not showing canisters created with the wallet?
and how can we list all the canisters created with a wallet?
why is dfx wallet addresses
not showing canisters created with the wallet?
and how can we list all the canisters created with a wallet?
The addresses
call returns the list of AddressEntry 's agent-rs/wallet.rs at next · dfinity/agent-rs · GitHub
#[derive(CandidType, Debug, Deserialize)]
pub enum Role {
Contact,
Custodian,
Controller,
}
#[derive(CandidType, Debug, Deserialize)]
pub enum Kind {
Unknown,
User,
Canister,
}
#[derive(CandidType, Debug, Deserialize)]
pub struct AddressEntry {
pub id: Principal,
pub name: Option<String>,
pub kind: Kind,
pub role: Role,
}
So it will not display the canisters created by the wallet. The UI displays the canisters by reading the event log.
You can get events by doing dfx canister call <wallet-id> get_events '(record {from = null; to = null})'
and see the canister create events.
At some point I think by accidentally trying to assign my principal to the wallet canister I messed it up. When I query it I get { record { 23_515 = 70 : nat32; 1_191_829_844 = variant { 1_955_698_212 = record { 2_190_693_645 = 0 : nat64; 2_374_371_241 = "canister_status"; 2_631_180_839 = principal "aaaaa-aa"
. I did the process from scratch and I get the correct principal.