Skip to content

Commit

Permalink
npm run format
Browse files Browse the repository at this point in the history
  • Loading branch information
callebtc committed Sep 19, 2023
1 parent d3c2e90 commit 9e02ed0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 15 deletions.
2 changes: 1 addition & 1 deletion src/CashuMint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class CashuMint {
/**
* @param _mintUrl requires mint URL to create this object
*/
constructor(private _mintUrl: string) { }
constructor(private _mintUrl: string) {}

get mintUrl() {
return this._mintUrl;
Expand Down
24 changes: 10 additions & 14 deletions src/CashuWallet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -179,17 +179,16 @@ class CashuWallet {
let newKeys: MintKeys | undefined;
try {
const amount = tokenEntry.proofs.reduce((total, curr) => total + curr.amount, 0);
const { payload, blindedMessages } = this.createSplitPayload(
amount,
tokenEntry.proofs
);
const { payload, blindedMessages } = this.createSplitPayload(amount, tokenEntry.proofs);
const { promises } = await CashuMint.split(tokenEntry.mint, payload);
proofs.push(...dhke.constructProofs(
promises,
blindedMessages.rs,
blindedMessages.secrets,
await this.getKeys(promises, tokenEntry.mint)
));
proofs.push(
...dhke.constructProofs(
promises,
blindedMessages.rs,
blindedMessages.secrets,
await this.getKeys(promises, tokenEntry.mint)
)
);
newKeys =
tokenEntry.mint === this.mint.mintUrl
? await this.changedKeys([...(promises || [])])
Expand Down Expand Up @@ -228,10 +227,7 @@ class CashuWallet {
}
if (amount < amountAvailable) {
const { amount1, amount2 } = this.splitReceive(amount, amountAvailable);
const { payload, blindedMessages } = this.createSplitPayload(
amount1,
proofsToSend
);
const { payload, blindedMessages } = this.createSplitPayload(amount1, proofsToSend);
const { promises } = await this.mint.split(payload);
const proofs = dhke.constructProofs(
promises,
Expand Down

0 comments on commit 9e02ed0

Please sign in to comment.