Skip to content
Open
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
10 changes: 10 additions & 0 deletions .changeset/multi-provider-routes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
"@swapkit/ui": minor
---

Surface every provider in a multi-hop quote rather than just the first.

- The collapsed quote card now face-piles the provider logos and renders the full path label (`1inch → Chainflip`, truncated to `A → … → Z` for 4+ providers) instead of only `providers[0]`.
- The priority badge (Recommended / Cheapest / Fastest) moves to a corner ribbon on the top-right of the card and dialog rows, freeing the inline row for the path label and amount on mobile too.
- The fee details accordion now leads with a vertical per-leg timeline (sell asset → provider → … → buy asset) for multi-hop routes; single-hop routes show the fees breakdown only, unchanged.
- The route-select dialog mirrors the collapsed card: stacked logos, path label, corner ribbon, and the title becomes "Select route".
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
SWAPKIT_DEV_AUTH_TOKEN=""
3 changes: 3 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# GitHub will automatically add review requests from these usernames for PRs

- @towanTG @Drakeoon @ice-chillios
30 changes: 30 additions & 0 deletions .github/workflows/pr-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: PR Test

on:
workflow_dispatch:
push:
branches:
- develop
pull_request:
branches:
- develop

jobs:
build-lint-test:
if: github.event_name != 'pull_request' || contains(github.event.pull_request.title, ':tada:') == false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.head_ref }}

- name: Setup Repo
uses: ./tools/github/setup-repo

- run: bun build:ci
- run: bun lint
- run: bun type-check:ci

# - name: Test
# run: bun test:ci
28 changes: 25 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,14 @@ on:
push:
branches:
- develop
- beta
- nightly

jobs:
build-lint-test:
runs-on: ubuntu-latest
env:
TEST_API_KEY: ${{ secrets.TEST_API_KEY }}

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -58,14 +61,18 @@ jobs:
- name: Upgrade npm for OIDC trusted publishing
run: npm install -g npm@11

- name: Copy npmrc config
run: cp .npmrc.prod .npmrc
- name: Configure npm registry
run: |
cp .npmrc.prod .npmrc
echo "registry=https://registry.npmjs.org/" > ~/.npmrc

- name: Set job params
shell: bash
id: deployment-params
run: |
git config --global user.email "swapkit@users.noreply.github.com"
git config --global user.name "swapkit"
echo "publishName=${{ github.ref_name == 'develop' && 'Release' || github.ref_name }}" >> $GITHUB_OUTPUT

- name: Exit pre changeset
if: github.ref_name == 'nightly'
Expand All @@ -76,17 +83,32 @@ jobs:
if: github.ref_name == 'nightly'
run: bun changeset version --snapshot nightly

- name: Change beta changeset
if: github.ref_name == 'beta'
continue-on-error: true
run: bun changeset pre enter beta

- name: Create Pull Request or Publish to npm
id: changesets
if: github.ref_name == 'develop'
uses: changesets/action@v1.4.10
with:
title: ":tada: Publish Wallets Release"
title: ":tada: Publish ${{ steps.deployment-params.outputs.publishName }}"
version: bun version-bump
publish: bun publish-packages
setupGitUser: false
createGithubReleases: false

- name: Publish Beta to npm
if: github.ref_name == 'beta'
uses: changesets/action@v1.4.10
with:
title: ":tada: Publish Beta"
version: bun version-bump
publish: bun publish-packages --no-git-tag
setupGitUser: false
createGithubReleases: false

- name: Publish Nightly to npm
if: github.ref_name == 'nightly'
uses: changesets/action@v1.4.10
Expand Down
116 changes: 116 additions & 0 deletions .github/workflows/update-swapkit-deps.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
name: Update SwapKit Dependencies
env:
SWAPKIT_DEV_AUTH_TOKEN: ${{ secrets.SWAPKIT_DEV_AUTH_TOKEN }}

