Remove deprecated deriveAddress from Client (#1614)

* Removing deriveAddress and X from client

* Remove deriveAddress from derive.ts

* Remove linting exception for function lines
This commit is contained in:
Jackson Mills
2021-09-13 13:44:21 -07:00
committed by Mayukha Vadari
parent 29c0b84ad5
commit 1037e0da88
4 changed files with 5 additions and 12 deletions

View File

@@ -109,7 +109,6 @@ import {
import { BaseRequest, BaseResponse } from '../models/methods/baseMethod'
import combine from '../transaction/combine'
import { sign } from '../transaction/sign'
import { deriveAddress, deriveXAddress } from '../utils/derive'
import generateFaucetWallet from '../wallet/generateFaucetWallet'
import {
@@ -556,11 +555,6 @@ class Client extends EventEmitter {
public errors = errors
public static deriveXAddress = deriveXAddress
// Client.deriveClassicAddress (static) is a new name for client.deriveAddress
public static deriveClassicAddress = deriveAddress
public static formatBidsAndAsks = formatBidsAndAsks
/**

View File

@@ -18,4 +18,4 @@ function deriveXAddress(options: DeriveOptions): string {
return classicAddressToXAddress(classicAddress, options.tag, options.test)
}
export { deriveKeypair, deriveAddress, deriveXAddress }
export { deriveKeypair, deriveXAddress }

View File

@@ -3,7 +3,7 @@ import { xAddressToClassicAddress } from 'ripple-address-codec'
import { ValidationError } from '../common/errors'
import { RippledAmount } from '../common/types/objects'
import { deriveKeypair, deriveAddress, deriveXAddress } from './derive'
import { deriveKeypair, deriveXAddress } from './derive'
import { generateXAddress } from './generateAddress'
import {
computeSignedTransactionHash,
@@ -125,7 +125,6 @@ export {
computePaymentChannelHash,
generateXAddress,
deriveKeypair,
deriveAddress,
deriveXAddress,
signPaymentChannelClaim,
verifyPaymentChannelClaim,

View File

@@ -1,11 +1,11 @@
import { assert } from 'chai'
import { Client } from '../../src'
import { deriveXAddress } from 'xrpl-local'
describe('client.deriveXAddress', function () {
it('returns address for public key', function () {
assert.equal(
Client.deriveXAddress({
deriveXAddress({
publicKey:
'035332FBA71D705BD5D97014A833BE2BBB25BEFCD3506198E14AFEA241B98C2D06',
tag: false,
@@ -14,7 +14,7 @@ describe('client.deriveXAddress', function () {
'XVZVpQj8YSVpNyiwXYSqvQoQqgBttTxAZwMcuJd4xteQHyt',
)
assert.equal(
Client.deriveXAddress({
deriveXAddress({
publicKey:
'035332FBA71D705BD5D97014A833BE2BBB25BEFCD3506198E14AFEA241B98C2D06',
tag: false,