Skip to content

Staging - #175

Merged
julian-CStack merged 49 commits into
desktopfrom
staging
Oct 26, 2022
Merged

julian-CStack merged 49 commits into
desktopfrom
staging

Conversation

@ryleedavis

Copy link
Copy Markdown
Contributor

No description provided.

msalazarm and others added 30 commits October 18, 2022 15:32
# Conflicts:
#	ios/Runner.xcodeproj/project.pbxproj
@julian-CStack
julian-CStack merged commit baca31c into desktop Oct 26, 2022
vsnation added a commit to vsnation/campfire-beam that referenced this pull request Oct 7, 2026
Owner: the Assets page parsed LP pairs wrongly; pool icons jumped and some
had no circle.

LP tokens (from the explorer: every one is minted by the DEX contract with
metadata "Amm Liquidity Token <aid1>-<aid2>-<kind>", 8 decimals, supply =
the pool's ctl):
- were listed as "LP cypherstack#189: 2,728.25 LP" (or not at all: pool shares counted
  as unverified), named "Amm Liquidity Token 0-174-2" / "cypherstack#175" outside the
  asset screens, and an unverified side was valued a quarter too low.
- Now BeamLpTokens, filled only from the DEX pool list (an asset that merely
  copies the name stays unverified), names them "BEAM/FOMO LP" everywhere
  (history details too, "BEAM/BB #3 LP" for an unverified side), shows
  the pair icon and fee tier, and values them as (lp / ctl) x (tok1 * p1 +
  tok2 * p2); an unverified side as sold back into what the withdraw leaves.
Icons: one exact-size coin clipped to a circle; logos that are not round
(NPH, GIGA, CHAD) on a neutral disc; a same-size placeholder while loading;
a reused row never shows the previous asset's picture.
Tests: LP page/tokens/history names against recorded explorer rows, icon
sizes before/after load; 40 goldens differ by icon edges only (checked).
vsnation added a commit to vsnation/campfire-beam that referenced this pull request Oct 10, 2026
…es it

Home's token list drew every Confidential Asset as two letters on a
coloured circle, and showed the DEX liquidity tokens (cypherstack#175, cypherstack#192, cypherstack#193)
as "Unnamed asset". Their names came only from each asset's metadata,
which for a liquidity token is the contract's "Amm Liquidity Token
0-174-2", when it arrived at all.

The web wallet now uses the desktop app's catalogue, ported line for
line (lib/meta.js, lib/lookalike.js, lib/lp_tokens.js):
- verified assets show Campfire's name, ticker and icon;
- a liquidity token is named after its pool, "BEAM/FOMO LP", with
  "Pool share · 1% fee" under it and its pool's two icons. Only the DEX
  contract makes an asset a liquidity token: its pool list ships with
  the app (98 pools, cross-checked with the asset list) and every pool
  list the app reads adds newer pools, never a name;
- any other asset shows its cleaned on-chain name with its number and
  the BEAM desktop wallet's generic icon for that number, and a copy of
  a verified asset gets the desktop's warning.

Labels stay current: when metadata or a pool arrives, Home, Send, Swap,
Activity and the approval sheets all show the new name. Money screens
write an unverified ticker with its number ("5 PEPE cypherstack#94"), as the
desktop does.

The icons are the desktop app's files, byte for byte, bundled in the
signed release and never fetched (img/assets, NOTICE.txt). A unit test
pins each one here and in the desktop's folder.

asset_parity.test.mjs compares the result with the desktop's own code
for every asset on mainnet (203) and 61 edge cases, with and without
metadata: no differences. tools/asset_parity/run.mjs refreshes that
data. test/e2e/asset_icons.test.mjs checks the list in Chrome on a
throwaway mainnet wallet. Documented in the project notes, section 3f.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants