Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
gandlafbtc committed Apr 2, 2023
1 parent faa7cc6 commit dc03791
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 7 deletions.
5 changes: 4 additions & 1 deletion src/comp/tokens/InboxRow.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,10 @@
const cashuMint: CashuMint = new CashuMint(mint.mintURL);
const cashuWallet: CashuWallet = new CashuWallet(mint.keys, cashuMint);
const encodedProofs = getEncodedToken(nostrMessage.token.token[0].proofs, nostrMessage.token.token[0].mint);
const encodedProofs = getEncodedToken(
nostrMessage.token.token[0].proofs,
nostrMessage.token.token[0].mint
);
isLoading = true;
const newTokens: Array<Token> = await cashuWallet.receive(encodedProofs);
Expand Down
6 changes: 4 additions & 2 deletions src/comp/tokens/InboxTable.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
const storeMint: Mint = {
mintURL: mint.mintUrl,
keys,
keysets: [...new Set(nM.token.token[0].proofs.map(p=> p.id))],
keysets: [...new Set(nM.token.token[0].proofs.map((p) => p.id))],
isAdded: false
};
}
Expand All @@ -43,7 +43,9 @@
const proofsToReceive = nM.token.token[0].proofs.filter((p) => !spentProofs.includes(p));
if (proofsToReceive.length > 0) {
const receivedProofs = await wallet.receive(getEncodedToken(proofsToReceive,mint.mintUrl));
const receivedProofs = await wallet.receive(
getEncodedToken(proofsToReceive, mint.mintUrl)
);
token.update((state) => [...receivedProofs, ...state]);
Expand Down
6 changes: 3 additions & 3 deletions src/comp/wallet/Receiving.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
'Receive tokens from this mint by adding the mint',
'Not connected to this mint'
);
mintToAdd = getDecodedToken(encodedToken).token[0].mint
mintToAdd = getDecodedToken(encodedToken).token[0].mint;
return;
}
const cashuMint: CashuMint = new CashuMint(mint.mintURL);
Expand Down Expand Up @@ -90,8 +90,8 @@
amount = 0;
try {
const { token } = getDecodedToken(encodedToken);
const proofs = token[0].proofs
const mint = token[0].mint
const proofs = token[0].proofs;
const mint = token[0].mint;
proofs.forEach((t) => {
mintId = t.id;
amount += t.amount;
Expand Down
2 changes: 1 addition & 1 deletion src/model/nostrMessage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import type { Token } from './token';
import type { Event } from 'nostr-tools';
interface NostrMessage {
event: Event;
token: { token: [{ proofs: Array<Token>; mint: string; }], memo?: string };
token: { token: [{ proofs: Array<Token>; mint: string }]; memo?: string };
isAccepted: boolean;
}

Expand Down

0 comments on commit dc03791

Please sign in to comment.