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