perf(tangle-cloud): zero @polkadot library code in bundle#3192
Merged
perf(tangle-cloud): zero @polkadot library code in bundle#3192
Conversation
tangle-cloud doesn't deal with substrate flows — those all live on
tangle-dapp's claims/migration page. The four direct polkadot imports
were leftovers from the Webb-era shared utilities.
Replacements:
- BlueprintInfoCard: isEthereumAddress(@polkadot/util-crypto)
-> isAddress(viem) with strict: false to preserve regex-only
semantics (accept non-checksummed mixed-case)
- TxHistoryDrawer: BN(@polkadot/util) -> bigint. formatDisplayAmount
signature narrowed to (bigint, ...). BN.isBN check replaced with
typeof === 'bigint' (HistoryTxDetail union already excluded BN).
- TotalValueLockedTable: type-only BN import dropped. Local BigIntish
narrowing alias (bigint | { toString(): string }) avoids touching
the shared StakingVault type that tangle-dapp also consumes.
- rewards/page: BN -> bigint. Removed new BN(amount.toString())
wrappers that were round-tripping through string for no reason.
Verified: zero @PolkaDot library bytes in any tangle-cloud chunk
(grep '@PolkaDot\|x-global\|registerGlobal' dist/.../assets/*.js -> 0).
The 1.99KB polkadot-*.js chunk that remains is just the Polkadot
blockchain logo SVG from libs/icons; non-library, lazy-loaded only
for chain selectors that show that ecosystem.
tangle-dapp untouched — still depends on polkadot for substrate
flows; its 697KB polkadot vendor chunk is unchanged.
❌ Deploy Preview for tangle-dapp failed. Why did it fail? →
|
❌ Deploy Preview for tangle-cloud failed. Why did it fail? →
|
❌ Deploy Preview for tangle-leaderboard failed. Why did it fail? →
|
This was referenced May 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
tangle-cloud doesn't deal with substrate flows — those all live on tangle-dapp's claims/migration page. The four direct polkadot imports were leftovers from the Webb-era shared utilities.
Replacements
isEthereumAddress(@polkadot/util-crypto)→isAddress(viem)withstrict: false(preserves polkadot's regex-only semantics)BN(@polkadot/util)→bigint(formatDisplayAmount already accepts bigint)Verified: zero
@polkadotlibrary bytes in any tangle-cloud chunk. The 1.99KBpolkadot-*.jschunk that remains is the chain-logo SVG, not library code.tangle-dapp untouched — still depends on polkadot for substrate flows.