From 07e3da3fe72cb37301b52c6171ef99bde03e56b6 Mon Sep 17 00:00:00 2001 From: Leechael Yim Date: Tue, 31 Jan 2023 04:50:18 +0800 Subject: [PATCH 1/3] fix: now all wallet extension support WrapBytes. --- packages/sdk/src/certificate.ts | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/packages/sdk/src/certificate.ts b/packages/sdk/src/certificate.ts index 4d69a52..881c362 100644 --- a/packages/sdk/src/certificate.ts +++ b/packages/sdk/src/certificate.ts @@ -115,21 +115,13 @@ export const signCertificate = async ( const getSignatureTypeFromAccount = (account: InjectedAccountWithMeta) => { const keypairType = account.type || "sr25519"; - // Polkadot JS signature use wrapBytes - const useWrapBytes = account.meta.source === "polkadot-js"; switch (keypairType) { case "sr25519": - return useWrapBytes - ? pruntimeRpc.SignatureType.Sr25519WrapBytes - : pruntimeRpc.SignatureType.Sr25519; + return pruntimeRpc.SignatureType.Sr25519WrapBytes; case "ed25519": - return useWrapBytes - ? pruntimeRpc.SignatureType.Ed25519WrapBytes - : pruntimeRpc.SignatureType.Ed25519; + return pruntimeRpc.SignatureType.Ed25519WrapBytes; case "ecdsa": - return useWrapBytes - ? pruntimeRpc.SignatureType.EcdsaWrapBytes - : pruntimeRpc.SignatureType.Ecdsa; + return pruntimeRpc.SignatureType.EcdsaWrapBytes; default: throw new Error("Unsupported keypair type"); } From a289710e7b9234a080c359459d5626c2e4e97a15 Mon Sep 17 00:00:00 2001 From: Leechael Yim Date: Tue, 31 Jan 2023 04:59:35 +0800 Subject: [PATCH 2/3] bump version --- packages/sdk/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/sdk/package.json b/packages/sdk/package.json index eff6ee1..0792a85 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -1,6 +1,6 @@ { "name": "@phala/sdk", - "version": "0.3.5", + "version": "0.3.6-beta.0", "description": "Phala Phat Contract JS SDK", "homepage": "https://github.com/Phala-Network/js-sdk/tree/main/packages/sdk#readme", "repository": { From e4b8742494b1687c4d245d5e2d46b6ae7141b04e Mon Sep 17 00:00:00 2001 From: Leechael Yim Date: Tue, 31 Jan 2023 05:16:07 +0800 Subject: [PATCH 3/3] bump version --- packages/sdk/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/sdk/package.json b/packages/sdk/package.json index 0792a85..b841827 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -1,6 +1,6 @@ { "name": "@phala/sdk", - "version": "0.3.6-beta.0", + "version": "0.3.6", "description": "Phala Phat Contract JS SDK", "homepage": "https://github.com/Phala-Network/js-sdk/tree/main/packages/sdk#readme", "repository": {