Skip to content

Commit

Permalink
Fix destroyClient is not a function in Wasm (#899)
Browse files Browse the repository at this point in the history
* fix `destroyClient` in WASM

* changelog + version

* Update bindings/wasm/CHANGELOG.md

Co-authored-by: Thibault Martinez <[email protected]>

* fix version, changelog

---------

Co-authored-by: Thibault Martinez <[email protected]>
  • Loading branch information
abdulmth and thibault-martinez authored Jul 25, 2023
1 parent cc28bfd commit aca1b55
Show file tree
Hide file tree
Showing 5 changed files with 3,411 additions and 3,389 deletions.
6 changes: 6 additions & 0 deletions bindings/wasm/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Security -->

## 1.0.1 - 2023-07-25

### Fixed

- Runtime error when importing from `sdk-wasm` due to `destroyClient` not being exported;

## 1.0.0 - 2023-07-24

Same changes as https://github.com/iotaledger/iota-sdk/blob/develop/bindings/nodejs/CHANGELOG.md.
Expand Down
4 changes: 2 additions & 2 deletions bindings/wasm/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion bindings/wasm/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@iota/sdk-wasm",
"version": "1.0.0",
"version": "1.0.1",
"description": "WebAssembly bindings for the IOTA SDK library",
"repository": {
"type": "git",
Expand Down
6 changes: 6 additions & 0 deletions bindings/wasm/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@ pub fn create_client(clientOptions: String) -> Result<ClientMethodHandler, JsVal
Ok(ClientMethodHandler { client })
}

/// Necessary for compatibility with the node.js bindings.
#[wasm_bindgen(js_name = destroyClient)]
pub async fn destroy_client(_client_method_handler: &ClientMethodHandler) -> Result<(), JsValue> {
Ok(())
}

/// Handles a method, returns the response as a JSON-encoded string.
///
/// Returns an error if the response itself is an error or panic.
Expand Down
Loading

0 comments on commit aca1b55

Please sign in to comment.