diff --git a/packages/xrpl/.eslintrc.js b/packages/xrpl/.eslintrc.js index f0264d8f..fb8aed6e 100644 --- a/packages/xrpl/.eslintrc.js +++ b/packages/xrpl/.eslintrc.js @@ -62,6 +62,7 @@ module.exports = { 'tsdoc/syntax': 'off', 'jsdoc/require-description-complete-sentence': 'off', + 'import/prefer-default-export': 'off', }, overrides: [ { diff --git a/packages/xrpl/src/Wallet/fundWallet.ts b/packages/xrpl/src/Wallet/fundWallet.ts index 13773d16..c75b607e 100644 --- a/packages/xrpl/src/Wallet/fundWallet.ts +++ b/packages/xrpl/src/Wallet/fundWallet.ts @@ -12,7 +12,7 @@ import { getDefaultFaucetPath, } from './defaultFaucets' -import Wallet from '.' +import { Wallet } from '.' // Interval to check an account balance const INTERVAL_SECONDS = 1 diff --git a/packages/xrpl/src/Wallet/index.ts b/packages/xrpl/src/Wallet/index.ts index d20afed0..7eb0baae 100644 --- a/packages/xrpl/src/Wallet/index.ts +++ b/packages/xrpl/src/Wallet/index.ts @@ -76,7 +76,7 @@ function hexFromBuffer(buffer: Buffer): string { * * @category Signing */ -class Wallet { +export class Wallet { public readonly publicKey: string public readonly privateKey: string public readonly classicAddress: string @@ -502,5 +502,3 @@ function removeTrailingZeros(tx: Transaction): void { tx.Amount.value = new BigNumber(tx.Amount.value).toString() } } - -export default Wallet diff --git a/packages/xrpl/src/Wallet/signer.ts b/packages/xrpl/src/Wallet/signer.ts index 366ee3dd..d09ec0de 100644 --- a/packages/xrpl/src/Wallet/signer.ts +++ b/packages/xrpl/src/Wallet/signer.ts @@ -13,7 +13,7 @@ import { ValidationError } from '../errors' import { Signer } from '../models/common' import { Transaction, validate } from '../models/transactions' -import Wallet from '.' +import { Wallet } from '.' /** * Takes several transactions with Signer fields (in object or blob form) and creates a diff --git a/packages/xrpl/src/client/BroadcastClient.ts b/packages/xrpl/src/client/BroadcastClient.ts index 87970569..11854c93 100644 --- a/packages/xrpl/src/client/BroadcastClient.ts +++ b/packages/xrpl/src/client/BroadcastClient.ts @@ -15,7 +15,7 @@ import { Client, ClientOptions } from '.' * * @category Clients */ -export default class BroadcastClient extends Client { +export class BroadcastClient extends Client { private readonly clients: Client[] /** diff --git a/packages/xrpl/src/index.ts b/packages/xrpl/src/index.ts index 39f84a77..c1f447cd 100644 --- a/packages/xrpl/src/index.ts +++ b/packages/xrpl/src/index.ts @@ -1,5 +1,5 @@ // Broadcast client is experimental -export { default as BroadcastClient } from './client/BroadcastClient' +export { BroadcastClient } from './client/BroadcastClient' export { Client, ClientOptions } from './client' @@ -9,7 +9,7 @@ export * from './utils' export * from './errors' -export { default as Wallet } from './Wallet' +export { Wallet } from './Wallet' export { keyToRFC1751Mnemonic, rfc1751MnemonicToKey } from './Wallet/rfc1751' diff --git a/packages/xrpl/src/sugar/utils.ts b/packages/xrpl/src/sugar/utils.ts index 2ad72598..39775d13 100644 --- a/packages/xrpl/src/sugar/utils.ts +++ b/packages/xrpl/src/sugar/utils.ts @@ -7,7 +7,6 @@ import { xAddressToClassicAddress, isValidXAddress } from 'ripple-address-codec' * @returns The account's classic address. * @throws Error if the X-Address has an associated tag. */ -// eslint-disable-next-line import/prefer-default-export -- okay for a utils file - there could be more exports later export function ensureClassicAddress(account: string): string { if (isValidXAddress(account)) { const { classicAddress, tag } = xAddressToClassicAddress(account) diff --git a/packages/xrpl/test/client/submit.test.ts b/packages/xrpl/test/client/submit.test.ts index 5673be83..ae29f307 100644 --- a/packages/xrpl/test/client/submit.test.ts +++ b/packages/xrpl/test/client/submit.test.ts @@ -4,7 +4,7 @@ import cloneDeep from 'lodash/cloneDeep' import { multisign, ValidationError } from '../../src' import { Transaction } from '../../src/models/transactions' -import Wallet from '../../src/Wallet' +import { Wallet } from '../../src/Wallet' import rippled from '../fixtures/rippled' import { setupClient, diff --git a/packages/xrpl/test/setupClient.ts b/packages/xrpl/test/setupClient.ts index 5cd9a0af..b1de67ff 100644 --- a/packages/xrpl/test/setupClient.ts +++ b/packages/xrpl/test/setupClient.ts @@ -1,6 +1,6 @@ import { Client } from '../src/client' // eslint-disable-next-line import/no-deprecated -- Will remove in 3.0.0 -import BroadcastClient from '../src/client/BroadcastClient' +import { BroadcastClient } from '../src/client/BroadcastClient' import createMockRippled, { type MockedWebSocketServer, diff --git a/packages/xrpl/test/wallet/index.test.ts b/packages/xrpl/test/wallet/index.test.ts index 05e089c2..f7497d55 100644 --- a/packages/xrpl/test/wallet/index.test.ts +++ b/packages/xrpl/test/wallet/index.test.ts @@ -3,7 +3,7 @@ import { decode } from 'ripple-binary-codec' import { NFTokenMint, Payment, Transaction } from '../../src' import ECDSA from '../../src/ECDSA' -import Wallet from '../../src/Wallet' +import { Wallet } from '../../src/Wallet' import requests from '../fixtures/requests' import responses from '../fixtures/responses' diff --git a/packages/xrpl/test/wallet/signer.test.ts b/packages/xrpl/test/wallet/signer.test.ts index 108c89e2..80cca976 100644 --- a/packages/xrpl/test/wallet/signer.test.ts +++ b/packages/xrpl/test/wallet/signer.test.ts @@ -2,7 +2,7 @@ import { assert } from 'chai' import { decode, encode } from 'ripple-binary-codec' import { Transaction, ValidationError } from '../../src' -import Wallet from '../../src/Wallet' +import { Wallet } from '../../src/Wallet' import { authorizeChannel, multisign,