summaryrefslogtreecommitdiffstats
path: root/src/format.js
Commit message (Collapse)AuthorAgeFilesLines
* Every payment remembers what it was worth.Adam Soltys2026-09-111-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | A payment is worth what it was worth WHEN IT HAPPENED, and that number is gone by the time you look at it unless someone wrote it down. So every price the app fetches is kept as a sample — one an hour, a few months back — and a payment's fiat value is read off the sample nearest its own timestamp. The history rows and both detail pages (on-chain and Spending) pass the time the money moved; balances and forms use the live price, as they should. A payment older than any sample we hold is priced at today's number and says so with a '~', because that is a different claim and shouldn't look like the same one. The detail page spells it out: "Worth then $X · $Y now". Fiat is a third position on the unit toggle rather than a second number beside the first: sats → BTC → your money → sats. One figure, and which figure is your choice. The ring skips fiat entirely until a price has been fetched — a third position showing blanks is worse than two that work. Typing an amount with the unit on USD means dollars, priced now. The rates are coinos' own endpoint, a map of every currency it knows, so there's no third party watching what the wallet asks about; the currency picker under Settings → Network lists all of them. Changing it starts the recorded history again rather than relabelling samples taken in another currency. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_019mrt228Upn9nNCwGixzSLx
* Coinos branding: logo and black & white themeAdam Soltys2026-08-011-1/+1
| | | | | | | | | Icons, favicon, and PWA assets come from the coinos brand set; the accent goes monochrome (black in light mode, white in dark, with a proper on-accent text variable so buttons stay legible both ways) and the inline bitcoin mark inherits the text color. Co-Authored-By: Claude Fable 5 <[email protected]>
* History: Ark glyph in the row circle (no text chip); real Bitcoin logoAdam Soltys2026-07-061-0/+6
| | | | | | | | | | | Off-chain Ark rows (arkHistoryItem) showed an arrow + a redundant 'Ark' text chip; now the Ark mark sits in the direction-colored circle and the chip is gone — the label + signed amount carry direction. The detail header gets the badge instead of the chip. And the receive selector's Bitcoin option uses coinos's real bitcoin.svg (orange disc + tilted white B) instead of a bare ₿ character. Co-Authored-By: Claude Fable 5 <[email protected]>
* Ark icon: Second's logo instead of the crossed-swords placeholderAdam Soltys2026-07-061-0/+10
| | | | | | | | | | | | | | The ⚔ was a U+2694 emoji stand-in. Swap in Second's actual mark (second.tech logo: a triangle with an evenodd inner cutout) as two format.js helpers — ARK_ICON (dark rounded-square app badge + white mark, for card/section headers) and ARK_MARK (bare currentColor glyph, for the history-row circle). Wired into the Ark settings card, the boarding/withdrawal/exit history rows + detail section, and the How-it-works Ark section; the gift source toggle drops the emoji for plain 'Ark'. Verified the badge renders (18px, #00090C square, white evenodd mark). Co-Authored-By: Claude Fable 5 <[email protected]>
* Rebuild as single-file offline BIP84 walletAdam Soltys2026-06-141-0/+56
Replace the SvelteKit/daisyUI prototype with a vanilla JS + hand-rolled CSS app that Bun bundles (code + scure/noble crypto + QR + CSS) into one self-contained dist/index.html runnable offline from file://. Wallet core (src/wallet.js): - BIP84 native-segwit HD wallet from BIP39 seed (+optional passphrase) - gap-limit scan of receive/change chains, aggregate balance, tx history - fresh receive/change addresses; signs with witnessUtxo only (enables offline signing with no prev-tx fetch) - coin selection + fee estimation via btc-signer selectUTXO; send-max; manual coin control - offline JSON snapshot export/import (keyless) + signed-tx hex/QR export - realtime mempool.space WebSocket: track-addresses -> debounced auto refresh of balances/history (no polling); live status badge UI (src/app.js): clean light paper-wallet; create (with optional, skippable backup verification) / import flow; receive (QR) / send / history / coins / tools tabs; clickable logo returns home. API (src/api.js): mempool.space wrapper with retry/backoff for scan-burst rate limiting; single network choke-point for offline enforcement. Verified: BIP84 spec vectors, build/sign/parse for auto/max/manual flows, snapshot roundtrip, live scan + WebSocket, headless-Chrome UI smoke tests. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>