on:
workflow_dispatch:
schedule:
# Every weekday at 10:00 UTC
- cron: "0 10 * * 1-5"

permissions:
contents: write
pull-requests: write

jobs:
update-deps:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: develop
fetch-depth: 0

- name: Setup Repo
uses: ./tools/github/setup-repo

- name: Update @swapkit/* packages
id: update
run: |
# Collect workspace package names so we can exclude them from the update
workspace_names=$(jq -r '.name // empty' packages/*/package.json | grep '^@swapkit/' || true)

# Collect all @swapkit/* dependency names, excluding workspace packages themselves
all_deps=$(grep -roh '"@swapkit/[^"]*"' packages/*/package.json | tr -d '"' | sort -u)
if [ -n "$workspace_names" ]; then
packages=$(echo "$all_deps" | grep -vxFf <(echo "$workspace_names") | tr '\n' ' ')
else
packages=$(echo "$all_deps" | tr '\n' ' ')
fi

if [ -z "$packages" ]; then
echo "No @swapkit/* packages found"
echo "changed=false" >> "$GITHUB_OUTPUT"
exit 0
fi

echo "Updating: $packages"

# bun update doesn't support globs, pass explicit package names
# shellcheck disable=SC2086
bun update --latest $packages

# Check if anything changed
if git diff --quiet -- packages/*/package.json bun.lock; then
echo "changed=false" >> "$GITHUB_OUTPUT"
echo "No @swapkit/* updates available"
exit 0
fi

echo "changed=true" >> "$GITHUB_OUTPUT"

# Build a summary of what changed
{
echo "summary<<SUMMARY_EOF"
for pkg_json in packages/*/package.json; do
pkg_diff=$(git diff -- "$pkg_json" | grep '@swapkit/' || true)
if [ -n "$pkg_diff" ]; then
pkg_name=$(basename "$(dirname "$pkg_json")")
echo "**$pkg_name:**"
echo '```diff'
echo "$pkg_diff"
echo '```'
echo ""
fi
done
echo "SUMMARY_EOF"
} >> "$GITHUB_OUTPUT"

- name: Create PR
if: steps.update.outputs.changed == 'true'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
branch="chore/update-swapkit-deps-$(date +%Y%m%d)"

git config user.email "swapkit@users.noreply.github.com"
git config user.name "swapkit"

git checkout -b "$branch"
git add packages/*/package.json bun.lock
git commit -m "chore(deps): update @swapkit/* packages"
git push -u origin "$branch"

# Close any stale update PRs
existing_prs=$(gh pr list --search "chore/update-swapkit-deps- in:title" --state open --json number --jq '.[].number' || true)
for pr in $existing_prs; do
gh pr close "$pr" --comment "Superseded by newer dependency update"
done

gh pr create \
--base develop \
--head "$branch" \
--title "chore(deps): update @swapkit/* packages" \
--body "$(cat <<'PREOF'
## SwapKit Dependency Update

Automated bump of `@swapkit/*` packages to latest versions.

### Changes

${{ steps.update.outputs.summary }}

---
> CI will validate build, lint, and types on this PR.
PREOF
)"
17 changes: 17 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,20 @@ build/data.json
.DS_Store
.env
.env.local
*.log
*.tmp.json
.aider*
.cursor/mcp.json
.mcp*
.claude
.claude-teams
AGENTS*
claude

.idea/
build/
cache/
coverage/

**/.terraform/*
*.tfstate
6 changes: 0 additions & 6 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
//registry.npmjs.org/:_authToken=${NPM_TOKEN}
registry=https://registry.npmjs.org/
always-auth=true
//registry.npmjs.org/:_authToken=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
//registry.npmjs.org/:_authToken=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
//registry.npmjs.org/:_authToken=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
//registry.npmjs.org/:_authToken=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
//registry.npmjs.org/:_authToken=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
//registry.npmjs.org/:_authToken=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
Loading
Loading