Skip to content
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

lift HasSampleValues restriction on Signable trait #290

Conversation

CyonAlexRDX
Copy link
Contributor

@CyonAlexRDX CyonAlexRDX commented Dec 4, 2024

we use:

impl<S: Signable + HasSampleValues> HasSampleValues for SignRequest<S>
where
    S::Payload: HasSampleValues,
    S::ID: HasSampleValues,
{
...
}

And in many more places

@CyonAlexRDX CyonAlexRDX merged commit afe773b into micbakos/ABW-3989-expose-interactors Dec 4, 2024
10 of 11 checks passed
@CyonAlexRDX CyonAlexRDX deleted the micbakos/ABW-3989-expose-interactors_conditional_hassamplevalues branch December 4, 2024 13:54
Copy link

codecov bot commented Dec 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.7%. Comparing base (a5b833a) to head (51ee379).
Report is 3 commits behind head on micbakos/ABW-3989-expose-interactors.

Additional details and impacted files

Impacted file tree graph

@@                         Coverage Diff                          @@
##           micbakos/ABW-3989-expose-interactors    #290   +/-   ##
====================================================================
  Coverage                                  92.7%   92.7%           
====================================================================
  Files                                       799     799           
  Lines                                     18371   18371           
  Branches                                     77      77           
====================================================================
  Hits                                      17035   17035           
  Misses                                     1322    1322           
  Partials                                     14      14           
Flag Coverage Δ
kotlin 98.0% <ø> (ø)
rust 92.3% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...argon/src/signing/host_interaction/sign_request.rs 100.0% <ø> (ø)
...rgon/src/signing/host_interaction/sign_response.rs 100.0% <ø> (ø)
...host_interaction/transaction_sign_request_input.rs 100.0% <ø> (ø)
.../src/signing/petition_types/petition_for_entity.rs 93.7% <ø> (ø)
...for_factors/petition_for_factors_state_snapshot.rs 100.0% <ø> (ø)
crates/sargon/src/signing/signables/signable.rs 96.5% <ø> (ø)
...atures_outecome_types/maybe_signed_transactions.rs 94.2% <ø> (ø)
...atures_outecome_types/sign_with_factors_outcome.rs 91.3% <ø> (ø)
crates/sargon/src/types/hd_signature.rs 100.0% <ø> (ø)
crates/sargon/src/types/hd_signature_input.rs 100.0% <ø> (ø)
... and 1 more

micbakos-rdx added a commit that referenced this pull request Dec 5, 2024
* Export inputs in uniffi

* Replace mono/poly interactors with a single interactor for signing

* Expose sign request to uniffi

* Expose neglected factors

* Expose hd signature

* Expose sign response

* Expose sign with factors outcome

* WIP

* WIP 2

* WIP 3

* WIP 4

* WIP 5

* Add Send + Sync to SignInteractor

* Use a single "poly" interactor for keys derivation

* Separate boot methods to expose one for clients

* Bridge the internal and the uniffi host interactor

* Fix android unit tests

* Expose sign methods in sargon os

* Rename outcome

* Implement signing methods for export

* Replace with rwlock in PetitionForFactorsSubState

* Replace with rwlock in PetitionForFactorsState

* Replace with rwlock in PetitionForFactors

* Fix debug and remove clone

* Replace with rwlock in PetitionForEntity

* Replace with rwlock in PetitionForTransaction

* Replace with rwlock in Petitions

* Replace with rwlock in SignaturesCollectorState

* Replace with rwlock in SignaturesCollector

* Expose signing methods with uniffi

* Run fmt

* Run clippy

* Add failing profile test

* Add failing test due to irrelevant entity

* Remove no ui interactor

* Run fmt

* Put back methods

* Fix hdsignature ctor

* Fix tests

* Replace with signature with public key

* Add uniffi tests

* Replace custom conversions with InternalConversion

* Rename expect messages

* Remove cloned

* Implement macros for hd signature

* Implement macros for invalid transaction if neglected

* Implement macros for signatures per factor source

* Implement macros for sign response

* Implement macros for sign with factors outcome

* Remove hashmap from uniffi sign request

* Implement macros for sign request

* Fix kotlin tests

* Define interactors type

* Bump sargon

* Add abandoned reasons

* Declare signed outcome with macro

* Add some tests

* Fix per factor source

* Clippy fix

* WIP

* WIP

* Add send + sync

* Redeclare macros

* fmt

* lift HasSampleValues restriction on Signable trait (#290)

* Remove outcome

* Replace outcome with result

* Allow simulated user to also reject signing.

* Fmt

* Clippy

* Throw signing rejected

* Skip swift tests

* fmt

* Swift format

---------

Co-authored-by: Alexander Cyon <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant