Skip to content

Commit

Permalink
sprinkles
Browse files Browse the repository at this point in the history
  • Loading branch information
2qx committed Sep 8, 2023
1 parent abbc6a2 commit 6ab9ae5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
4 changes: 2 additions & 2 deletions packages/app/src/lib/Donations.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
{#each results as txo}
<Item>
<div class="tract" style="height:{getUnevenImageSize(txo.satoshis, 60, 180, Math.abs)}px">
<h2>⚫ {txo.satoshis.toLocaleString()}</h2>
<h2>⚫ {new Intl.NumberFormat().format(txo.satoshis) }</h2>
<a target=_blank href="https://explorer.bitcoinunlimited.info/tx/{txo.txid}" >Transaction</a>
</div>
</Item>
Expand All @@ -98,8 +98,8 @@
}
.tract h2 {
font-weight: 600;
font-size: medium;
color: rgb(90, 55, 5);
text-align: right;
}
.tract a {
font-weight: 400;
Expand Down
8 changes: 6 additions & 2 deletions packages/app/src/routes/202309_fundraiser/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@
let balance = 0n;
let perpBalance = 0n;
let balanceText = '';
let p2pkhBCHText = "";
let perpBalanceText = '';
let p2shBCHText = "";
let percentDone = '';
let perpPercentDone = '';
let isSuccess = false;
Expand All @@ -39,11 +41,13 @@
load: async () => {
if (cashaddr) balance = await getBalance(cashaddr);
balanceText = balance.toLocaleString();
p2pkhBCHText = (balance/100000000n).toLocaleString()
percentDone = Number((balance / goal) * 100n).toFixed(4);
isSuccess = balance > goal ? true : false;
if (cashaddr) perpBalance = await getBalance(perp);
perpBalanceText = perpBalance.toLocaleString();
p2shBCHText = (perpBalance/100000000n).toLocaleString();
perpPercentDone = Number((perpBalance / goal) * 100n).toFixed(4);
isSuccess = balance > goal ? true : false;
}
Expand Down Expand Up @@ -278,7 +282,7 @@ pointer-events: none;"
<tr>
<td>
<AddressQrCode size={225} codeValue={cashaddr} {lockingBytecode} />
💚 <LinearProgress progress={Number(balance) / Number(goal)} />
{p2pkhBCHText} <b>BCH 💚</b> <LinearProgress progress={Number(balance) / Number(goal)} />
</td>
</tr>
<tr>
Expand All @@ -298,7 +302,7 @@ pointer-events: none;"
codeValue={perp}
lockingBytecode={perpLockingBytecode}
/>
💚 <LinearProgress progress={Number(perpBalance) / Number(goal)} />
{ p2shBCHText } <b>BCH 💚</b> <LinearProgress progress={Number(perpBalance) / Number(goal)} />
</td>
</tr>
<tr>
Expand Down

0 comments on commit 6ab9ae5

Please sign in to comment.