diff --git a/examples/nextjs/CHANGELOG.md b/examples/nextjs/CHANGELOG.md index d2aad371..90ea365a 100644 --- a/examples/nextjs/CHANGELOG.md +++ b/examples/nextjs/CHANGELOG.md @@ -1,5 +1,14 @@ # @demo/wallet +## 0.0.10 + +### Patch Changes + +- Updated dependencies + [[`c399ff9`](https://github.com/bnb-chain/greenfield-js-sdk/commit/c399ff9f7722d8b237e88b7ece7c58a61b1efbc0), + [`b98cc0c`](https://github.com/bnb-chain/greenfield-js-sdk/commit/b98cc0ccbcf96e947ec56ea521eab63055177de5)]: + - @bnb-chain/greenfield-js-sdk@1.0.2 + ## 0.0.9 ### Patch Changes diff --git a/examples/nextjs/package.json b/examples/nextjs/package.json index 0cbf9ddb..ee2a929d 100644 --- a/examples/nextjs/package.json +++ b/examples/nextjs/package.json @@ -1,6 +1,6 @@ { "name": "@demo/wallet", - "version": "0.0.9", + "version": "0.0.10", "private": true, "scripts": { "dev": "cross-env NODE_ENV=development next dev", diff --git a/examples/nodejs/CHANGELOG.md b/examples/nodejs/CHANGELOG.md index 35a74c55..8d55486e 100644 --- a/examples/nodejs/CHANGELOG.md +++ b/examples/nodejs/CHANGELOG.md @@ -1,5 +1,14 @@ # @demo/nodejs +## 0.0.13 + +### Patch Changes + +- Updated dependencies + [[`c399ff9`](https://github.com/bnb-chain/greenfield-js-sdk/commit/c399ff9f7722d8b237e88b7ece7c58a61b1efbc0), + [`b98cc0c`](https://github.com/bnb-chain/greenfield-js-sdk/commit/b98cc0ccbcf96e947ec56ea521eab63055177de5)]: + - @bnb-chain/greenfield-js-sdk@1.0.2 + ## 0.0.12 ### Patch Changes diff --git a/examples/nodejs/package.json b/examples/nodejs/package.json index 3e581843..4b9476b0 100644 --- a/examples/nodejs/package.json +++ b/examples/nodejs/package.json @@ -1,12 +1,13 @@ { "name": "@demo/nodejs", - "version": "0.0.12", + "version": "0.0.13", "type": "commonjs", "private": true, "scripts": {}, "dependencies": { "@bnb-chain/greenfield-js-sdk": "workspace:*", - "@bnb-chain/greenfiled-file-handle": "workspace:*" + "@bnb-chain/greenfiled-file-handle": "workspace:*", + "mime-types": "^2.1.35" }, "devDependencies": { "cross-env": "^7.0.3" diff --git a/packages/js-sdk/CHANGELOG.md b/packages/js-sdk/CHANGELOG.md index e773392f..db54cafa 100644 --- a/packages/js-sdk/CHANGELOG.md +++ b/packages/js-sdk/CHANGELOG.md @@ -1,5 +1,20 @@ # @bnb-chain/greenfield-js-sdk +## 1.0.2 + +### Patch Changes + +- [#381](https://github.com/bnb-chain/greenfield-js-sdk/pull/381) + [`c399ff9`](https://github.com/bnb-chain/greenfield-js-sdk/commit/c399ff9f7722d8b237e88b7ece7c58a61b1efbc0) + Thanks [@aiden-cao](https://github.com/aiden-cao)! - fix: Replace legacy method, Some third-party + plug-ins (e.g. wallet guard) will automatically convert deprecated methods and are not compatible + with the return value of deprecated methods. + https://github.com/wallet-guard/wallet-guard-extension/blob/221ad3eb329ad7681b16a37c7ddfaf173dba6e7f/src/injected/injectWalletGuard.tsx#L49-L62 + +- [#384](https://github.com/bnb-chain/greenfield-js-sdk/pull/384) + [`b98cc0c`](https://github.com/bnb-chain/greenfield-js-sdk/commit/b98cc0ccbcf96e947ec56ea521eab63055177de5) + Thanks [@rrr523](https://github.com/rrr523)! - chore: Update deps + ## 1.0.1 ### Patch Changes diff --git a/packages/js-sdk/package.json b/packages/js-sdk/package.json index 16a41ab4..b4df512b 100644 --- a/packages/js-sdk/package.json +++ b/packages/js-sdk/package.json @@ -1,6 +1,6 @@ { "name": "@bnb-chain/greenfield-js-sdk", - "version": "1.0.1", + "version": "1.0.2", "description": "greenfield js chain and sp sdk", "main": "./dist/cjs/index.js", "module": "./dist/esm/index.js", diff --git a/packages/js-sdk/src/clients/spclient/sign.ts b/packages/js-sdk/src/clients/spclient/sign.ts index 6bc7439c..8bd19fe3 100644 --- a/packages/js-sdk/src/clients/spclient/sign.ts +++ b/packages/js-sdk/src/clients/spclient/sign.ts @@ -22,12 +22,10 @@ const signMessagePersonalAPI = async ( message: Uint8Array, address: string, ): Promise => { - return provider.send('personal_sign', [hexlify(message), address]).then( - (sign: string) => sign, - (err: Error) => { - throw err; - }, - ); + return provider.request({ + method: 'personal_sign', + params: [hexlify(message), address], + }); }; const generateSeed = async ( @@ -36,7 +34,7 @@ const generateSeed = async ( ) => { const signedBytes = typeof message === 'string' ? toUtf8Bytes(message) : arrayify(message); const res = (await signMessagePersonalAPI(provider, signedBytes, address)) as any; - const seed = arrayify(res?.result); + const seed = arrayify(res); return { seed }; };