Skip to content

Commit

Permalink
add missing optional chain parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
veralygit committed Oct 24, 2024
1 parent b89804f commit 2e00b50
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions packages/sdk/src/wallet/Ordit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import {
SigningMessageOptions,
tweakSigner
} from ".."
import { Network } from "../config/types"
import { Chain, Network } from "../config/types"
import { OrditSDKError } from "../utils/errors"

bitcoin.initEccLib(ecc)
Expand All @@ -47,9 +47,10 @@ export class Ordit {
network = "testnet",
type = "legacy",
account = 0,
addressIndex = 0
addressIndex = 0,
chain = "bitcoin"
}: WalletOptions) {
this.#network = network
this.#network = chain === "fractal-bitcoin" ? "mainnet" : network
const networkObj = getNetwork(network)
const format = addressNameToType[type]

Expand Down Expand Up @@ -293,6 +294,7 @@ export type WalletOptions = {
type?: AddressFormats
account?: number
addressIndex?: number
chain?: Chain
}

export type Address = ReturnType<typeof getAddressesFromPublicKey>[0]
Expand Down

0 comments on commit 2e00b50

Please sign in to comment.