Skip to content

Commit

Permalink
test-wallet: Adapt to new wallet-core
Browse files Browse the repository at this point in the history
Co-authored-by: Daksh <[email protected]>
  • Loading branch information
Daksh14 and Daksh14 committed Sep 10, 2024
1 parent 4cd7860 commit 679f47c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
5 changes: 2 additions & 3 deletions rusk-wallet/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,8 @@ use execution_core::{
signatures::bls::PublicKey as AccountPublicKey,
stake::StakeData,
transfer::phoenix::{
ArchivedNoteLeaf, Note, NoteLeaf, NoteOpening,
PublicKey as PhoenixPublicKey, SecretKey as PhoenixSecretKey,
ViewKey as PhoenixViewKey,
ArchivedNoteLeaf, Note, NoteOpening, PublicKey as PhoenixPublicKey,
SecretKey as PhoenixSecretKey, ViewKey as PhoenixViewKey,
},
BlsScalar,
};
Expand Down
17 changes: 9 additions & 8 deletions rusk-wallet/src/wallet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ use wallet_core::{

use execution_core::{
signatures::bls::{PublicKey as BlsPublicKey, SecretKey as BlsSecretKey},
transfer::{data::TransactionData, Transaction},
transfer::{data::ContractCall, data::TransactionData, Transaction},
};

use zeroize::Zeroize;
Expand Down Expand Up @@ -539,7 +539,7 @@ impl<F: SecureWalletFile + Debug> Wallet<F> {
gas.limit,
gas.price,
chain_id,
data,
Some(data),
&Prover,
)?;

Expand Down Expand Up @@ -730,7 +730,6 @@ impl<F: SecureWalletFile + Debug> Wallet<F> {
}

let state = self.state()?;

let amt = *amt;
let sender_index = addr.index()?;
let mut stake_sk = self.bls_secret_key(sender_index);
Expand All @@ -741,13 +740,14 @@ impl<F: SecureWalletFile + Debug> Wallet<F> {
let nonce = state.fetch_stake(&pk)?.map(|s| s.nonce).unwrap_or(0);

let stake = moonlight_stake(
&stake_sk,
&stake_sk,
amt,
chain_id,
nonce,
account.nonce,
gas.limit,
gas.price,
account.nonce,
nonce,
chain_id,
)?;

stake_sk.zeroize();
Expand Down Expand Up @@ -842,11 +842,12 @@ impl<F: SecureWalletFile + Debug> Wallet<F> {
let unstake = moonlight_unstake(
&mut rng,
&stake_sk,
&stake_sk,
unstake_value,
chain_id,
account.nonce + 1,
gas.price,
gas.limit,
account.nonce + 1,
chain_id,
)?;

stake_sk.zeroize();
Expand Down

0 comments on commit 679f47c

Please sign in to comment.