From 360777e79b643da6d265e9b5e3fb6463abf6b6b4 Mon Sep 17 00:00:00 2001 From: Chris Duncan Date: Sat, 9 Aug 2025 19:19:56 -0700 Subject: [PATCH] Simplify account index swap. --- src/lib/wallet/wallet.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/lib/wallet/wallet.ts b/src/lib/wallet/wallet.ts index 4220301..bffd245 100644 --- a/src/lib/wallet/wallet.ts +++ b/src/lib/wallet/wallet.ts @@ -255,11 +255,7 @@ export class Wallet { * @returns {AccountList} Object with keys of account indexes and values of the corresponding Accounts */ async accounts (from: number = 0, to: number = from): Promise { - if (from > to) { - const swap = from - from = to - to = swap - } + if (from > to) [from, to] = [to, from] const output = new AccountList() const indexes: number[] = [] for (let i = from; i <= to; i++) { -- 2.47.3