diff --git a/packages/sdk/package.json b/packages/sdk/package.json index eff6ee1..b841827 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", "description": "Phala Phat Contract JS SDK", "homepage": "https://github.com/Phala-Network/js-sdk/tree/main/packages/sdk#readme", "repository": { 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"); }