From 316432e0ac5e2ab57c560ee5f99f28e5457198f8 Mon Sep 17 00:00:00 2001 From: SamvelRaja Sakthivel Date: Sun, 27 Aug 2023 11:28:07 +0530 Subject: [PATCH 1/2] Bumped version --- packages/cosmos-snap-provider/package.json | 2 +- packages/snap/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/cosmos-snap-provider/package.json b/packages/cosmos-snap-provider/package.json index 9564fb2..2241ed1 100644 --- a/packages/cosmos-snap-provider/package.json +++ b/packages/cosmos-snap-provider/package.json @@ -1,6 +1,6 @@ { "name": "@leapwallet/cosmos-snap-provider", - "version": "0.1.12-beta.1", + "version": "0.1.12", "repository": { "url": "git@github.com:leapwallet/cosmos-metamask-snap.git" }, diff --git a/packages/snap/package.json b/packages/snap/package.json index 396f2cc..7e9f913 100644 --- a/packages/snap/package.json +++ b/packages/snap/package.json @@ -1,6 +1,6 @@ { "name": "@leapwallet/metamask-cosmos-snap", - "version": "0.1.12-beta.1", + "version": "0.1.12", "description": "Leapwallet cosmos snap for metamask", "repository": { "type": "git", From 5c95264c5d68d8b974d3166f29033310f9082565 Mon Sep 17 00:00:00 2001 From: SamvelRaja Sakthivel Date: Sun, 27 Aug 2023 11:47:30 +0530 Subject: [PATCH 2/2] Fixed sign direct issue --- packages/cosmos-snap-provider/package.json | 2 +- packages/cosmos-snap-provider/src/snap.ts | 14 +++----------- packages/snap/package.json | 2 +- 3 files changed, 5 insertions(+), 13 deletions(-) diff --git a/packages/cosmos-snap-provider/package.json b/packages/cosmos-snap-provider/package.json index 2241ed1..2da1072 100644 --- a/packages/cosmos-snap-provider/package.json +++ b/packages/cosmos-snap-provider/package.json @@ -1,6 +1,6 @@ { "name": "@leapwallet/cosmos-snap-provider", - "version": "0.1.12", + "version": "0.1.13", "repository": { "url": "git@github.com:leapwallet/cosmos-metamask-snap.git" }, diff --git a/packages/cosmos-snap-provider/src/snap.ts b/packages/cosmos-snap-provider/src/snap.ts index f18c26e..b45e768 100644 --- a/packages/cosmos-snap-provider/src/snap.ts +++ b/packages/cosmos-snap-provider/src/snap.ts @@ -78,19 +78,11 @@ export const requestSignature = async ( }); const { accountNumber } = signDoc; - if ( - !accountNumber || - !accountNumber.low || - !accountNumber.unsigned || - !accountNumber.high - ) { - throw new Error('Invalid account Number, It should be a long format'); - } const modifiedAccountNumber = new Long( - accountNumber.low, - accountNumber.high, - accountNumber.unsigned, + accountNumber?.low || 0, + accountNumber?.high, + accountNumber?.unsigned, ); const modifiedSignature = { diff --git a/packages/snap/package.json b/packages/snap/package.json index 7e9f913..b7ecfa2 100644 --- a/packages/snap/package.json +++ b/packages/snap/package.json @@ -1,6 +1,6 @@ { "name": "@leapwallet/metamask-cosmos-snap", - "version": "0.1.12", + "version": "0.1.13", "description": "Leapwallet cosmos snap for metamask", "repository": { "type": "git",