Skip to content
This repository has been archived by the owner on Aug 20, 2024. It is now read-only.

Commit

Permalink
refactor: Remove unneeded argument
Browse files Browse the repository at this point in the history
  • Loading branch information
Erb3 committed Jun 6, 2023
1 parent c255a95 commit edaab8d
Showing 1 changed file with 3 additions and 16 deletions.
19 changes: 3 additions & 16 deletions src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ async function transfer(
kws: kwsClient,
to: string,
amount: number,
from: string,
format: KristWalletFormatName | undefined
from: string
) {
if (!amount) return;
logger.info(`Sending krist to ${to} worth ${amount}`);
Expand Down Expand Up @@ -71,24 +70,12 @@ async function main() {
const split = splits[tx.to];

if (typeof split.outputs === "string") {
await transfer(
kristWS,
split.outputs,
tx.value,
split.privatekey,
split.walletFormat
);
await transfer(kristWS, split.outputs, tx.value, split.privatekey);
} else {
const toTransfer = calculateOutputs(split.outputs, tx.value);
Object.keys(toTransfer).forEach(async (address) => {
const value = toTransfer[address];
await transfer(
kristWS,
address,
value,
split.privatekey,
split.walletFormat
);
await transfer(kristWS, address, value, split.privatekey);
});
}
});
Expand Down

0 comments on commit edaab8d

Please sign in to comment.