Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 17 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

Arkade Wallet is the entry-point to the Arkade ecosystem—a self-custodial Bitcoin wallet delivered as a lightweight Progressive Web App (installable on mobile or desktop in seconds, no app-store gatekeepers). Built around the open-source ARK protocol, it speaks natively to any [arkd](https://github.com/arkade-os/arkd) instance, letting you create, send, and receive Virtual Transaction Outputs (VTXOs) for instant, off-chain pre-confirmations and batched, fee-efficient on-chain settlement.


## Screenshots

<!-- Using a table for more consistent layout -->
Expand All @@ -17,20 +16,21 @@ Arkade Wallet is the entry-point to the Arkade ecosystem—a self-custodial Bitc
</tr>
</table>




## Environment Variables

| Variable | Description | Example Value |
|-----------------------------|--------------------------------------------------------------------------------------------------|------------------------------------------------------|
| `VITE_ARK_SERVER` | Override the default Arkade server URL | `VITE_ARK_SERVER=http://localhost:7070` |
| `VITE_BOLTZ_URL` | Override the default Boltz swap provider URL for Lightning | `VITE_BOLTZ_URL=https://your-boltz-provider-url.com` |
| `VITE_SENTRY_DSN` | Enable Sentry error tracking (only in production, not on localhost) | `VITE_SENTRY_DSN=your-sentry-dsn` |
| `CI` | Set to `true` for Continuous Integration environments | `CI=true` |
| `GENERATE_SOURCEMAP` | Disable source map generation during build | `GENERATE_SOURCEMAP=false` |
| `VITE_LENDASAT_IFRAME_URL` | Overwrite the default LendaSat URL | `VITE_LENDASAT_IFRAME_URL=http://localhost:5173` |
| `VITE_LENDASWAP_IFRAME_URL` | Overwrite the default LendaSwap URL | `VITE_LENDASWAP_IFRAME_URL=http://localhost:5174` |
| Variable | Description | Example Value |
| --------------------------- | ------------------------------------------------------------------- | ------------------------------------------------- |
| `VITE_ARK_SERVER` | Override the default Arkade server URL | `VITE_ARK_SERVER=http://localhost:7070` |
| `VITE_BOLTZ_URL` | Override the default Boltz swap provider URL for Lightning | `VITE_BOLTZ_URL=https://boltz-provider-url.com` |
| `VITE_SENTRY_DSN` | Enable Sentry error tracking (only in production, not on localhost) | `VITE_SENTRY_DSN=your-sentry-dsn` |
| `CI` | Set to `true` for Continuous Integration environments | `CI=true` |
| `GENERATE_SOURCEMAP` | Disable source map generation during build | `GENERATE_SOURCEMAP=false` |
| `VITE_LENDASAT_IFRAME_URL` | Overwrite the default LendaSat URL | `VITE_LENDASAT_IFRAME_URL=http://localhost:5173` |
| `VITE_LENDASWAP_IFRAME_URL` | Overwrite the default LendaSwap URL | `VITE_LENDASWAP_IFRAME_URL=http://localhost:5174` |
| `VITE_UTXO_MAX_AMOUNT`. | Overwrite the server's utxoMaxAmount | `VITE_UTXO_MAX_AMOUNT=-1` |
| `VITE_UTXO_MIN_AMOUNT`. | Overwrite the server's utxoMinAmount | `VITE_UTXO_MIN_AMOUNT=330` |
| `VITE_VTXO_MAX_AMOUNT`. | Overwrite the server's vtxoMaxAmount | `VITE_VTXO_MAX_AMOUNT=-1` |
| `VITE_VTXO_MIN_AMOUNT`. | Overwrite the server's vtxoMinAmount | `VITE_VTXO_MIN_AMOUNT=330` |

## Getting Started

Expand All @@ -43,9 +43,9 @@ Arkade Wallet is the entry-point to the Arkade ecosystem—a self-custodial Bitc

Install dependencies

```bash
pnpm install
```
```bash
pnpm install
```

## Development

Expand Down Expand Up @@ -93,4 +93,4 @@ Access the playwright code generator tool with:

```bash
pnpm run test:codegen
```
```
2 changes: 1 addition & 1 deletion src/components/SwapsList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@ const SwapLine = ({ swap }: { swap: PendingReverseSwap | PendingSubmarineSwap })
const sats = swap.type === 'reverse' ? swap.response.onchainAmount : swap.response.expectedAmount
const direction = swap.type === 'reverse' ? 'Lightning to Arkade' : 'Arkade to Lightning'
const status: statusUI = statusDict[swap.status] || 'Pending'
const color = colorDict[status]
const prefix = swap.type === 'reverse' ? '+' : '-'
const amount = `${prefix} ${config.showBalance ? prettyAmount(sats) : prettyHide(sats)}`
const when = window.innerWidth < 400 ? prettyAgo(swap.createdAt) : prettyDate(swap.createdAt)
const refunded = swap.type === 'submarine' && swap.refunded
const color = refunded ? colorDict['Refunded'] : colorDict[status]

const Icon = iconDict[status]
const Kind = () => <Text thin>{direction}</Text>
Expand Down
10 changes: 5 additions & 5 deletions src/providers/limits.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,15 @@ export const LimitsProvider = ({ children }: { children: ReactNode }) => {
if (!aspInfo.network || !svcWallet || !swapProvider) return

limits.current.utxo = {
min: BigInt(aspInfo.utxoMinAmount ?? aspInfo.dust ?? -1),
max: BigInt(aspInfo.utxoMaxAmount ?? -1),
min: BigInt(import.meta.env.VITE_UTXO_MIN_AMOUNT || aspInfo.utxoMinAmount || aspInfo.dust || -1),
max: BigInt(import.meta.env.VITE_UTXO_MAX_AMOUNT || aspInfo.utxoMaxAmount || -1),
}

limits.current.vtxo = {
min: BigInt(aspInfo.vtxoMinAmount ?? aspInfo.dust ?? -1),
max: BigInt(aspInfo.vtxoMaxAmount ?? -1),
min: BigInt(import.meta.env.VITE_VTXO_MIN_AMOUNT || aspInfo.vtxoMinAmount || aspInfo.dust || -1),
max: BigInt(import.meta.env.VITE_VTXO_MAX_AMOUNT || aspInfo.vtxoMaxAmount || -1),
}
}, [aspInfo.network, svcWallet])
}, [aspInfo.network, svcWallet, swapProvider])

// update limits when swapProvider or connected changes
useEffect(() => {
Expand Down
10 changes: 7 additions & 3 deletions src/screens/Wallet/Receive/Amount.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export default function ReceiveAmount() {
const { fromFiat, toFiat } = useContext(FiatContext)
const { recvInfo, setRecvInfo } = useContext(FlowContext)
const { calcReverseSwapFee } = useContext(LightningContext)
const { amountIsAboveMaxLimit, validLnSwap } = useContext(LimitsContext)
const { amountIsAboveMaxLimit, amountIsBelowMinLimit, validLnSwap } = useContext(LimitsContext)
const { navigate } = useContext(NavigationContext)
const { balance, svcWallet } = useContext(WalletContext)

Expand Down Expand Up @@ -85,7 +85,9 @@ export default function ReceiveAmount() {
? 'Amount below 1 satoshi'
: amountIsAboveMaxLimit(satoshis)
? 'Amount above max limit'
: 'Continue',
: amountIsBelowMinLimit(satoshis)
? 'Amount below min limit'
: 'Continue',
)
}, [satoshis])

Expand Down Expand Up @@ -122,7 +124,9 @@ export default function ReceiveAmount() {

const showFaucetButton = balance === 0 && faucetAvailable
const showLightningFees = amount && validLnSwap(satoshis)
const disabled = !satoshis ? false : satoshis < 1 || amountIsAboveMaxLimit(satoshis)
const disabled = !satoshis
? false
: satoshis < 1 || amountIsAboveMaxLimit(satoshis) || amountIsBelowMinLimit(satoshis)

if (showKeys) {
return <Keyboard back={() => setShowKeys(false)} hideBalance onChange={handleChange} value={amount} />
Expand Down
7 changes: 5 additions & 2 deletions src/screens/Wallet/Send/Form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export default function SendForm() {
const { fromFiat, toFiat } = useContext(FiatContext)
const { sendInfo, setNoteInfo, setSendInfo } = useContext(FlowContext)
const { swapProvider, connected, calcSubmarineSwapFee } = useContext(LightningContext)
const { amountIsAboveMaxLimit, utxoTxsAllowed, vtxoTxsAllowed } = useContext(LimitsContext)
const { amountIsAboveMaxLimit, amountIsBelowMinLimit, utxoTxsAllowed, vtxoTxsAllowed } = useContext(LimitsContext)
const { setOption } = useContext(OptionsContext)
const { navigate } = useContext(NavigationContext)
const { balance, svcWallet } = useContext(WalletContext)
Expand Down Expand Up @@ -216,7 +216,9 @@ export default function SendForm() {
? 'Amount below 1 satoshi'
: amountIsAboveMaxLimit(satoshis)
? 'Amount above max limit'
: 'Continue',
: amountIsBelowMinLimit(satoshis)
? 'Amount below min limit'
: 'Continue',
)
}, [satoshis])

Expand Down Expand Up @@ -329,6 +331,7 @@ export default function SendForm() {
(lnUrlLimits.max && satoshis > lnUrlLimits.max) ||
(lnUrlLimits.min && satoshis < lnUrlLimits.min) ||
amountIsAboveMaxLimit(satoshis) ||
amountIsBelowMinLimit(satoshis) ||
satoshis < 1 ||
aspInfo.unreachable ||
satoshis > availableBalance ||
Expand Down