Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: decred/dcrdex
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.1.3
Choose a base ref
...
head repository: decred/dcrdex
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Loading
Showing 1,142 changed files with 288,092 additions and 48,304 deletions.
3 changes: 3 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
client/webserver/site/node_modules/
spec/
docs/
52 changes: 52 additions & 0 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Android build
on:
workflow_dispatch:
inputs:
name:
description: "Release-Build"
default: "Build Android companion app"

jobs:
build:
runs-on: ubuntu-latest

steps:
# Checkout project code
- name: Checking out branch
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 #v4.2.2
with:
# Use sparse checkout to only select files in mobile app directory
# Turning off cone mode ensures that files in the project root are not included during checkout
sparse-checkout: 'companionapp/android'
sparse-checkout-cone-mode: false

# This step is needed because expo-github-action does not support paths.
# Therefore all mobile app assets should be moved to the project root.
- name: Move mobile app files to root
run: |
ls -lah
shopt -s dotglob
mv companionapp/android/* .
ls -lah
- name: Setup Java
uses: actions/setup-java@7a6d8a8234af8eb26422e24e3006232cccaa061b #v4.6.0
with:
distribution: 'temurin'
java-version: 17

- name: Setup Android SDK
uses: android-actions/setup-android@9fc6c4e9069bf8d3d10b2204b1fb8f6ef7065407 #v3.2.2

- name: Build Debug apk
run: ./gradlew assembleDebug --stacktrace

- name: Get apk path
id: debugApk
run: echo "apkfile=$(find app/build/outputs/apk/debug/*.apk)" >> $GITHUB_OUTPUT

- name: Upload Debug Build to Artifacts
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 #v4.6.0
with:
name: debug-apk
path: ${{ steps.debugApk.outputs.apkfile }}
53 changes: 45 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,43 +1,80 @@
name: Build and Test
on: [push, pull_request]
permissions:
contents: read
jobs:
build-go:
name: Go CI
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
strategy:
matrix:
go: [1.14, 1.15]
go: ['1.22', '1.23']
steps:
- uses: awalsh128/cache-apt-pkgs-action@5902b33ae29014e6ca012c5d8025d4346556bd40 #v1.4.3
with:
packages: git-restore-mtime libgtk-3-dev libwebkit2gtk-4.0-dev
version: 1.0

- name: Set up Go
uses: actions/setup-go@v2
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 #v5.3.0
with:
go-version: ${{ matrix.go }}

- name: Check out source
uses: actions/checkout@v2
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 #v4.2.2
with:
fetch-depth: 0
# Restore original file modification times for test cache reasons
- name: restore timestamps
run: git restore-mtime
- name: Install Linters
run: "curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(go env GOPATH)/bin v1.30.0"
run: "curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.60.2"
- name: Use test and module cache
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 #v4.2.0
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: go-test-${{ matrix.go }}-${{ github.sha }}
restore-keys: go-test-${{ matrix.go }}

- name: Test
env:
GO111MODULE: "on"
run: |
mkdir -p client/webserver/site/dist
touch -t 2306151245 client/webserver/site/dist/placeholder
./run_tests.sh
build-js:
name: Build JS
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [12.x, 14.x]
node-version: [18.x, 20.x]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 #v4.2.2
- name: Use nodejs ${{ matrix.node-version }}
uses: actions/setup-node@v1
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a #v4.2.0
with:
node-version: ${{ matrix.node-version }}
- name: npm clean-install
working-directory: ./client/webserver/site
run: npm ci
- name: npm run lint
working-directory: ./client/webserver/site
run: npm run lint
- name: npm run build
working-directory: ./client/webserver/site
run: npm run build

lint-docs:
name: Lint Markdown
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 #v4.2.2
- uses: DavidAnson/markdownlint-cli2-action@05f32210e84442804257b2a6f20b273450ec8265 #v19.1.0
continue-on-error: true
with:
globs: |
*.md
docs/**/*.md
38 changes: 38 additions & 0 deletions .github/workflows/release-docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Build and Push Docker Image

on:
release:
types: [published]
workflow_dispatch:

env:
DOCKER_CLI_EXPERIMENTAL: enabled
IMAGE_NAME: decred/dcrdex

jobs:
build-and-push:
runs-on: ubuntu-22.04

steps:
- name: Login to Docker Hub
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Checkout project
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 #v4.2.2

- name: Set up QEMU
uses: docker/setup-qemu-action@53851d14592bedcffcf25ea515637cff71ef929a #v3.3.0

- name: Setup Docker buildx action
uses: docker/setup-buildx-action@6524bf65af31da8d45b59e8c27de4bd072b392f5 #v3.8.0

- name: Build and Push Docker Image
run: |
docker buildx build \
-f client/Dockerfile.release \
--platform linux/arm64,linux/amd64 \
--tag ${{ env.IMAGE_NAME }}:${{ github.ref_name }} \
--output "type=registry" .
39 changes: 36 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.vscode/
.vs/
*.exe
*.log
*.log.*.gz
@@ -10,14 +11,46 @@ debug
/vendor/
*.orig
*.pprof
go.work
go.work.sum
.DS_Store
\.project
dex*key
server/cmd/genkey/genkey
server/cmd/dcrdex/dcrdex
server/cmd/usermatches/usermatches
markets.json
dist/
node_modules/
client/cmd/dexc/dexc
client/cmd/dexcctl/dexcctl
wiki
client/cmd/bisonw/bisonw
client/cmd/bisonw-desktop/bisonw-desktop
client/cmd/bwctl/bwctl
client/cmd/assetseed/assetseed
client/cmd/simnet-trade-tests/simnet-trade-tests
client/cmd/mmbot/mmbot
docs/examples/rpcclient/rpcclient
dex/testing/loadbot/loadbot
bin/
bin-v*/
client/webserver/site/template-builder/template-builder
dex/testing/btc/harnesschain.tar.gz
client/asset/btc/electrum/example/server/server
client/asset/btc/electrum/example/wallet/wallet
**/testdata/fuzz
client/asset/eth/cmd/getgas/getgas
client/asset/eth/cmd/deploy/deploy
client/cmd/bisonw-desktop/pkg/installers
client/cmd/testbinance/testbinance
client/cmd/mmbaltracker/mmbaltracker
server/noderelay/cmd/sourcenode/sourcenode
tatanka/cmd/demo/demo
server/cmd/validatemarkets
client/cmd/translationsreport/translationsreport
client/cmd/translationsreport/worksheets
server/cmd/dexadm/dexadm
client/tor/build
server/cmd/geogame/geogame
internal/cmd/xmrswap/xmrswap
internal/cmd/xmrswap/config.json
internal/libsecp256k1/secp256k1
server/cmd/dcrdex/evm-protocol-overrides.json
26 changes: 26 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
run:
deadline: 10m

output:
formats: colored-line-number

linters:
disable-all: true
enable:
- asciicheck
- bidichk
- durationcheck
- gofmt
- goimports
- gosimple
- govet
- grouper
- ineffassign
- makezero
- nosprintfhostport
- reassign
- rowserrcheck
- sqlclosecheck
- tparallel
- typecheck
- unconvert
8 changes: 8 additions & 0 deletions .markdownlint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"default": true,
"MD007": false,
"MD010": { "code_blocks": false },
"MD013": false,
"MD014": false,
"MD033": false
}
5 changes: 5 additions & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
@@ -12,3 +12,8 @@ Kevin Wilde <kjwilde@hotmail.com>
song50119 <pvsong10@gmail.com>
Fernando Abolafio <fernandohsabolafio@gmail.com>
Victor Oliveira <victor.duarte.oliveira@gmail.com>
Amir Massarwa <amassarwi@gmail.com>
Peter Banik <peter@froggle.org>
Victor Guedes <victorgcramos@gmail.com>
degeri
@martonp
Loading