Skip to content

Commit

Permalink
Revert
Browse files Browse the repository at this point in the history
  • Loading branch information
gRoussac committed Dec 13, 2024
1 parent d44ead3 commit 2f7de58
Show file tree
Hide file tree
Showing 9 changed files with 4,691 additions and 4,709 deletions.
780 changes: 390 additions & 390 deletions pkg-nodejs/casper_rust_wasm_sdk.d.ts

Large diffs are not rendered by default.

2,406 changes: 1,202 additions & 1,204 deletions pkg-nodejs/casper_rust_wasm_sdk.js

Large diffs are not rendered by default.

Binary file modified pkg-nodejs/casper_rust_wasm_sdk_bg.wasm
Binary file not shown.
976 changes: 488 additions & 488 deletions pkg-nodejs/casper_rust_wasm_sdk_bg.wasm.d.ts

Large diffs are not rendered by default.

1,834 changes: 917 additions & 917 deletions pkg/casper_rust_wasm_sdk.d.ts

Large diffs are not rendered by default.

2,406 changes: 1,202 additions & 1,204 deletions pkg/casper_rust_wasm_sdk.js

Large diffs are not rendered by default.

Binary file modified pkg/casper_rust_wasm_sdk_bg.wasm
Binary file not shown.
976 changes: 488 additions & 488 deletions pkg/casper_rust_wasm_sdk_bg.wasm.d.ts

Large diffs are not rendered by default.

22 changes: 4 additions & 18 deletions src/types/key.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ impl Key {
}

#[wasm_bindgen(js_name = "fromAccount")]
pub fn from_account_js_alias(key: AccountHash) -> Self {
pub fn from_account(key: AccountHash) -> Self {
Self(_Key::Account(key.into()))
}

Expand Down Expand Up @@ -119,10 +119,11 @@ impl Key {
}

#[wasm_bindgen(js_name = "toFormattedString")]
pub fn to_formatted_string_js_alias(&self) -> String {
pub fn to_formatted_string(&self) -> String {
_Key::to_formatted_string(self.0)
}

#[cfg(target_arch = "wasm32")]
#[wasm_bindgen(js_name = "fromFormattedString")]
pub fn from_formatted_str_js_alias(formatted_str: &str) -> Result<Key, JsError> {
Self::from_formatted_str(formatted_str)
Expand Down Expand Up @@ -167,7 +168,7 @@ impl Key {
}

#[wasm_bindgen(js_name = "intoURef")]
pub fn into_uref_js_alias(self) -> Option<URef> {
pub fn into_uref(self) -> Option<URef> {
match self.0 {
_Key::URef(uref) => Some(uref.into()),
_ => None,
Expand Down Expand Up @@ -201,21 +202,6 @@ impl Key {
error,
})
}

pub fn to_formatted_string(&self) -> String {
_Key::to_formatted_string(self.0)
}

pub fn from_account(key: AccountHash) -> Self {
Self(_Key::Account(key.into()))
}

pub fn into_uref(self) -> Option<URef> {
match self.0 {
_Key::URef(uref) => Some(uref.into()),
_ => None,
}
}
}

impl From<Key> for _Key {
Expand Down

0 comments on commit 2f7de58

Please sign in to comment.