diff --git a/packages/ord-connect/package.json b/packages/ord-connect/package.json index 8f990e01..b4180aba 100644 --- a/packages/ord-connect/package.json +++ b/packages/ord-connect/package.json @@ -47,7 +47,7 @@ }, "dependencies": { "@headlessui/react": "^1.7.17", - "@ordzaar/ordit-sdk": "1.1.0", + "@ordzaar/ordit-sdk": "1.2.0", "bitcoinjs-lib": "6.1.5", "boring-avatars": "^1.10.1" }, @@ -60,7 +60,7 @@ ] }, "peerDependencies": { - "@ordzaar/ordit-sdk": "1.1.0", + "@ordzaar/ordit-sdk": "1.2.0", "react": "^18.2.0", "react-dom": "^18.2.0" } diff --git a/packages/ord-connect/src/hooks/useBalance.tsx b/packages/ord-connect/src/hooks/useBalance.tsx index 93dc657a..f7270d53 100644 --- a/packages/ord-connect/src/hooks/useBalance.tsx +++ b/packages/ord-connect/src/hooks/useBalance.tsx @@ -1,6 +1,7 @@ import { useCallback, useState } from "react"; import { ADDRESS_FORMAT_TO_TYPE, + AddressType, getAddressesFromPublicKey, JsonRpcDatasource, } from "@ordzaar/ordit-sdk"; @@ -22,7 +23,10 @@ export function useBalance() { const { address } = getAddressesFromPublicKey( publicKey.payments, network, - ADDRESS_FORMAT_TO_TYPE[format.payments], + ADDRESS_FORMAT_TO_TYPE[format.payments] as Exclude< + AddressType, + "p2wsh" + >, )[0]; const datasource = new JsonRpcDatasource({ network }); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 5f7bb525..759e3fee 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -27,8 +27,8 @@ importers: specifier: ^1.7.17 version: 1.7.17(react-dom@18.2.0)(react@18.2.0) '@ordzaar/ordit-sdk': - specifier: 1.1.0 - version: 1.1.0 + specifier: 1.2.0 + version: 1.2.0 bitcoinjs-lib: specifier: 6.1.5 version: 6.1.5 @@ -595,8 +595,8 @@ packages: fastq: 1.16.0 dev: true - /@ordzaar/ordit-sdk@1.1.0: - resolution: {integrity: sha512-E9YyNwpH901etSPuR4oWaa1A/lWC3BpqegGuoIsDk89vyyQu9BfFE/ypyxQA78yXULEEdFCITpoON1LNtblwXw==} + /@ordzaar/ordit-sdk@1.2.0: + resolution: {integrity: sha512-QNbrSzR6BQIpuw3igwtgP9hMOtSe53/jBev0gbJ2r65vCBngjT78zSJ1G0xULFOgnlVv3lpxTar63nuuPE//nw==} dependencies: '@bitcoinerlab/secp256k1': 1.0.5 bignumber.js: 9.1.2 @@ -608,7 +608,7 @@ packages: buffer-reverse: 1.0.1 cross-fetch: 4.0.0 ecpair: 2.1.0 - ethers: 6.8.1 + ethers: 6.9.1 sats-connect: 1.1.2 transitivePeerDependencies: - bufferutil @@ -2683,8 +2683,8 @@ packages: engines: {node: '>=0.10.0'} dev: true - /ethers@6.8.1: - resolution: {integrity: sha512-iEKm6zox5h1lDn6scuRWdIdFJUCGg3+/aQWu0F4K0GVyEZiktFkqrJbRjTn1FlYEPz7RKA707D6g5Kdk6j7Ljg==} + /ethers@6.9.1: + resolution: {integrity: sha512-kuV8fGd4/8Gj7wkurbsuUsm1DCG6N5gKGYdw3fnWG/7QGknhy1xtHD7kbkCWQAcbAYmzLCLqCPedS3FYncFkKQ==} engines: {node: '>=14.0.0'} dependencies: '@adraffy/ens-normalize': 1.10.0