-
Notifications
You must be signed in to change notification settings - Fork 52
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: client API first iteration #2093
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
devskim found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.
bdafe04
to
297c14c
Compare
5bb7fd2
to
23dc3c2
Compare
f7dccb5
to
d2e3984
Compare
let StoragePaymentResult { skipped_chunks, .. } = | ||
self.pay(xor_names.into_iter(), wallet).await?; | ||
|
||
// TODO: Upload in parallel |
Check notice
Code scanning / devskim
A "TODO" or similar was left in source code, possibly indicating incomplete functionality Note
for content_addr in content_addrs { | ||
let network = self.network.clone(); | ||
tasks.spawn(async move { | ||
// TODO: retry, but where? |
Check notice
Code scanning / devskim
A "TODO" or similar was left in source code, possibly indicating incomplete functionality Note
|
||
let addr = client.put(data, wallet).await?; | ||
|
||
// TODO: Set created_at and modified_at |
Check notice
Code scanning / devskim
A "TODO" or similar was left in source code, possibly indicating incomplete functionality Note
} | ||
|
||
fn build_client_and_run_swarm(local: bool) -> (Network, Receiver<NetworkEvent>) { | ||
// TODO: `root_dir` is only used for nodes. `NetworkBuilder` should not require it. |
Check notice
Code scanning / devskim
A "TODO" or similar was left in source code, possibly indicating incomplete functionality Note
let root_dir = std::env::temp_dir(); | ||
let network_builder = NetworkBuilder::new(Keypair::generate_ed25519(), local, root_dir); | ||
|
||
// TODO: Re-export `Receiver<T>` from `sn_networking`. Else users need to keep their `tokio` dependency in sync. |
Check notice
Code scanning / devskim
A "TODO" or similar was left in source code, possibly indicating incomplete functionality Note
let network_builder = NetworkBuilder::new(Keypair::generate_ed25519(), local, root_dir); | ||
|
||
// TODO: Re-export `Receiver<T>` from `sn_networking`. Else users need to keep their `tokio` dependency in sync. | ||
// TODO: Think about handling the mDNS error here. |
Check notice
Code scanning / devskim
A "TODO" or similar was left in source code, possibly indicating incomplete functionality Note
} | ||
} | ||
|
||
// TODO: Handle closing of network events sender |
Check notice
Code scanning / devskim
A "TODO" or similar was left in source code, possibly indicating incomplete functionality Note
} | ||
} | ||
|
||
// TODO: as WASM can not save a wallet state to disk or load from disk -- we need to provide a wallet state manually. |
Check notice
Code scanning / devskim
A "TODO" or similar was left in source code, possibly indicating incomplete functionality Note
.insert(spend); | ||
} | ||
|
||
// TODO: should we verify if the transfer is valid and destined for this wallet? |
Check notice
Code scanning / devskim
A "TODO" or similar was left in source code, possibly indicating incomplete functionality Note
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the test compile needs fixed eg https://github.com/maidsafe/safe_network/actions/runs/10791386235/job/29928681734?pr=2093
but once thats in gtg!
Initial implementation of high level API