Skip to content

Commit

Permalink
rusk-wallet: fix compilation with memo updates
Browse files Browse the repository at this point in the history
  • Loading branch information
Eduardo Leegwater Simões committed Sep 5, 2024
1 parent 998480a commit df4b374
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions rusk-wallet/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,9 @@ pub enum Error {
/// Prover errors from execution-core
#[error("Prover Error")]
ProverError(String),
/// Memo provided is too large
#[error("Memo too large {0}")]
MemoTooLarge(usize),
}

impl From<dusk_bytes::Error> for Error {
Expand Down Expand Up @@ -147,6 +150,7 @@ impl From<execution_core::Error> for Error {
Self::Bytes(dusk_bytes::Error::InvalidChar { ch, index })
}
Rkyv(_) => Self::Rkyv,
MemoTooLarge(m) => Self::MemoTooLarge(m),
}
}
}
Expand Down
6 changes: 3 additions & 3 deletions rusk-wallet/src/wallet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ use wallet_core::{
use execution_core::{
signatures::bls::{PublicKey as BlsPublicKey, SecretKey as BlsSecretKey},
transfer::{
contract_exec::{ContractCall, ContractExec},
data::{ContractCall, TransactionData},
Transaction,
},
};
Expand Down Expand Up @@ -401,7 +401,7 @@ impl<F: SecureWalletFile + Debug> Wallet<F> {
sender: &Address,
reciever: &Address,
deposit: Dusk,
exec: Option<impl Into<ContractExec>>,
data: Option<impl Into<TransactionData>>,
gas: Gas,
) -> Result<Transaction, Error> {
// make sure we own the sender address
Expand Down Expand Up @@ -445,7 +445,7 @@ impl<F: SecureWalletFile + Debug> Wallet<F> {
gas.limit,
gas.price,
chain_id,
exec,
data,
)?;

let tx = state.prove_and_propagate(tx);
Expand Down

0 comments on commit df4b374

Please sign in to comment.