Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rusk-wallet: fix compilation with memo updates #2282

Merged
merged 2 commits into from
Sep 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading