fix: some breaking changes from pallas v0.18
This commit is contained in:
parent
c3175e2fc9
commit
8f765bfd52
|
@ -295,7 +295,8 @@ fn get_tx_info_v1(
|
||||||
let outputs = body
|
let outputs = body
|
||||||
.outputs
|
.outputs
|
||||||
.iter()
|
.iter()
|
||||||
.map(|output| TxOut::V1(sort_tx_out_value(output)))
|
.cloned()
|
||||||
|
.map(|output| TxOut::V1(sort_tx_out_value(&output.into())))
|
||||||
.collect();
|
.collect();
|
||||||
|
|
||||||
let fee = Value::Coin(body.fee);
|
let fee = Value::Coin(body.fee);
|
||||||
|
@ -341,7 +342,7 @@ fn get_tx_info_v1(
|
||||||
.sorted()
|
.sorted()
|
||||||
.collect();
|
.collect();
|
||||||
|
|
||||||
let id = tx.transaction_body.compute_hash();
|
let id = tx.transaction_body.original_hash();
|
||||||
|
|
||||||
Ok(TxInfo::V1(TxInfoV1 {
|
Ok(TxInfo::V1(TxInfoV1 {
|
||||||
inputs,
|
inputs,
|
||||||
|
@ -372,7 +373,8 @@ fn get_tx_info_v2(
|
||||||
let outputs = body
|
let outputs = body
|
||||||
.outputs
|
.outputs
|
||||||
.iter()
|
.iter()
|
||||||
.map(|output| TxOut::V2(sort_tx_out_value(output)))
|
.cloned()
|
||||||
|
.map(|output| TxOut::V2(sort_tx_out_value(&output.into())))
|
||||||
.collect();
|
.collect();
|
||||||
|
|
||||||
let fee = Value::Coin(body.fee);
|
let fee = Value::Coin(body.fee);
|
||||||
|
@ -443,7 +445,7 @@ fn get_tx_info_v2(
|
||||||
.collect(),
|
.collect(),
|
||||||
);
|
);
|
||||||
|
|
||||||
let id = tx.transaction_body.compute_hash();
|
let id = tx.transaction_body.original_hash();
|
||||||
|
|
||||||
Ok(TxInfo::V2(TxInfoV2 {
|
Ok(TxInfo::V2(TxInfoV2 {
|
||||||
inputs,
|
inputs,
|
||||||
|
|
|
@ -5,11 +5,10 @@ use pallas_primitives::babbage::{
|
||||||
AddrKeyhash, Certificate, Coin, DatumHash, PlutusData, PolicyId, Redeemer, StakeCredential,
|
AddrKeyhash, Certificate, Coin, DatumHash, PlutusData, PolicyId, Redeemer, StakeCredential,
|
||||||
TransactionInput, TransactionOutput, Value,
|
TransactionInput, TransactionOutput, Value,
|
||||||
};
|
};
|
||||||
use serde::Deserialize;
|
|
||||||
|
|
||||||
use super::to_plutus_data::MintValue;
|
use super::to_plutus_data::MintValue;
|
||||||
|
|
||||||
#[derive(Debug, PartialEq, Clone, Deserialize)]
|
#[derive(Debug, PartialEq, Clone)]
|
||||||
pub struct ResolvedInput {
|
pub struct ResolvedInput {
|
||||||
pub input: TransactionInput,
|
pub input: TransactionInput,
|
||||||
pub output: TransactionOutput,
|
pub output: TransactionOutput,
|
||||||
|
|
Loading…
Reference in New Issue