Skip to content

Commit 53e7cff

Browse files
committed
Merge branch 'fixXrplImports' of https://github.com/kajoseph/bitcore
2 parents ce41e87 + 604f800 commit 53e7cff

32 files changed

Lines changed: 148 additions & 170 deletions

File tree

packages/bitcore-cli/src/cli-commands.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { type ICliOptions } from '../types/cli';
22
import { type IWallet } from '../types/wallet';
33
import { Utils } from './utils';
44

5-
export function getCommands(args: { wallet: IWallet, opts?: ICliOptions }) {
5+
export function getCommands(args: { wallet: IWallet; opts?: ICliOptions }) {
66
const { wallet } = args;
77

88
const COMMANDS = {

packages/bitcore-cli/src/commands/addresses.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export function command(args: CommonArgs) {
1919
return opts;
2020
}
2121

22-
export async function getAddresses(args: CommonArgs<{ pageSize?: number; page?: number; }>) {
22+
export async function getAddresses(args: CommonArgs<{ pageSize?: number; page?: number }>) {
2323
const { wallet, opts } = args;
2424
if (opts.command) {
2525
Object.assign(opts, command(args));

packages/bitcore-cli/src/commands/derive.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export function command(args: CommonArgs) {
2121
return opts;
2222
}
2323

24-
export async function deriveKey(args: CommonArgs<{ path?: string; }>) {
24+
export async function deriveKey(args: CommonArgs<{ path?: string }>) {
2525
const { wallet, opts } = args;
2626
if (opts.command) {
2727
Object.assign(opts, command(args));

packages/bitcore-cli/src/commands/join/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { joinThresholdSigWallet } from './joinThresholdSig';
77
import type { CommonArgs } from '../../../types/cli';
88

99

10-
export async function joinWallet(args: CommonArgs<{ mnemonic?: string; }>) {
10+
export async function joinWallet(args: CommonArgs<{ mnemonic?: string }>) {
1111
const { wallet, opts } = args;
1212

1313
const chain = await getChain();

packages/bitcore-cli/src/commands/join/joinMultiSig.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { getCopayerName, getPassword } from '../../prompts';
44
import { Utils } from '../../utils';
55
import type { CommonArgs } from '../../../types/cli';
66

7-
export async function joinMultiSigWallet(args: CommonArgs<{ mnemonic?: string; }>) {
7+
export async function joinMultiSigWallet(args: CommonArgs<{ mnemonic?: string }>) {
88
const { wallet, opts } = args;
99
const { verbose, mnemonic } = opts;
1010

packages/bitcore-cli/src/commands/join/joinThresholdSig.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { Utils } from '../../utils';
88
import type { CommonArgs } from '../../../types/cli';
99

1010
export async function joinThresholdSigWallet(
11-
args: CommonArgs<{ mnemonic?: string; }> & { chain: string; }
11+
args: CommonArgs<{ mnemonic?: string }> & { chain: string }
1212
) {
1313
const { wallet, chain, opts } = args;
1414
const { verbose, mnemonic } = opts;

packages/bitcore-cli/src/prompts.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ export async function getCopayerName() {
153153
return copayerName as string;
154154
};
155155

156-
export async function getAddressType(args: { chain: string; network?: Network; isMultiSig?: boolean; isTss?: boolean; }) {
156+
export async function getAddressType(args: { chain: string; network?: Network; isMultiSig?: boolean; isTss?: boolean }) {
157157
const { chain, network, isMultiSig, isTss } = args;
158158
let addressTypes = Constants.ADDRESS_TYPE[chain.toUpperCase()];
159159
if (!addressTypes) {

packages/bitcore-cli/src/utils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,12 +137,12 @@ export class Utils {
137137
}
138138

139139
static async paginate(
140-
fn: (page: number, action?: string) => Promise<{ result?: any[], extraChoices?: prompt.Option<string>[] }>,
140+
fn: (page: number, action?: string) => Promise<{ result?: any[]; extraChoices?: prompt.Option<string>[] }>,
141141
opts?: {
142142
pageSize?: number;
143143
initialPage?: number | string; // Initial page, default is 1
144144
/** Only applies if there are no extraChoices */
145-
exitOn1Page?: boolean
145+
exitOn1Page?: boolean;
146146
}
147147
) {
148148
const { pageSize = 10, exitOn1Page = true, initialPage } = opts || {};

packages/bitcore-cli/src/wallet.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ export class Wallet implements IWallet {
9494
async getClient(args: {
9595
mustBeNew?: boolean;
9696
mustExist?: boolean;
97-
doNotComplete?: boolean
97+
doNotComplete?: boolean;
9898
}): Promise<ClientType> {
9999
const { mustBeNew, mustExist, doNotComplete } = args;
100100

@@ -176,7 +176,7 @@ export class Wallet implements IWallet {
176176
return { key, creds: this.client.toObj() };
177177
}
178178

179-
async register(args: { copayerName: string; }) {
179+
async register(args: { copayerName: string }) {
180180
if (!this.client) {
181181
await this.getClient({ mustExist: true });
182182
}
@@ -185,7 +185,7 @@ export class Wallet implements IWallet {
185185
return secret as string | undefined;
186186
}
187187

188-
async load(opts?: { doNotComplete?: boolean; allowCache?: boolean; }) {
188+
async load(opts?: { doNotComplete?: boolean; allowCache?: boolean }) {
189189
const { doNotComplete, allowCache } = opts || {};
190190

191191
let walletData: WalletData | EncryptionTypes.IEncrypted = allowCache ? this.#walletData : null;
@@ -245,7 +245,7 @@ export class Wallet implements IWallet {
245245
return key;
246246
};
247247

248-
async save(opts?: { encryptAll?: boolean; }) {
248+
async save(opts?: { encryptAll?: boolean }) {
249249
const { encryptAll } = opts || {};
250250
try {
251251
if (!this.#walletData) {

packages/bitcore-cli/types/create.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ export interface CreateWalletArgs {
66
verbose: boolean;
77
mnemonic?: string;
88
isMultiParty?: boolean;
9-
}
9+
};
1010
}

0 commit comments

Comments
 (0)