Skip to content

Commit

Permalink
fix: ensure slot hidden accounts are skipped
Browse files Browse the repository at this point in the history
  • Loading branch information
glihm committed Aug 13, 2024
1 parent ccbccbf commit 6878242
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion crates/sozo/ops/src/migration/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,14 @@ async fn get_declarers_accounts<A: ConnectedAccount>(

for a in vals {
let address = a["address"].as_str().unwrap();
let private_key = a["privateKey"].as_str().unwrap();

// On slot, some accounts are hidden, we skip them.
let private_key = if let Some(pk) = a["privateKey"].as_str() {
pk
} else {
continue;
};

let provider = AnyProvider::JsonRpcHttp(JsonRpcClient::new(HttpTransport::new(
Url::parse(rpc_url).unwrap(),
)));
Expand Down

0 comments on commit 6878242

Please sign in to comment.