diff --git a/package.json b/package.json index 2d86631514..8b6ba09c01 100644 --- a/package.json +++ b/package.json @@ -270,7 +270,7 @@ "@leather.io/eslint-config": "0.7.0", "@leather.io/panda-preset": "0.5.2", "@leather.io/prettier-config": "0.6.0", - "@leather.io/rpc": "2.3.0", + "@leather.io/rpc": "2.4.0", "@ls-lint/ls-lint": "2.2.3", "@mdx-js/loader": "3.0.0", "@pandacss/dev": "0.46.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 3d53aa4736..6b8e4bbf75 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -415,8 +415,8 @@ importers: specifier: 0.6.0 version: 0.6.0(@vue/compiler-sfc@3.5.13) '@leather.io/rpc': - specifier: 2.3.0 - version: link:../mono/packages/rpc + specifier: 2.4.0 + version: 2.4.0(encoding@0.1.13) '@ls-lint/ls-lint': specifier: 2.2.3 version: 2.2.3 @@ -582,9 +582,6 @@ importers: chromatic: specifier: 11.4.1 version: 11.4.1 - chrome-types: - specifier: ^0.1.325 - version: 0.1.325 chrome-webstore-upload-cli: specifier: 2.2.2 version: 2.2.2 @@ -3311,6 +3308,9 @@ packages: '@leather.io/models@0.22.0': resolution: {integrity: sha512-MmFmWdKN3T+L9euo+rq8JCr5Ku0mNulzVa0mYqXclB9vLa4NyhUsGHA3lWz8e05cMW9CsrPNg+eWpVg6AKTkeQ==} + '@leather.io/models@0.24.1': + resolution: {integrity: sha512-BRjiX7N/LUlg5MMe3r5mkjUGLGtGRSpd21LPgo0lhUUSO1cBMAdp7rLACGM9LFPw+/dnUw1yMpT2hURC3pe3Gg==} + '@leather.io/panda-preset@0.5.2': resolution: {integrity: sha512-JxPGX7hEUKWLp4gYc2S5irK6QXVMFEGn2F7bXEv2cr8324DYa07i5iUF6/UVeRhrzVivcXEdd/6u0wlKc39Rcw==} @@ -3331,6 +3331,9 @@ packages: '@leather.io/rpc@2.1.20': resolution: {integrity: sha512-BE56W5yzdOPdVWHo2G+ZrXsEt3Jki47/noMxy+9On0sNW5B90M+pULm65szp5/vzqJuY7xIrQJ1AOyG22cd82g==} + '@leather.io/rpc@2.4.0': + resolution: {integrity: sha512-S9PYtyOnZ9LJL8ZYsEPHUWmVkVL/E7oAfNLunFY7zVI0tJUl45OXJVCOjYRRKDKOqdx2pRpdqzeUSxRZvJdyVA==} + '@leather.io/stacks@1.3.5': resolution: {integrity: sha512-yqOX6CTcg0Shj3A5ymYtho054PJ2xU+HlyRfwXca8yJ1U2chMSq7jTinJktgI+1liTHsqmtRnrgmufxWY41J7A==} @@ -7947,9 +7950,6 @@ packages: resolution: {integrity: sha512-rNjApaLzuwaOTjCiT8lSDdGN1APCiqkChLMJxJPWLunPAt5fy8xgU9/jNOchV84wfIxrA0lRQB7oCT8jrn/wrQ==} engines: {node: '>=6.0'} - chrome-types@0.1.325: - resolution: {integrity: sha512-ZBYwAoUa/piEK3RSFuN21PP0gXmtlkTfaq1UdowkRQTmoNT4w31MbmwckVYnyrUV36YCGAtpLFqVphIQtBqYFQ==} - chrome-webstore-upload-cli@2.2.2: resolution: {integrity: sha512-Y6q5gZ3xp+b9rPgw0SNmW7tOgx0qhHpz2NloaoDe8/f45GiqZiH3gAhyYeekY75RcwG3LT1wNmbjMdSKf7n8fg==} engines: {node: ^14.13.1 || >=16.0.0} @@ -19140,6 +19140,12 @@ snapshots: bignumber.js: 9.1.2 zod: 3.23.8 + '@leather.io/models@0.24.1': + dependencies: + '@stacks/stacks-blockchain-api-types': 7.8.2 + bignumber.js: 9.1.2 + zod: 3.23.8 + '@leather.io/panda-preset@0.5.2(jsdom@22.1.0)(typescript@5.4.5)': dependencies: '@pandacss/dev': 0.46.1(jsdom@22.1.0)(typescript@5.4.5) @@ -19203,6 +19209,14 @@ snapshots: '@leather.io/models': 0.22.0 zod: 3.23.8 + '@leather.io/rpc@2.4.0(encoding@0.1.13)': + dependencies: + '@leather.io/models': 0.24.1 + '@stacks/network': 6.13.0(encoding@0.1.13) + zod: 3.23.8 + transitivePeerDependencies: + - encoding + '@leather.io/stacks@1.3.5(encoding@0.1.13)': dependencies: '@leather.io/crypto': 1.6.12 @@ -25856,8 +25870,6 @@ snapshots: chrome-trace-event@1.0.4: {} - chrome-types@0.1.325: {} - chrome-webstore-upload-cli@2.2.2: dependencies: chrome-webstore-upload: 1.0.0 diff --git a/src/inpage/inpage.ts b/src/inpage/inpage.ts index 4429853069..9df49765e3 100644 --- a/src/inpage/inpage.ts +++ b/src/inpage/inpage.ts @@ -243,12 +243,12 @@ const provider: LeatherProviderOverrides = { }; }, - request( - method: T, + request( + method: WalletMethodNames, params?: RpcParameter - ): Promise { + ): Promise { const id: string = crypto.randomUUID(); - const rpcRequest = { + const rpcRequest: RpcRequest = { jsonrpc: '2.0', id, method, diff --git a/src/shared/rpc/methods/send-transfer.ts b/src/shared/rpc/methods/send-transfer.ts index ee6e48b72f..cdc572a10a 100644 --- a/src/shared/rpc/methods/send-transfer.ts +++ b/src/shared/rpc/methods/send-transfer.ts @@ -1,7 +1,7 @@ import { z } from 'zod'; import { type BitcoinNetworkModes, type DefaultNetworkConfigurations } from '@leather.io/models'; -import type { RpcSendTransferParamsLegacy, SendTransferRequestParams } from '@leather.io/rpc'; +import type { RpcSendTransferParamsLegacy } from '@leather.io/rpc'; import { uniqueArray } from '@leather.io/utils'; import { FormErrorMessages } from '@shared/error-messages';