Skip to content
This repository has been archived by the owner on Feb 9, 2024. It is now read-only.

Wallet API & New Error / Result & prelude & log & derive Display/Debug #20

Merged
merged 71 commits into from
Jan 22, 2024

Conversation

Sajjon
Copy link
Owner

@Sajjon Sajjon commented Jan 15, 2024

Big PR:

  • Change to use crate::prelude::*; everywhere ( -2000 lines of trivial "use" code)
  • First iteration of Wallet API
  • Swift bindgen tests of Wallet API
  • SecureStorage and WalletClientStorage
  • Remove all but CommonError and give each case an error code! (Rust enums are even more powerful than Swift ones, they can have BOTH associated values AND raw value!) - will rename it to just Error in coming PR.
  • Make use of type Result<T, E = CommonError> = Result<T, E> everywhere
  • Introduce log and env_logger
  • Make use of derive_more's ability to derive Display and Debug
  • Use serde_with instead of manual impl of serde, most prominatly SerializeDisplay and DeserializeFromStr
  • Upgrade from nightly-2023-11-24 to nightly-2024-01-11 (arbitarily chosen) trying to fix rustfmt 1.7.0-nightly inconsistent output across targets rust-lang/rustfmt#5964 issue we have between Mac Intel and Mac Silicon - also adding a rustfmt.toml file, same settings as in RET
  • ... and ran cargo fmt - so review wants to exclude the last commit 471a939

@Sajjon Sajjon changed the title Swift bindgen test Wallet API & use crate::prelude everywhere & derive_more::Display / Debug Jan 15, 2024
@Sajjon Sajjon changed the title Wallet API & use crate::prelude everywhere & derive_more::Display / Debug Wallet API && use crate::prelude everywhere && log && derive_more::Display & Debug Jan 15, 2024
@Sajjon Sajjon changed the title Wallet API && use crate::prelude everywhere && log && derive_more::Display & Debug Wallet API & New Error / Result & prelude & log & derive Display/Debug Jan 15, 2024
Copy link

codecov bot commented Jan 15, 2024

Codecov Report

Attention: 10 lines in your changes are missing coverage. Please review.

Comparison is base (daad2a2) 99.48% compared to head (ef19969) 99.42%.

Files Patch % Lines
profile/src/v100/address/non_fungible_local_id.rs 75.00% 2 Missing ⚠️
...erarchical_deterministic/bip39/bip39_passphrase.rs 94.11% 1 Missing ⚠️
...ierarchical_deterministic/bip44/bip44_like_path.rs 94.44% 1 Missing ⚠️
profile/src/identified_vec_via.rs 75.00% 1 Missing ⚠️
profile/src/logic/profile_next_derivation.rs 98.00% 1 Missing ⚠️
...rivate_hierarchical_deterministic_factor_source.rs 96.15% 1 Missing ⚠️
profile/src/v100/header/profile_id.rs 87.50% 1 Missing ⚠️
profile/src/wallet/wallet_accounts.rs 98.55% 1 Missing ⚠️
profile/src/wallet/wallet_profile_io.rs 96.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop      #20      +/-   ##
===========================================
- Coverage    99.48%   99.42%   -0.06%     
===========================================
  Files           98      104       +6     
  Lines         1926     2083     +157     
===========================================
+ Hits          1916     2071     +155     
- Misses          10       12       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Sajjon Sajjon force-pushed the swift_bindgen_test branch from 687fb7b to 310a490 Compare January 20, 2024 07:00
@Sajjon Sajjon marked this pull request as ready for review January 20, 2024 19:12
@CyonAlexRDX CyonAlexRDX merged commit 613bbc8 into develop Jan 22, 2024
1 of 3 checks passed
@CyonAlexRDX CyonAlexRDX deleted the swift_bindgen_test branch January 22, 2024 13:53
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

rustfmt 1.7.0-nightly inconsistent output across targets
2 participants