From 7d9407b305354c7b6f860209874fd5fb1fddc73b Mon Sep 17 00:00:00 2001 From: KevinK <31565174+kevzzsk@users.noreply.github.com> Date: Wed, 8 Nov 2023 20:48:31 +0800 Subject: [PATCH] fix(sdk): renaming import to AddressUtils (#94) --- packages/sdk/src/wallet/Ordit.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/sdk/src/wallet/Ordit.ts b/packages/sdk/src/wallet/Ordit.ts index 41042205..974ae9a4 100644 --- a/packages/sdk/src/wallet/Ordit.ts +++ b/packages/sdk/src/wallet/Ordit.ts @@ -1,7 +1,7 @@ import * as ecc from "@bitcoinerlab/secp256k1" import BIP32Factory, { BIP32Interface } from "bip32" import { mnemonicToSeedSync } from "bip39" -import { Address as BIP22Address, Signer } from "bip322-js" +import { Address as AddressUtils, Signer } from "bip322-js" import * as bitcoin from "bitcoinjs-lib" import { isTaprootInput } from "bitcoinjs-lib/src/psbt/bip371" import { sign } from "bitcoinjs-message" @@ -234,7 +234,7 @@ export class Ordit { signMessage(message: string, type?: AddressFormats) { const addressType = type || this.selectedAddressType const node = this.allAddresses.find((wallet) => wallet.format === addressType) as Account - const signature = BIP22Address.isP2PKH(node.address!) + const signature = AddressUtils.isP2PKH(node.address!) ? sign(message, node.child.privateKey!) : Signer.sign(node.child.toWIF(), node.address!, message, getNetwork(this.#network))