fix: Add wrap constructor to V1/V2 stake_credential when Purpose is Rewarding
This commit is contained in:
parent
47a15cf8b2
commit
75b5332288
|
@ -872,9 +872,10 @@ impl<'a> ToPlutusData for WithWrappedTransactionId<'a, ScriptPurpose> {
|
||||||
ScriptPurpose::Spending(out_ref, ()) => {
|
ScriptPurpose::Spending(out_ref, ()) => {
|
||||||
wrap_with_constr(1, WithWrappedTransactionId(out_ref).to_plutus_data())
|
wrap_with_constr(1, WithWrappedTransactionId(out_ref).to_plutus_data())
|
||||||
}
|
}
|
||||||
ScriptPurpose::Rewarding(stake_credential) => {
|
ScriptPurpose::Rewarding(stake_credential) => wrap_with_constr(
|
||||||
wrap_with_constr(2, stake_credential.to_plutus_data())
|
2,
|
||||||
}
|
WithWrappedStakeCredential(stake_credential).to_plutus_data(),
|
||||||
|
),
|
||||||
ScriptPurpose::Certifying(_, dcert) => {
|
ScriptPurpose::Certifying(_, dcert) => {
|
||||||
wrap_with_constr(3, WithPartialCertificates(dcert).to_plutus_data())
|
wrap_with_constr(3, WithPartialCertificates(dcert).to_plutus_data())
|
||||||
}
|
}
|
||||||
|
@ -1243,6 +1244,12 @@ impl<'a> ToPlutusData for WithWrappedStakeCredential<'a, KeyValuePairs<Address,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl<'a> ToPlutusData for WithWrappedStakeCredential<'a, StakeCredential> {
|
||||||
|
fn to_plutus_data(&self) -> PlutusData {
|
||||||
|
wrap_with_constr(0, self.0.to_plutus_data())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
impl ToPlutusData for Voter {
|
impl ToPlutusData for Voter {
|
||||||
fn to_plutus_data(&self) -> PlutusData {
|
fn to_plutus_data(&self) -> PlutusData {
|
||||||
match self {
|
match self {
|
||||||
|
|
Loading…
Reference in New Issue