Skip to content

Commit

Permalink
chore(wasm-dpp): fix nonce method naming in credit withdrawals
Browse files Browse the repository at this point in the history
  • Loading branch information
pshenmic committed Dec 18, 2024
1 parent dbbac77 commit 711463a
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -109,14 +109,14 @@ impl IdentityCreditTransferTransitionWasm {
self.0.set_user_fee_increase(user_fee_increase);
}

#[wasm_bindgen(js_name=getIdentityContractNonce)]
pub fn get_identity_nonce(&self) -> u64 {
#[wasm_bindgen(js_name=getNonce)]
pub fn get_nonce(&self) -> u64 {
self.0.nonce()
}

#[wasm_bindgen(js_name=setIdentityContractNonce)]
pub fn set_identity_contract_nonce(&mut self, identity_nonce: u64) -> () {
self.0.set_nonce(identity_nonce)
#[wasm_bindgen(js_name=setNonce)]
pub fn set_nonce(&mut self, nonce: u64) -> () {

Check warning on line 118 in packages/wasm-dpp/src/identity/state_transition/identity_credit_transfer_transition/transition.rs

View workflow job for this annotation

GitHub Actions / Rust packages (wasm-dpp) / Linting

unneeded unit return type

warning: unneeded unit return type --> packages/wasm-dpp/src/identity/state_transition/identity_credit_transfer_transition/transition.rs:118:44 | 118 | pub fn set_nonce(&mut self, nonce: u64) -> () { | ^^^^^^ help: remove the `-> ()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit
self.0.set_nonce(nonce)
}

#[wasm_bindgen(js_name=toObject)]
Expand Down

0 comments on commit 711463a

Please sign in to comment.