Crypto wallet: Orbit Pro
Orbit is a self-custody wallet. The balance card follows your finger along the chart; a swap goes amount → review → done and names the rate, network fee, Orbit fee, price impact and the least you will get before you confirm. It refuses more than you hold.
See it live, on any deviceUse the whole app
import { CryptoApp } from '@patine-ui/pro';
<CryptoApp />;
| Prop | Type | Default |
|---|---|---|
initialRoute | 'portfolio' | 'welcome' | 'markets' | 'asset' | 'swap' | 'receive' | 'activity' | 'settings' | 'portfolio' |
demo | 'ready' | 'loading' | 'empty' | 'error' | 'ready' |
insets | { top, bottom } | None |
platform | 'ios' | 'android' | 'web' | Platform.OS |
Screens move the platform's way: on iOS a pushed screen slides in from the trailing edge, on Android they fade through, on the web and between tabs they fade in. Reduce motion turns it off.
Screens
| Screen | What it does |
|---|---|
PortfolioScreen | The balance on a gradient card, an area chart over 1D to 1Y that the balance follows while you scrub, quick actions, holdings with their day, allocation as a donut |
WelcomeScreen | Three swipeable pages on the library's Pager with page dots, Create a wallet and I already have one |
MarketsScreen | Search, chips for watchlist, gainers, losers and sectors; rows with sparklines on phones and a sortable Table with a 7-day line on desktop |
AssetScreen | Price and change for the range, a line chart to scrub, your position, market stats with Stat, an About collapsible, Receive and Swap pinned |
SwapScreen | Steps (Amount, Review, Done), coin pickers on Select, Max, flip, slippage, and a DescriptionList of every fee |
ReceiveScreen | A QRCode with the coin's logo in the middle, the address in groups of four with CopyButton, and which network to use |
ActivityScreen | Pro's ActivityFeed by day with filters; pending and failed swaps flagged |
WalletSettingsScreen | Face ID and backup progress, price alerts you switch or swipe away (SwipeableRow), preferences |
Every screen is exported on its own, takes its data as props, and has sample data as defaults. swapQuote(from, to, amount, slippage) returns the rate, fees, price impact and minimum received; priceSeries draws a seeded demo history; applySwap moves coins between holdings.
Built with
The free components, from patine-ui:
Alert · Avatar · Badge · Button · Card · ChipGroup · Collapsible · CopyButton · DescriptionList · Heading, Text · List, ListItem · PageIndicator, Pager · Progress · QRCode · SearchField · SegmentedControl · Select · Separator · Stat · Steps · SwipeableRow · Switch · Table · TextField
And from Patine Pro:
- Activity feed PRO
- App shell and layout PRO
- Brand logos PRO
- Line chart PRO
- Pie chart PRO
- Sparkline PRO
Files
crypto/
├── components/
│ ├── AssetRow.tsx
│ └── CoinMark.tsx
├── hooks/
│ ├── useCryptoApp.ts
│ └── useCryptoScreens.ts
├── ActivityScreen.tsx
├── AssetScreen.tsx
├── crypto.constants.ts
├── crypto.types.ts
├── crypto.utils.ts
├── CryptoApp.tsx
├── index.ts
├── MarketsScreen.tsx
├── PortfolioScreen.tsx
├── ReceiveScreen.tsx
├── SwapScreen.tsx
├── WalletSettingsScreen.tsx
└── WelcomeScreen.tsx
It also uses shared/, the theme, money formatting and screen transitions every Pro app shares.
A look at the code
A swap quote with every fee and the minimum received, from crypto.utils.ts:
/** What swapping `amount` of one coin for another returns: the rate, fees, price impact and the least you'll get. */
export const swapQuote = (from: Coin, to: Coin, amount: number, slippage: number): SwapQuote => {
const value = amount * from.price;
const priceImpact = amount > 0 ? Math.min(0.05, value / 4_000_000) : 0;
const serviceFee = value * SERVICE_FEE;
const networkFee = amount > 0 ? NETWORK_FEE_USD : 0;
const net = Math.max(0, value - serviceFee - networkFee) * (1 - priceImpact);
const receive = net / to.price;
return {
receive,
minimum: receive * (1 - slippage),
rate: from.price / to.price,
networkFee,
serviceFee,
priceImpact,
value,
};
};