diff --git a/packages/xrpl/src/Wallet/index.ts b/packages/xrpl/src/Wallet/index.ts index 415b8f7b12..6b1d01e361 100644 --- a/packages/xrpl/src/Wallet/index.ts +++ b/packages/xrpl/src/Wallet/index.ts @@ -298,7 +298,9 @@ export class Wallet { opts: { masterAddress?: string; algorithm?: ECDSA } = {}, ): Wallet { const { publicKey, privateKey } = deriveKeypair(seed, { - algorithm: opts.algorithm ?? DEFAULT_ALGORITHM, + // TODO: replace this line with algorithm: opts.algorithm ?? DEFAULT_ALGORITHM + // To actually enforce the ed25519 default in the next breaking version. + algorithm: opts.algorithm, }) return new Wallet(publicKey, privateKey, { seed, diff --git a/packages/xrpl/test/wallet/index.test.ts b/packages/xrpl/test/wallet/index.test.ts index 8ba3005e46..eeff4b6229 100644 --- a/packages/xrpl/test/wallet/index.test.ts +++ b/packages/xrpl/test/wallet/index.test.ts @@ -110,8 +110,8 @@ describe('Wallet', function () { it('derives a wallet using default algorithm', function () { const wallet = Wallet.fromSeed(knownSecret) - assert.equal(wallet.publicKey, publicKeyED25519) - assert.equal(wallet.privateKey, privateKeyED25519) + assert.equal(wallet.publicKey, publicKeySecp256k1) + assert.equal(wallet.privateKey, privateKeySecp256k1) }) it('derives a wallet using algorithm ecdsa-secp256k1', function () { @@ -216,8 +216,8 @@ describe('Wallet', function () { it('derives a wallet using default algorithm', function () { const wallet = Wallet.fromSecret(knownSecret) - assert.equal(wallet.publicKey, publicKeyED25519) - assert.equal(wallet.privateKey, privateKeyED25519) + assert.equal(wallet.publicKey, publicKeySecp256k1) + assert.equal(wallet.privateKey, privateKeySecp256k1) }) it('derives a wallet using algorithm ecdsa-secp256k1', function () {