Skip to content

Commit

Permalink
Merge pull request #33 from leapwallet/main
Browse files Browse the repository at this point in the history
Fixed sign amino issue
  • Loading branch information
leapsamvel committed Aug 27, 2023
2 parents 7025c53 + 58dd21e commit 80925c0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion packages/cosmos-snap-provider/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@leapwallet/cosmos-snap-provider",
"version": "0.0.10",
"version": "0.1.12-beta.1",
"repository": {
"url": "[email protected]:leapwallet/cosmos-metamask-snap.git"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/snap/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@leapwallet/metamask-cosmos-snap",
"version": "0.1.11",
"version": "0.1.12-beta.1",
"description": "Leapwallet cosmos snap for metamask",
"repository": {
"type": "git",
Expand Down
8 changes: 4 additions & 4 deletions packages/snap/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,13 +99,13 @@ export const onRpcRequest: OnRpcRequestHandler = async ({

const { signerAddress, signDoc } = params;

if (!params.chainId || signDoc.chain_id || signDoc.chainId) {
const receivedChainId =
params.chainId || signDoc.chain_id || signDoc.chainId || '';

if (!receivedChainId) {
throw new Error('ChainId is mandatory params');
}

const receivedChainId =
params.chainId ?? signDoc.chain_id ?? signDoc.chainId;

if (!params.isADR36) {
await validateChainId(receivedChainId);
}
Expand Down

0 comments on commit 80925c0

Please sign in to comment.