Skip to content

Commit

Permalink
Merge pull request #2282 from dusk-network/fix-rusk-wallet
Browse files Browse the repository at this point in the history
rusk-wallet: fix compilation with memo updates
  • Loading branch information
Eduardo Leegwater Simões authored Sep 5, 2024
2 parents 134bf87 + c4dbb01 commit 73be96e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/ruskwallet_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ jobs:
with:
filters: |
run-ci:
- 'wallet-core/**'
- 'execution-core/**'
- 'rusk-wallet/**'
- '.github/workflows/ruskwallet_ci.yml'
fmt:
Expand Down
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 73be96e

Please sign in to comment.