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

Cardano: Update and regenerate protobuffs #85

Merged

Conversation

RostarMarek
Copy link
Contributor

Update and regenerate protobuffs to allow vote delegation on cardano.

@RostarMarek RostarMarek marked this pull request as draft September 18, 2024 12:44
@RostarMarek RostarMarek marked this pull request as ready for review September 18, 2024 12:44
@RostarMarek RostarMarek force-pushed the rostarmarek/cardano-vote-deleg branch 2 times, most recently from a120086 to 4e23503 Compare September 18, 2024 13:08
@RostarMarek RostarMarek marked this pull request as draft September 18, 2024 13:47
@RostarMarek RostarMarek marked this pull request as ready for review September 18, 2024 15:43
allow_zero_ttl: false,
};

let witness = bitbox.cardano_sign_transaction(transaction).await.unwrap();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you'll need to check for success if the firmware version is >= 9.21.0, and for failure otherwise, as older firmwares don't yet have support for vote delegation.

Copy link
Contributor

@benma benma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a note in CHANGELOG-rust.md under 0.6.0

@RostarMarek RostarMarek force-pushed the rostarmarek/cardano-vote-deleg branch 2 times, most recently from b365ed6 to cb6bee3 Compare September 24, 2024 10:26
Copy link
Contributor

@benma benma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. CI fails b/c it seems rustfmt didn't format the code:

Diff in /home/runner/work/bitbox-api-rs/bitbox-api-rs/tests/subtests/test_cardano.rs:207:
             allow_zero_ttl: false,
         };
 
-        if semver::VersionReq::parse(">=9.21.0").unwrap().matches(bitbox.version()) {
+        if semver::VersionReq::parse(">=9.21.0")
+            .unwrap()
+            .matches(bitbox.version())
+        {
             let witness = bitbox.cardano_sign_transaction(transaction).await.unwrap();
             assert_eq!(witness.shelley_witnesses.len(), 2);
             assert_eq!(
Error: Process completed with exit code 1.

Update and regenerate protobuffs to allow vote delegation on cardano
Copy link
Contributor

@benma benma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@benma benma merged commit 6dd99fd into BitBoxSwiss:master Sep 24, 2024
4 checks passed
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.

2 participants