Skip to content

Commit

Permalink
fix error propagation
Browse files Browse the repository at this point in the history
  • Loading branch information
lisicky committed Nov 29, 2024
1 parent a02dfa5 commit b0e9a3d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rust/src/protocol_types/governance/drep.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ impl DRep {
pub fn to_bech32(&self, cip_129_format: bool) -> Result<String, JsError> {
if cip_129_format {
let gov_identifier: GovernanceIdentifier = self.try_into()?;
gov_identifier.to_bech32().map_err(|e| JsError::from_str(&e.to_string()))
gov_identifier.to_bech32()
} else {
let (hrp, data) = match &self.0 {
DRepEnum::KeyHash(keyhash) => Ok(("drep_vkh", keyhash.to_bytes())),
Expand Down

0 comments on commit b0e9a3d

Please sign in to comment.