From 8d8b54d0ca892e4dfa199f1f5db221b8333e227f Mon Sep 17 00:00:00 2001 From: SamvelRaja Sakthivel Date: Sat, 26 Aug 2023 21:01:13 +0530 Subject: [PATCH 1/2] Fixed ts error --- packages/cosmos-snap-provider/package.json | 2 +- packages/snap/src/index.ts | 13 ++++++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/packages/cosmos-snap-provider/package.json b/packages/cosmos-snap-provider/package.json index 6e8778b..044672b 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.0.7", + "version": "0.0.8", "repository": { "url": "git@github.com:leapwallet/cosmos-metamask-snap.git" }, diff --git a/packages/snap/src/index.ts b/packages/snap/src/index.ts index fd54748..23d08bc 100644 --- a/packages/snap/src/index.ts +++ b/packages/snap/src/index.ts @@ -1,4 +1,4 @@ -import { StdSignDoc } from '@cosmjs/amino'; +import { AminoMsg, StdFee } from '@cosmjs/amino'; import { OnRpcRequestHandler } from '@metamask/snaps-types'; import { panel } from '@metamask/snaps-ui'; import { SignDoc } from 'cosmjs-types/cosmos/tx/v1beta1/tx'; @@ -22,6 +22,17 @@ export type RequestParams = { readonly chainId?: string; }; +export interface StdSignDoc { + readonly chain_id?: string; + readonly chainId?: string; + readonly account_number: string; + readonly accountNumber?: string; + readonly sequence: string; + readonly fee: StdFee; + readonly msgs: readonly AminoMsg[]; + readonly memo: string; +} + /** * Handle incoming JSON-RPC requests, sent through `wallet_invokeSnap`. * From b69977431f931119be60af61af46986ce7690877 Mon Sep 17 00:00:00 2001 From: SamvelRaja Sakthivel Date: Sat, 26 Aug 2023 21:02:42 +0530 Subject: [PATCH 2/2] Fixed lint issues --- packages/snap/src/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/snap/src/index.ts b/packages/snap/src/index.ts index 23d08bc..5c1514c 100644 --- a/packages/snap/src/index.ts +++ b/packages/snap/src/index.ts @@ -22,7 +22,7 @@ export type RequestParams = { readonly chainId?: string; }; -export interface StdSignDoc { +export type StdSignDoc = { readonly chain_id?: string; readonly chainId?: string; readonly account_number: string; @@ -31,7 +31,7 @@ export interface StdSignDoc { readonly fee: StdFee; readonly msgs: readonly AminoMsg[]; readonly memo: string; -} +}; /** * Handle incoming JSON-RPC requests, sent through `wallet_invokeSnap`.