fix: fix unable to build and sign txs (#345)
This commit is contained in:
parent
f7a2c8e786
commit
fcbaf4ed97
3 changed files with 5 additions and 6 deletions
|
|
@ -626,7 +626,7 @@ impl BuiltTransaction {
|
|||
self.signatures = Some(new_sigs);
|
||||
|
||||
// TODO: chance for serialisation round trip issues?
|
||||
let mut tx = babbage::Tx::decode_fragment(&self.tx_hash.0)
|
||||
let mut tx = babbage::Tx::decode_fragment(&self.tx_bytes.0)
|
||||
.map_err(|_| TxBuilderError::CorruptedTxBytes)?;
|
||||
|
||||
let mut vkey_witnesses = tx.transaction_witness_set.vkeywitness.unwrap_or_default();
|
||||
|
|
@ -667,7 +667,7 @@ impl BuiltTransaction {
|
|||
self.signatures = Some(new_sigs);
|
||||
|
||||
// TODO: chance for serialisation round trip issues?
|
||||
let mut tx = babbage::Tx::decode_fragment(&self.tx_hash.0)
|
||||
let mut tx = babbage::Tx::decode_fragment(&self.tx_bytes.0)
|
||||
.map_err(|_| TxBuilderError::CorruptedTxBytes)?;
|
||||
|
||||
let mut vkey_witnesses = tx.transaction_witness_set.vkeywitness.unwrap_or_default();
|
||||
|
|
@ -703,7 +703,7 @@ impl BuiltTransaction {
|
|||
self.signatures = Some(new_sigs);
|
||||
|
||||
// TODO: chance for serialisation round trip issues?
|
||||
let mut tx = babbage::Tx::decode_fragment(&self.tx_hash.0)
|
||||
let mut tx = babbage::Tx::decode_fragment(&self.tx_bytes.0)
|
||||
.map_err(|_| TxBuilderError::CorruptedTxBytes)?;
|
||||
|
||||
let mut vkey_witnesses = tx.transaction_witness_set.vkeywitness.unwrap_or_default();
|
||||
|
|
|
|||
|
|
@ -13,7 +13,6 @@ authors = ["Santiago Carmuega <santiago@carmuega.me>"]
|
|||
thiserror = "1.0.49"
|
||||
pallas-crypto = { version = "=0.20.0", path = "../pallas-crypto" }
|
||||
ed25519-bip32 = "0.4.1"
|
||||
rand = "0.8.5"
|
||||
bip39 = { version = "2.0.0", features = ["rand_core"] }
|
||||
cryptoxide = "0.4.4"
|
||||
bech32 = "0.9.1"
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
use bech32::{FromBase32, ToBase32};
|
||||
use bip39::rand_core::{CryptoRng, RngCore};
|
||||
use bip39::{Language, Mnemonic};
|
||||
use cryptoxide::{hmac::Hmac, pbkdf2::pbkdf2, sha2::Sha512};
|
||||
use ed25519_bip32::{self, XPrv, XPub, XPRV_SIZE};
|
||||
use pallas_crypto::key::ed25519::{self};
|
||||
use rand::{CryptoRng, RngCore};
|
||||
use thiserror::Error;
|
||||
|
||||
#[derive(Error, Debug)]
|
||||
|
|
@ -178,7 +178,7 @@ impl Bip32PublicKey {
|
|||
|
||||
#[cfg(test)]
|
||||
mod test {
|
||||
use rand::rngs::OsRng;
|
||||
use bip39::rand_core::OsRng;
|
||||
|
||||
use crate::{Bip32PrivateKey, Bip32PublicKey};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue