Skip to content

Commit 18874d0

Browse files
committed
refactor: remove network from store_id Key
1 parent f6f0c51 commit 18874d0

File tree

13 files changed

+5
-22
lines changed

13 files changed

+5
-22
lines changed

crates/icp-cli/src/commands/canister/binding_env_vars.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,6 @@ pub(crate) async fn exec(ctx: &Context, args: &BindingArgs) -> Result<(), Comman
195195

196196
// Lookup the canister id
197197
let cid = ctx.ids.lookup(&Key {
198-
network: env.network.name.to_owned(),
199198
environment: env.name.to_owned(),
200199
canister: c.name.to_owned(),
201200
})?;

crates/icp-cli/src/commands/canister/create.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,6 @@ pub(crate) async fn exec(ctx: &Context, args: &CreateArgs) -> Result<(), Command
188188
.filter_map(|(_, c)| {
189189
ctx.ids
190190
.lookup(&Key {
191-
network: env.network.name.to_owned(),
192191
environment: env.name.to_owned(),
193192
canister: c.name.to_owned(),
194193
})
@@ -255,9 +254,8 @@ pub(crate) async fn exec(ctx: &Context, args: &CreateArgs) -> Result<(), Command
255254
// Indicate to user that the canister is created
256255
pb.set_message("Creating...");
257256

258-
// Create canister-network association-key
257+
// Create canister-environment association-key
259258
let k = Key {
260-
network: env.network.name.to_owned(),
261259
environment: env.name.to_owned(),
262260
canister: c.name.to_owned(),
263261
};

crates/icp-cli/src/commands/canister/info.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,6 @@ pub(crate) async fn exec(ctx: &Context, args: &InfoArgs) -> Result<(), CommandEr
8686

8787
// Lookup the canister id
8888
let cid = ctx.ids.lookup(&Key {
89-
network: env.network.name.to_owned(),
9089
environment: env.name.to_owned(),
9190
canister: args.name.to_owned(),
9291
})?;

crates/icp-cli/src/commands/canister/install.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,6 @@ pub(crate) async fn exec(ctx: &Context, args: &InstallArgs) -> Result<(), Comman
154154

155155
// Lookup the canister id
156156
let cid = ctx.ids.lookup(&Key {
157-
network: env.network.name.to_owned(),
158157
environment: env.name.to_owned(),
159158
canister: c.name.to_owned(),
160159
})?;

crates/icp-cli/src/commands/canister/settings/show.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,6 @@ pub(crate) async fn exec(ctx: &Context, args: &ShowArgs) -> Result<(), CommandEr
8585

8686
// Lookup the canister id
8787
let cid = ctx.ids.lookup(&Key {
88-
network: env.network.name.to_owned(),
8988
environment: env.name.to_owned(),
9089
canister: args.name.to_owned(),
9190
})?;

crates/icp-cli/src/commands/canister/settings/update.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,6 @@ pub(crate) async fn exec(ctx: &Context, args: &UpdateArgs) -> Result<(), Command
178178

179179
// Lookup the canister id
180180
let cid = ctx.ids.lookup(&Key {
181-
network: env.network.name.to_owned(),
182181
environment: env.name.to_owned(),
183182
canister: args.name.to_owned(),
184183
})?;

crates/icp-cli/src/commands/canister/start.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@ pub(crate) async fn exec(ctx: &Context, args: &StartArgs) -> Result<(), CommandE
8484

8585
// Lookup the canister id
8686
let cid = ctx.ids.lookup(&Key {
87-
network: env.network.name.to_owned(),
8887
environment: env.name.to_owned(),
8988
canister: args.name.to_owned(),
9089
})?;

crates/icp-cli/src/commands/canister/stop.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@ pub(crate) async fn exec(ctx: &Context, args: &StopArgs) -> Result<(), CommandEr
8484

8585
// Lookup the canister id
8686
let cid = ctx.ids.lookup(&Key {
87-
network: env.network.name.to_owned(),
8887
environment: env.name.to_owned(),
8988
canister: args.name.to_owned(),
9089
})?;

crates/icp-cli/src/commands/canister/top_up.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,6 @@ pub(crate) async fn exec(ctx: &Context, args: &TopUpArgs) -> Result<(), CommandE
9999

100100
// Lookup the canister id
101101
let cid = ctx.ids.lookup(&Key {
102-
network: env.network.name.to_owned(),
103102
environment: env.name.to_owned(),
104103
canister: args.name.to_owned(),
105104
})?;

crates/icp-cli/src/commands/sync/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,6 @@ pub(crate) async fn exec(ctx: &Context, args: &SyncArgs) -> Result<(), CommandEr
136136

137137
// Get canister principal ID
138138
let cid = ctx.ids.lookup(&Key {
139-
network: env.network.name.to_owned(),
140139
environment: env.name.to_owned(),
141140
canister: c.name.to_owned(),
142141
})?;

0 commit comments

Comments
 (0)