Merge branch 'development' into hardware-wallet
This commit is contained in:
commit
d33ccfe0cd
|
@ -0,0 +1,105 @@
|
||||||
|
local docker_image = 'registry.oxen.rocks/lokinet-ci-nodejs';
|
||||||
|
|
||||||
|
local apt_get_quiet = 'apt-get -o=Dpkg::Use-Pty=0 -q';
|
||||||
|
|
||||||
|
[
|
||||||
|
{
|
||||||
|
kind: 'pipeline',
|
||||||
|
type: 'docker',
|
||||||
|
name: 'Linux (amd64)',
|
||||||
|
platform: { arch: 'amd64' },
|
||||||
|
steps: [
|
||||||
|
{
|
||||||
|
name: 'build',
|
||||||
|
image: docker_image,
|
||||||
|
environment: {
|
||||||
|
SSH_KEY: { from_secret: 'SSH_KEY' },
|
||||||
|
NODE_OPTIONS: '--openssl-legacy-provider',
|
||||||
|
},
|
||||||
|
commands: [
|
||||||
|
'echo "Building on ${DRONE_STAGE_MACHINE}"',
|
||||||
|
'echo "man-db man-db/auto-update boolean false" | debconf-set-selections',
|
||||||
|
apt_get_quiet + ' update',
|
||||||
|
apt_get_quiet + ' install -y eatmydata',
|
||||||
|
'eatmydata ' + apt_get_quiet + ' dist-upgrade -y',
|
||||||
|
'./tools/download-oxen-files.sh https://oxen.rocks/oxen-io/oxen-core/oxen-stable-linux-LATEST.tar.xz',
|
||||||
|
'npm --version',
|
||||||
|
'node --version',
|
||||||
|
'mkdir -p $CCACHE_DIR/electron-builder',
|
||||||
|
'mkdir -p $CCACHE_DIR/npm',
|
||||||
|
'npm ci --cache $CCACHE_DIR/npm',
|
||||||
|
'ELECTRON_BUILDER_CACHE=$CCACHE_DIR/electron-builder npm --cache $CCACHE_DIR/npm run build',
|
||||||
|
'./tools/ci-drone-static-upload.sh',
|
||||||
|
],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
kind: 'pipeline',
|
||||||
|
type: 'docker',
|
||||||
|
name: 'Windows (x64)',
|
||||||
|
platform: { arch: 'amd64' },
|
||||||
|
steps: [
|
||||||
|
{
|
||||||
|
name: 'build',
|
||||||
|
image: docker_image,
|
||||||
|
environment: {
|
||||||
|
SSH_KEY: { from_secret: 'SSH_KEY' },
|
||||||
|
WINEDEBUG: '-all',
|
||||||
|
NODE_OPTIONS: '--openssl-legacy-provider',
|
||||||
|
},
|
||||||
|
commands: [
|
||||||
|
'echo "Building on ${DRONE_STAGE_MACHINE}"',
|
||||||
|
'echo "man-db man-db/auto-update boolean false" | debconf-set-selections',
|
||||||
|
apt_get_quiet + ' update',
|
||||||
|
apt_get_quiet + ' install -y eatmydata zip',
|
||||||
|
'eatmydata ' + apt_get_quiet + ' dist-upgrade -y',
|
||||||
|
'./tools/download-oxen-files.sh https://oxen.rocks/oxen-io/oxen-core/oxen-stable-win-LATEST.zip',
|
||||||
|
'wine bin/oxend.exe --version',
|
||||||
|
'wine bin/oxen-wallet-rpc.exe --version',
|
||||||
|
'npm --version',
|
||||||
|
'node --version',
|
||||||
|
'mkdir -p $CCACHE_DIR/electron-builder',
|
||||||
|
'mkdir -p $CCACHE_DIR/npm',
|
||||||
|
'npm ci --cache $CCACHE_DIR/npm',
|
||||||
|
'ELECTRON_BUILDER_CACHE=$CCACHE_DIR/electron-builder npm --cache $CCACHE_DIR/npm run windows',
|
||||||
|
'./tools/ci-drone-static-upload.sh',
|
||||||
|
],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
kind: 'pipeline',
|
||||||
|
type: 'exec',
|
||||||
|
name: 'MacOS (unsigned)',
|
||||||
|
platform: { os: 'darwin', arch: 'amd64' },
|
||||||
|
steps: [
|
||||||
|
{
|
||||||
|
name: 'build',
|
||||||
|
environment: {
|
||||||
|
SSH_KEY: { from_secret: 'SSH_KEY' },
|
||||||
|
CSC_LINK: 'tools/macos-codesign-cert.p12',
|
||||||
|
CSC_KEY_PASSWORD: { from_secret: 'CSC_KEY_PASSWORD' },
|
||||||
|
SIGNING_APPLE_ID: { from_secret: 'SIGNING_APPLE_ID' },
|
||||||
|
SIGNING_APP_PASSWORD: { from_secret: 'SIGNING_APP_PASSWORD' },
|
||||||
|
SIGNING_TEAM_ID: 'SUQ8J2PCT7',
|
||||||
|
},
|
||||||
|
commands: [
|
||||||
|
'echo "Building on ${DRONE_STAGE_MACHINE}"',
|
||||||
|
'./tools/download-oxen-files.sh https://oxen.rocks/oxen-io/oxen-core/oxen-stable-macos-LATEST.tar.xz',
|
||||||
|
'if [ -z "$${SIGNING_APPLE_ID}" ]; then export CSC_IDENTITY_AUTO_DISCOVERY=false; fi',
|
||||||
|
'npm --version',
|
||||||
|
'node --version',
|
||||||
|
'mkdir -p $CCACHE_DIR/electron-builder',
|
||||||
|
'mkdir -p $CCACHE_DIR/npm',
|
||||||
|
'npm ci --cache $CCACHE_DIR/npm',
|
||||||
|
'ELECTRON_BUILDER_CACHE=$CCACHE_DIR/electron-builder WINEDEBUG=-all npm --cache $CCACHE_DIR/npm run build',
|
||||||
|
'./tools/ci-drone-static-upload.sh',
|
||||||
|
],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
|
||||||
|
]
|
|
@ -1,89 +0,0 @@
|
||||||
name: Oxen Electron Wallet Build
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
- development
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
os: [windows-latest, macos-latest, ubuntu-latest]
|
|
||||||
steps:
|
|
||||||
- name: Checkout git repo
|
|
||||||
uses: actions/checkout@v1
|
|
||||||
|
|
||||||
# Read node version from `.nvmrc` file
|
|
||||||
- name: Read nvm rc
|
|
||||||
id: nvmrc
|
|
||||||
uses: browniebroke/read-nvmrc-action@v1
|
|
||||||
|
|
||||||
- name: Install node
|
|
||||||
uses: actions/setup-node@v1
|
|
||||||
with:
|
|
||||||
node-version: ${{ steps.nvmrc.outputs.node_version }}
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: npm install
|
|
||||||
|
|
||||||
- name: Download oxend binaries
|
|
||||||
run: ./download-release-bins.sh
|
|
||||||
env:
|
|
||||||
OS: ${{ runner.os }}
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
shell: bash
|
|
||||||
working-directory: ./downloads
|
|
||||||
|
|
||||||
- name: Extract zip binaries
|
|
||||||
if: runner.os == 'Windows'
|
|
||||||
run: unzip latest
|
|
||||||
shell: bash
|
|
||||||
working-directory: ./downloads
|
|
||||||
|
|
||||||
- name: Extract xz binaries
|
|
||||||
if: runner.os != 'Windows'
|
|
||||||
run: tar -xf latest
|
|
||||||
shell: bash
|
|
||||||
working-directory: ./downloads
|
|
||||||
|
|
||||||
- name: Move oxend binaries
|
|
||||||
run: |
|
|
||||||
find ./downloads -type f -name "oxend*" -exec cp '{}' ./bin \;
|
|
||||||
find ./downloads -type f -name "oxen-wallet-rpc*" -exec cp '{}' ./bin \;
|
|
||||||
shell: bash
|
|
||||||
|
|
||||||
- name: Verify binaries
|
|
||||||
run: ls ./bin
|
|
||||||
shell: bash
|
|
||||||
|
|
||||||
- name: Build window and linux binaries
|
|
||||||
if: runner.os != 'macOS'
|
|
||||||
run: npm run build
|
|
||||||
env:
|
|
||||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
|
|
||||||
- name: Build mac binaries
|
|
||||||
if: runner.os == 'macOS'
|
|
||||||
run: npm run build
|
|
||||||
env:
|
|
||||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
CSC_LINK: ${{ secrets.MAC_CERTIFICATE }}
|
|
||||||
CSC_KEY_PASSWORD: ${{ secrets.MAC_CERTIFICATE_PASSWORD }}
|
|
||||||
SIGNING_APPLE_ID: ${{ secrets.SIGNING_APPLE_ID }}
|
|
||||||
SIGNING_APP_PASSWORD: ${{ secrets.SIGNING_APP_PASSWORD }}
|
|
||||||
SIGNING_TEAM_ID: ${{ secrets.SIGNING_TEAM_ID }}
|
|
||||||
|
|
||||||
- name: Remove un-needed artifacts
|
|
||||||
run: rm -r -- ./*/
|
|
||||||
shell: bash
|
|
||||||
working-directory: ./dist/electron/Packaged
|
|
||||||
|
|
||||||
- name: Upload artifacts
|
|
||||||
uses: actions/upload-artifact@v1
|
|
||||||
with:
|
|
||||||
name: ${{ runner.OS }}
|
|
||||||
path: dist/electron/Packaged
|
|
|
@ -1,87 +0,0 @@
|
||||||
name: Oxen Electron Wallet With Dev Binaries
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- dev-bins
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
os: [windows-latest, macos-latest, ubuntu-latest]
|
|
||||||
steps:
|
|
||||||
- name: Checkout git repo
|
|
||||||
uses: actions/checkout@v1
|
|
||||||
|
|
||||||
# Read node version from `.nvmrc` file
|
|
||||||
- name: Read nvm rc
|
|
||||||
id: nvmrc
|
|
||||||
uses: browniebroke/read-nvmrc-action@v1
|
|
||||||
|
|
||||||
- name: Install node
|
|
||||||
uses: actions/setup-node@v1
|
|
||||||
with:
|
|
||||||
node-version: ${{ steps.nvmrc.outputs.node_version }}
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: npm install
|
|
||||||
|
|
||||||
- name: Download oxend binaries
|
|
||||||
run: ./download-dev-bins.sh
|
|
||||||
env:
|
|
||||||
OS: ${{ runner.os }}
|
|
||||||
shell: bash
|
|
||||||
working-directory: ./downloads
|
|
||||||
|
|
||||||
- name: Extract zip binaries
|
|
||||||
if: runner.os == 'Windows'
|
|
||||||
run: unzip latest
|
|
||||||
shell: bash
|
|
||||||
working-directory: ./downloads
|
|
||||||
|
|
||||||
- name: Extract xz binaries
|
|
||||||
if: runner.os != 'Windows'
|
|
||||||
run: tar -xf latest
|
|
||||||
shell: bash
|
|
||||||
working-directory: ./downloads
|
|
||||||
|
|
||||||
- name: Move oxend binaries
|
|
||||||
run: |
|
|
||||||
find ./downloads -type f -name "oxend*" -exec cp '{}' ./bin \;
|
|
||||||
find ./downloads -type f -name "oxen-wallet-rpc*" -exec cp '{}' ./bin \;
|
|
||||||
shell: bash
|
|
||||||
|
|
||||||
- name: Verify binaries
|
|
||||||
run: ls ./bin
|
|
||||||
shell: bash
|
|
||||||
|
|
||||||
- name: Build window and linux binaries
|
|
||||||
if: runner.os != 'macOS'
|
|
||||||
run: npm run build
|
|
||||||
env:
|
|
||||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
|
|
||||||
- name: Build mac binaries
|
|
||||||
if: runner.os == 'macOS'
|
|
||||||
run: npm run build
|
|
||||||
env:
|
|
||||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
CSC_LINK: ${{ secrets.MAC_CERTIFICATE }}
|
|
||||||
CSC_KEY_PASSWORD: ${{ secrets.MAC_CERTIFICATE_PASSWORD }}
|
|
||||||
SIGNING_APPLE_ID: ${{ secrets.SIGNING_APPLE_ID }}
|
|
||||||
SIGNING_APP_PASSWORD: ${{ secrets.SIGNING_APP_PASSWORD }}
|
|
||||||
SIGNING_TEAM_ID: ${{ secrets.SIGNING_TEAM_ID }}
|
|
||||||
|
|
||||||
- name: Remove un-needed artifacts
|
|
||||||
run: rm -r -- ./*/
|
|
||||||
shell: bash
|
|
||||||
working-directory: ./dist/electron/Packaged
|
|
||||||
|
|
||||||
- name: Upload artifacts
|
|
||||||
uses: actions/upload-artifact@v1
|
|
||||||
with:
|
|
||||||
name: ${{ runner.OS }}
|
|
||||||
path: dist/electron/Packaged
|
|
|
@ -1,77 +0,0 @@
|
||||||
name: Oxen Electron Wallet Release
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
os: [windows-latest, macos-latest, ubuntu-latest]
|
|
||||||
steps:
|
|
||||||
- name: Checkout git repo
|
|
||||||
uses: actions/checkout@v1
|
|
||||||
|
|
||||||
# Read node version from `.nvmrc` file
|
|
||||||
- name: Read nvm rc
|
|
||||||
id: nvmrc
|
|
||||||
uses: browniebroke/read-nvmrc-action@v1
|
|
||||||
|
|
||||||
- name: Install node
|
|
||||||
uses: actions/setup-node@v1
|
|
||||||
with:
|
|
||||||
node-version: ${{ steps.nvmrc.outputs.node_version }}
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: npm install
|
|
||||||
|
|
||||||
- name: Download oxend binaries
|
|
||||||
run: ./download-release-bins.sh
|
|
||||||
env:
|
|
||||||
OS: ${{ runner.os }}
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
shell: bash
|
|
||||||
working-directory: ./downloads
|
|
||||||
|
|
||||||
- name: Extract zip binaries
|
|
||||||
if: runner.os == 'Windows'
|
|
||||||
run: unzip latest
|
|
||||||
shell: bash
|
|
||||||
working-directory: ./downloads
|
|
||||||
|
|
||||||
- name: Extract xz binaries
|
|
||||||
if: runner.os != 'Windows'
|
|
||||||
run: tar -xf latest
|
|
||||||
shell: bash
|
|
||||||
working-directory: ./downloads
|
|
||||||
|
|
||||||
- name: Move oxend binaries
|
|
||||||
run: |
|
|
||||||
find ./downloads -type f -name "oxend*" -exec cp '{}' ./bin \;
|
|
||||||
find ./downloads -type f -name "oxen-wallet-rpc*" -exec cp '{}' ./bin \;
|
|
||||||
shell: bash
|
|
||||||
|
|
||||||
- name: Verify binaries
|
|
||||||
run: ls ./bin
|
|
||||||
shell: bash
|
|
||||||
|
|
||||||
- name: Publish window and linux binaries
|
|
||||||
if: runner.os != 'macOS'
|
|
||||||
run: npm run release
|
|
||||||
env:
|
|
||||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
|
|
||||||
- name: Publish mac binaries
|
|
||||||
if: runner.os == 'macOS'
|
|
||||||
run: npm run release
|
|
||||||
env:
|
|
||||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
CSC_LINK: ${{ secrets.MAC_CERTIFICATE }}
|
|
||||||
CSC_KEY_PASSWORD: ${{ secrets.MAC_CERTIFICATE_PASSWORD }}
|
|
||||||
SIGNING_APPLE_ID: ${{ secrets.SIGNING_APPLE_ID }}
|
|
||||||
SIGNING_APP_PASSWORD: ${{ secrets.SIGNING_APP_PASSWORD }}
|
|
||||||
SIGNING_TEAM_ID: ${{ secrets.SIGNING_TEAM_ID }}
|
|
61
BUILDING.md
61
BUILDING.md
|
@ -1,42 +1,43 @@
|
||||||
# Building
|
# Building
|
||||||
|
|
||||||
Building oxen electron wallet binaries is done using github actions. Windows and linux binaries will build right out of the box but there are some extra steps needed for Mac OS
|
Set up the supported versions of npm/node/etc.:
|
||||||
|
|
||||||
|
nvm use
|
||||||
|
|
||||||
|
## Linux, Windows
|
||||||
|
|
||||||
|
npm run build
|
||||||
|
|
||||||
## MacOS
|
## MacOS
|
||||||
|
|
||||||
The build script for Mac OS requires you to have a valid `Developer ID Application` certificate. Without this the build script cannot sign and notarize the mac binary which is needed for Catalina 10.15 and above.
|
If you don't care about signing (i.e. you are not going to distribute) then you should be able to
|
||||||
If you would like to disable this then comment out `"afterSign": "build/notarize.js",` in package.json.
|
simply `npm run build`.
|
||||||
|
|
||||||
You will also need an [App-specific password](https://support.apple.com/en-al/HT204397) for the apple account you wish to notarize with
|
When you want to distribute the app, however, you need to do a bunch of crap to satisfy Apple's
|
||||||
|
arbitrary security theatre Rube Goldberg machine that purports to keep users safe but in reality is
|
||||||
|
designed to further Apple lock-in control of the Apple ecosystem.
|
||||||
|
|
||||||
### Setup
|
1. You have to pay Apple money (every year) to get a developer account.
|
||||||
|
2. You need a `Developer ID Application` certificate, created and signed from the Apple, and loaded
|
||||||
|
into your system keychain. `security find-identity -v` should show it.
|
||||||
|
3. You need to create an [App-specific password](https://support.apple.com/en-al/HT204397) for the
|
||||||
|
Apple developer account under which you are notarizing.
|
||||||
|
4. In the project root, create a `.env` file with contents:
|
||||||
|
|
||||||
Once you have your `Developer ID Application` you need to export it into a `.p12` file. Keep a note of the password used to encrypt this file as it will be needed later.
|
SIGNING_APPLE_ID=your-developer-id@example.com
|
||||||
|
SIGNING_APP_PASSWORD=app-specific-password
|
||||||
|
|
||||||
We need to Base64 encode this file, so run the following command:
|
This password can be plaintext if absolutely needed (e.g. in a CI job) but should be a [keychain
|
||||||
|
reference](https://github.com/electron/electron-notarize#safety-when-using-appleidpassword) such
|
||||||
|
as `@keychain:some-token` for better security where feasible.
|
||||||
|
|
||||||
```
|
- If you have multiple ids and need to use a particular signing team ID you can add:
|
||||||
base64 -i certificate.p12 -o encoded.txt
|
|
||||||
```
|
|
||||||
|
|
||||||
#### On GitHub:
|
SIGNING_TEAM_ID=TEAMIDXYZ1
|
||||||
|
|
||||||
1. Navigate to the main page of the repository.
|
5. If building from a remote connection (e.g. ssh'd into a mac) then unlock the keychain for that
|
||||||
2. Under your repository name, click **Settings**.
|
session by running `security unlock`.
|
||||||
3. In the left sidebar, click **Secrets**.
|
|
||||||
4. Add the following secrets:
|
With all of that set up, your `npm run build` should produce a signed and notarized installer.
|
||||||
1. Certificate
|
Hopefully. Maybe. Sometimes Apple's servers are broken and you might have to try again. But don't
|
||||||
- Name: `MAC_CERTIFICATE`
|
worry, Apple's incompetence around signing makes everything more secure because... reasons.
|
||||||
- Value: The encoded Base64 certificate
|
|
||||||
2. Certificate password
|
|
||||||
- Name: `MAC_CERTIFICATE_PASSWORD`
|
|
||||||
- Value: The password that was set when the certificate was exported.
|
|
||||||
3. Apple ID
|
|
||||||
- Name: `SIGNING_APPLE_ID`
|
|
||||||
- Value: The apple id (email) to use for signing
|
|
||||||
4. Apple Password
|
|
||||||
- Name: `SIGNING_APP_PASSWORD`
|
|
||||||
- Value: The app-specific password that was generated for the apple id
|
|
||||||
5. Team ID (Optional)
|
|
||||||
- Name: `SIGNING_TEAM_ID`
|
|
||||||
- Value: The apple team id if you're sigining the application for a team
|
|
||||||
|
|
|
@ -36,11 +36,11 @@ exports.default = async function notarizing(context) {
|
||||||
}
|
}
|
||||||
|
|
||||||
const options = {
|
const options = {
|
||||||
appBundleId: "com.oxen.electron-wallet",
|
tool: "notarytool",
|
||||||
appPath: `${appOutDir}/${appName}.app`,
|
appPath: `${appOutDir}/${appName}.app`,
|
||||||
appleId: SIGNING_APPLE_ID,
|
appleId: SIGNING_APPLE_ID,
|
||||||
appleIdPassword: SIGNING_APP_PASSWORD
|
appleIdPassword: SIGNING_APP_PASSWORD
|
||||||
};
|
};
|
||||||
if (!isEmpty(SIGNING_TEAM_ID)) options.ascProvider = SIGNING_TEAM_ID;
|
if (!isEmpty(SIGNING_TEAM_ID)) options.teamId = SIGNING_TEAM_ID;
|
||||||
return notarize(options);
|
return notarize(options);
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,32 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
if [ -z "$OS" ]; then
|
|
||||||
echo "OS must be set"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -z "$RENAME" ]; then
|
|
||||||
RENAME="latest"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$OS" == "Linux" ]; then
|
|
||||||
ASSET_URL="https://oxen.rocks/oxen-io/oxen-core/oxen-dev-linux-LATEST.tar.xz"
|
|
||||||
elif [ "$OS" == "Windows" ]; then
|
|
||||||
ASSET_URL="https://oxen.rocks/oxen-io/oxen-core/oxen-dev-win-LATEST.zip"
|
|
||||||
elif [ "$OS" == "macOS" ]; then
|
|
||||||
ASSET_URL="https://oxen.rocks/oxen-io/oxen-core/oxen-dev-macos-LATEST.tar.xz"
|
|
||||||
else
|
|
||||||
echo "OS must be Linux, Windows or macOS"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "About to download the binaries"
|
|
||||||
|
|
||||||
curl -sL --fail \
|
|
||||||
-H "Accept: application/octet-stream" \
|
|
||||||
-o "${RENAME}" \
|
|
||||||
"$ASSET_URL"
|
|
||||||
|
|
||||||
echo "Oxen binaries downloaded"
|
|
|
@ -1,40 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
# Source from: https://github.com/houqp/download-release-assets-action
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
if [ -z "$OS" ]; then
|
|
||||||
echo "OS must be set"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -z "$RENAME" ]; then
|
|
||||||
RENAME="latest"
|
|
||||||
fi
|
|
||||||
|
|
||||||
REPO="oxen-io/oxen-core"
|
|
||||||
RELEASE="latest"
|
|
||||||
|
|
||||||
if [ "$OS" == "Linux" ]; then
|
|
||||||
FILE_NAME_REGEX="linux"
|
|
||||||
elif [ "$OS" == "Windows" ]; then
|
|
||||||
FILE_NAME_REGEX="win"
|
|
||||||
elif [ "$OS" == "macOS" ]; then
|
|
||||||
FILE_NAME_REGEX="macos"
|
|
||||||
else
|
|
||||||
echo "OS must be Linux, Windows or macOS"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
ASSET_URL=$(curl -sL --fail \
|
|
||||||
-H "Accept: application/vnd.github.v3+json" \
|
|
||||||
-H "Authorization: Bearer ${GITHUB_TOKEN}" \
|
|
||||||
"https://api.github.com/repos/${REPO}/releases/${RELEASE}" \
|
|
||||||
| jq -r ".assets | .[] | select(.name | test(\"${FILE_NAME_REGEX}\")) | .url")
|
|
||||||
|
|
||||||
curl -sL --fail \
|
|
||||||
-H "Accept: application/octet-stream" \
|
|
||||||
-H "Authorization: Bearer ${GITHUB_TOKEN}" \
|
|
||||||
-o "${RENAME}" \
|
|
||||||
"$ASSET_URL"
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "oxen-electron-wallet",
|
"name": "oxen-electron-wallet",
|
||||||
"version": "1.6.0",
|
"version": "1.7.2",
|
||||||
"description": "Modern GUI interface for Oxen Currency",
|
"description": "Modern GUI interface for Oxen Currency",
|
||||||
"productName": "Oxen Electron Wallet",
|
"productName": "Oxen Electron Wallet",
|
||||||
"repository": {
|
"repository": {
|
||||||
|
@ -16,7 +16,7 @@
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "quasar dev -m electron",
|
"dev": "quasar dev -m electron",
|
||||||
"build": "quasar build -m electron --publish=never",
|
"build": "quasar build -m electron --publish=never",
|
||||||
"release": "quasar build -m electron --publish=always",
|
"windows": "quasar build -m electron --publish=never -T win",
|
||||||
"lint": "eslint --fix .",
|
"lint": "eslint --fix .",
|
||||||
"format": "prettier --write \"**/*.+(js|jsx|json|yml|yaml|css|md|vue)\"",
|
"format": "prettier --write \"**/*.+(js|jsx|json|yml|yaml|css|md|vue)\"",
|
||||||
"ready": "npm run lint && npm run format"
|
"ready": "npm run lint && npm run format"
|
||||||
|
@ -48,7 +48,7 @@
|
||||||
"devtron": "^1.4.0",
|
"devtron": "^1.4.0",
|
||||||
"dotenv": "^8.1.0",
|
"dotenv": "^8.1.0",
|
||||||
"electron": "^4.1.1",
|
"electron": "^4.1.1",
|
||||||
"electron-builder": "^22.4.1",
|
"electron-builder": "^23.0.3",
|
||||||
"electron-debug": "^2.1.0",
|
"electron-debug": "^2.1.0",
|
||||||
"electron-devtools-installer": "^2.2.4",
|
"electron-devtools-installer": "^2.2.4",
|
||||||
"electron-notarize": "^0.1.1",
|
"electron-notarize": "^0.1.1",
|
||||||
|
@ -63,7 +63,6 @@
|
||||||
"eslint-plugin-vue": "^5.2.3",
|
"eslint-plugin-vue": "^5.2.3",
|
||||||
"husky": "^4.2.3",
|
"husky": "^4.2.3",
|
||||||
"lint-staged": "^10.0.8",
|
"lint-staged": "^10.0.8",
|
||||||
"node-sass": "^4.13.1",
|
|
||||||
"prettier": "^1.19.1",
|
"prettier": "^1.19.1",
|
||||||
"sass-loader": "^7.1.0",
|
"sass-loader": "^7.1.0",
|
||||||
"strip-ansi": "^3.0.1"
|
"strip-ansi": "^3.0.1"
|
||||||
|
|
|
@ -158,16 +158,31 @@ module.exports = function() {
|
||||||
|
|
||||||
appId: "com.oxen.electron-wallet",
|
appId: "com.oxen.electron-wallet",
|
||||||
productName: "Oxen Electron Wallet",
|
productName: "Oxen Electron Wallet",
|
||||||
copyright: "Copyright © 2018-2021 Oxen, 2018 Ryo Currency Project",
|
copyright: "Copyright © 2018-2022 Oxen, 2018 Ryo Currency Project",
|
||||||
afterSign: "build/notarize.js",
|
afterSign: "build/notarize.js",
|
||||||
artifactName: "oxen-electron-wallet-${version}-${os}.${ext}",
|
artifactName: "oxen-electron-wallet-${version}-${os}.${ext}",
|
||||||
publish: "github",
|
publish: "github",
|
||||||
|
|
||||||
linux: {
|
linux: {
|
||||||
target: ["AppImage", "deb"],
|
target: ["AppImage", "deb"],
|
||||||
icon: "src-electron/icon.png",
|
icon: "oxen-electron-wallet.png",
|
||||||
category: "Finance"
|
category: "Finance"
|
||||||
},
|
},
|
||||||
|
// see https://www.electron.build/configuration/linux#debian-package-options
|
||||||
|
deb: {
|
||||||
|
depends: [
|
||||||
|
"libgtk-3-0",
|
||||||
|
"libnotify4",
|
||||||
|
"libnss3",
|
||||||
|
"libxss1",
|
||||||
|
"libxtst6",
|
||||||
|
"xdg-utils",
|
||||||
|
"libatspi2.0-0",
|
||||||
|
"libuuid1",
|
||||||
|
"libsecret-1-0",
|
||||||
|
"libappindicator3-1 | libayatana-appindicator3-1"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
|
||||||
mac: {
|
mac: {
|
||||||
// We need zip for auto-updating
|
// We need zip for auto-updating
|
||||||
|
|
|
@ -13,7 +13,7 @@ const path = require("upath");
|
||||||
* The reason we are setting it here is that the path needs to be evaluated at runtime
|
* The reason we are setting it here is that the path needs to be evaluated at runtime
|
||||||
*/
|
*/
|
||||||
if (process.env.PROD) {
|
if (process.env.PROD) {
|
||||||
global.__statics = path.join(__dirname, "statics").replace(/\\/g, "\\\\");
|
global.__statics = path.join(__dirname, "").replace(/\\/g, "\\\\");
|
||||||
global.__ryo_bin = path.join(__dirname, "..", "bin").replace(/\\/g, "\\\\");
|
global.__ryo_bin = path.join(__dirname, "..", "bin").replace(/\\/g, "\\\\");
|
||||||
} else {
|
} else {
|
||||||
global.__ryo_bin = path.join(process.cwd(), "bin").replace(/\\/g, "\\\\");
|
global.__ryo_bin = path.join(process.cwd(), "bin").replace(/\\/g, "\\\\");
|
||||||
|
|
|
@ -288,7 +288,7 @@ export class Backend {
|
||||||
if (params.type === "tx") {
|
if (params.type === "tx") {
|
||||||
path = "tx";
|
path = "tx";
|
||||||
} else if (params.type === "service_node") {
|
} else if (params.type === "service_node") {
|
||||||
path = "service_node";
|
path = "sn";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (path) {
|
if (path) {
|
||||||
|
|
|
@ -25,6 +25,8 @@ export class WalletRPC {
|
||||||
password_hash: null,
|
password_hash: null,
|
||||||
balance: null,
|
balance: null,
|
||||||
unlocked_balance: null,
|
unlocked_balance: null,
|
||||||
|
accrued_balance: null,
|
||||||
|
accrued_balance_next_payout: null,
|
||||||
onsRecords: []
|
onsRecords: []
|
||||||
};
|
};
|
||||||
this.isRPCSyncing = false;
|
this.isRPCSyncing = false;
|
||||||
|
@ -777,6 +779,8 @@ export class WalletRPC {
|
||||||
address: "",
|
address: "",
|
||||||
balance: 0,
|
balance: 0,
|
||||||
unlocked_balance: 0,
|
unlocked_balance: 0,
|
||||||
|
accrued_balance: 0,
|
||||||
|
accrued_balance_next_payout: 0,
|
||||||
height: 0,
|
height: 0,
|
||||||
view_only: false
|
view_only: false
|
||||||
},
|
},
|
||||||
|
@ -797,6 +801,9 @@ export class WalletRPC {
|
||||||
} else if (n.method == "getbalance") {
|
} else if (n.method == "getbalance") {
|
||||||
wallet.info.balance = n.result.balance;
|
wallet.info.balance = n.result.balance;
|
||||||
wallet.info.unlocked_balance = n.result.unlocked_balance;
|
wallet.info.unlocked_balance = n.result.unlocked_balance;
|
||||||
|
wallet.info.accrued_balance = n.result.accrued_balance;
|
||||||
|
wallet.info.accrued_balance_next_payout =
|
||||||
|
n.result.accrued_balance_next_payout;
|
||||||
} else if (n.method == "query_key") {
|
} else if (n.method == "query_key") {
|
||||||
wallet.secret[n.params.key_type] = n.result.key;
|
wallet.secret[n.params.key_type] = n.result.key;
|
||||||
if (n.params.key_type == "spend_key") {
|
if (n.params.key_type == "spend_key") {
|
||||||
|
@ -972,7 +979,10 @@ export class WalletRPC {
|
||||||
} else if (n.method == "getbalance") {
|
} else if (n.method == "getbalance") {
|
||||||
if (
|
if (
|
||||||
this.wallet_state.balance == n.result.balance &&
|
this.wallet_state.balance == n.result.balance &&
|
||||||
this.wallet_state.unlocked_balance == n.result.unlocked_balance
|
this.wallet_state.unlocked_balance == n.result.unlocked_balance &&
|
||||||
|
this.wallet_state.accrued_balance == n.result.accrued_balance &&
|
||||||
|
this.wallet_state.accrued_balance_next_payout ==
|
||||||
|
n.result.accrued_balance_next_payout
|
||||||
) {
|
) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -980,6 +990,10 @@ export class WalletRPC {
|
||||||
this.wallet_state.balance = wallet.info.balance = n.result.balance;
|
this.wallet_state.balance = wallet.info.balance = n.result.balance;
|
||||||
this.wallet_state.unlocked_balance = wallet.info.unlocked_balance =
|
this.wallet_state.unlocked_balance = wallet.info.unlocked_balance =
|
||||||
n.result.unlocked_balance;
|
n.result.unlocked_balance;
|
||||||
|
this.wallet_state.accrued_balance = wallet.info.accrued_balance =
|
||||||
|
n.result.accrued_balance;
|
||||||
|
this.wallet_state.accrued_balance_next_payout = wallet.info.accrued_balance_next_payout =
|
||||||
|
n.result.accrued_balance_next_payout;
|
||||||
this.sendGateway("set_wallet_data", {
|
this.sendGateway("set_wallet_data", {
|
||||||
info: wallet.info
|
info: wallet.info
|
||||||
});
|
});
|
||||||
|
@ -2162,7 +2176,10 @@ export class WalletRPC {
|
||||||
info: {
|
info: {
|
||||||
address: data[0].result.address,
|
address: data[0].result.address,
|
||||||
balance: data[1].result.balance,
|
balance: data[1].result.balance,
|
||||||
unlocked_balance: data[1].result.unlocked_balance
|
unlocked_balance: data[1].result.unlocked_balance,
|
||||||
|
accrued_balance: data[1].result.accrued_balance,
|
||||||
|
accrued_balance_next_payout:
|
||||||
|
data[1].result.accrued_balance_next_payout
|
||||||
// num_unspent_outputs: data[1].result.num_unspent_outputs
|
// num_unspent_outputs: data[1].result.num_unspent_outputs
|
||||||
},
|
},
|
||||||
address_list: {
|
address_list: {
|
||||||
|
@ -2933,6 +2950,8 @@ export class WalletRPC {
|
||||||
password_hash: null,
|
password_hash: null,
|
||||||
balance: null,
|
balance: null,
|
||||||
unlocked_balance: null,
|
unlocked_balance: null,
|
||||||
|
accrued_balance: null,
|
||||||
|
accrued_balance_next_payout: null,
|
||||||
onsRecords: []
|
onsRecords: []
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,35 @@
|
||||||
|
<template>
|
||||||
|
<span> {{ value }} </span>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: "FormatNextPayout",
|
||||||
|
props: {
|
||||||
|
payoutBlock: {
|
||||||
|
type: Number,
|
||||||
|
required: true
|
||||||
|
},
|
||||||
|
currentBlock: {
|
||||||
|
type: Number,
|
||||||
|
required: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
value() {
|
||||||
|
console.log(this.payoutBlock);
|
||||||
|
console.log(this.currentBlock);
|
||||||
|
if (this.payoutBlock == 0) return "";
|
||||||
|
|
||||||
|
let blocks = this.payoutBlock - this.currentBlock;
|
||||||
|
console.log(this.currentBlock);
|
||||||
|
|
||||||
|
if (blocks > 720) return (blocks / 720).toFixed(1) + " days";
|
||||||
|
else if (blocks > 30) return (blocks / 30).toFixed(1) + " hours";
|
||||||
|
else return blocks * 2 + " minutes";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style></style>
|
|
@ -32,7 +32,7 @@
|
||||||
<img class="q-mb-md" src="oxen.svg" height="42" />
|
<img class="q-mb-md" src="oxen.svg" height="42" />
|
||||||
|
|
||||||
<p class="q-my-sm">Wallet Version: v{{ version }}</p>
|
<p class="q-my-sm">Wallet Version: v{{ version }}</p>
|
||||||
<p class="q-my-sm">Deaemon Version: v{{ daemonVersion }}</p>
|
<p class="q-my-sm">Daemon Version: v{{ daemonVersion }}</p>
|
||||||
<p class="q-my-sm">Copyright (c) 2018-2021, Oxen</p>
|
<p class="q-my-sm">Copyright (c) 2018-2021, Oxen</p>
|
||||||
<p class="q-my-sm">Copyright (c) 2018, Ryo Currency Project</p>
|
<p class="q-my-sm">Copyright (c) 2018, Ryo Currency Project</p>
|
||||||
<p class="q-my-sm">All rights reserved.</p>
|
<p class="q-my-sm">All rights reserved.</p>
|
||||||
|
|
|
@ -40,7 +40,7 @@ export default {
|
||||||
ons_status: state => state.gateway.ons_status,
|
ons_status: state => state.gateway.ons_status,
|
||||||
unlocked_balance: state => state.gateway.wallet.info.unlocked_balance,
|
unlocked_balance: state => state.gateway.wallet.info.unlocked_balance,
|
||||||
disable_submit_button() {
|
disable_submit_button() {
|
||||||
const minBalance = this.updating ? 0.05 : 8;
|
const minBalance = this.updating ? 0.05 : 7.1;
|
||||||
return this.unlocked_balance < minBalance * 1e9;
|
return this.unlocked_balance < minBalance * 1e9;
|
||||||
},
|
},
|
||||||
submit_label() {
|
submit_label() {
|
||||||
|
|
|
@ -245,7 +245,7 @@ export default {
|
||||||
}),
|
}),
|
||||||
methods: {
|
methods: {
|
||||||
openUserWalletInfo(contributorAddress) {
|
openUserWalletInfo(contributorAddress) {
|
||||||
const url = `https://www.lokisn.com/user/${contributorAddress}`;
|
const url = `https://www.oxensn.com/user/${contributorAddress}`;
|
||||||
this.$gateway.send("core", "open_url", {
|
this.$gateway.send("core", "open_url", {
|
||||||
url
|
url
|
||||||
});
|
});
|
||||||
|
|
|
@ -8,19 +8,46 @@
|
||||||
<div class="row justify-center">
|
<div class="row justify-center">
|
||||||
<div class="funds column items-center">
|
<div class="funds column items-center">
|
||||||
<div class="balance">
|
<div class="balance">
|
||||||
<div class="text">
|
<q-btn-toggle
|
||||||
<span>{{ $t("strings.oxenBalance") }}</span>
|
v-model="balancestakeselector"
|
||||||
</div>
|
text-color="white"
|
||||||
|
toggle-text-color="primary"
|
||||||
|
flat
|
||||||
|
:options="[
|
||||||
|
{
|
||||||
|
label: $t('strings.oxenBalance'),
|
||||||
|
value: 'balance'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: $t('strings.stake'),
|
||||||
|
value: 'stake'
|
||||||
|
}
|
||||||
|
]"
|
||||||
|
/>
|
||||||
<div class="value">
|
<div class="value">
|
||||||
<span><FormatOxen :amount="info.balance"/></span>
|
<span><FormatOxen :amount="info.balance"/></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row unlocked">
|
<div v-if="balancestakeselector != 'stake'" class="row unlocked">
|
||||||
<span
|
<span
|
||||||
>{{ $t("strings.oxenUnlockedShort") }}:
|
>{{ $t("strings.oxenUnlockedShort") }}:
|
||||||
<FormatOxen :amount="info.unlocked_balance"
|
<FormatOxen :amount="info.unlocked_balance"
|
||||||
/></span>
|
/></span>
|
||||||
</div>
|
</div>
|
||||||
|
<div v-if="balancestakeselector == 'stake'" class="row unlocked">
|
||||||
|
<span v-if="info.accrued_balance > 0"
|
||||||
|
>{{ $t("strings.oxenAccumulatedRewards") }}:
|
||||||
|
<FormatOxen :amount="info.accrued_balance" />•
|
||||||
|
{{ $t("strings.nextPayout") }}:
|
||||||
|
<FormatNextPayout
|
||||||
|
:payout-block="info.accrued_balance_next_payout"
|
||||||
|
:current-block="info.height"
|
||||||
|
/>
|
||||||
|
</span>
|
||||||
|
<span v-if="info.accrued_balance == 0">
|
||||||
|
No accumulated rewards from staking
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="wallet-address row justify-center items-center">
|
<div class="wallet-address row justify-center items-center">
|
||||||
|
@ -34,19 +61,26 @@
|
||||||
<script>
|
<script>
|
||||||
import { mapState } from "vuex";
|
import { mapState } from "vuex";
|
||||||
import FormatOxen from "components/format_oxen";
|
import FormatOxen from "components/format_oxen";
|
||||||
|
import FormatNextPayout from "components/format_next_payout";
|
||||||
import WalletSettings from "components/menus/wallet_settings";
|
import WalletSettings from "components/menus/wallet_settings";
|
||||||
import CopyIcon from "components/icons/copy_icon";
|
import CopyIcon from "components/icons/copy_icon";
|
||||||
export default {
|
export default {
|
||||||
name: "WalletDetails",
|
name: "WalletDetails",
|
||||||
components: {
|
components: {
|
||||||
FormatOxen,
|
FormatOxen,
|
||||||
|
FormatNextPayout,
|
||||||
WalletSettings,
|
WalletSettings,
|
||||||
CopyIcon
|
CopyIcon
|
||||||
},
|
},
|
||||||
computed: mapState({
|
computed: mapState({
|
||||||
theme: state => state.gateway.app.config.appearance.theme,
|
theme: state => state.gateway.app.config.appearance.theme,
|
||||||
info: state => state.gateway.wallet.info
|
info: state => state.gateway.wallet.info
|
||||||
})
|
}),
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
balancestakeselector: "balance"
|
||||||
|
};
|
||||||
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
@ -423,8 +423,7 @@ footer,
|
||||||
|
|
||||||
|
|
||||||
.header-popover {
|
.header-popover {
|
||||||
background: $primary;
|
background: white;
|
||||||
color: white;
|
|
||||||
max-width: 250px !important;
|
max-width: 250px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@ export class Gateway extends EventEmitter {
|
||||||
|
|
||||||
let theme = LocalStorage.has("theme")
|
let theme = LocalStorage.has("theme")
|
||||||
? LocalStorage.getItem("theme")
|
? LocalStorage.getItem("theme")
|
||||||
: "dark";
|
: "light";
|
||||||
this.app.store.commit("gateway/set_app_data", {
|
this.app.store.commit("gateway/set_app_data", {
|
||||||
config: {
|
config: {
|
||||||
appearance: {
|
appearance: {
|
||||||
|
|
|
@ -504,6 +504,7 @@ export default {
|
||||||
destinationUnknown: "Destination Unknown",
|
destinationUnknown: "Destination Unknown",
|
||||||
editAddressBookEntry: "Edit address book entry",
|
editAddressBookEntry: "Edit address book entry",
|
||||||
expirationHeight: "Expiration height",
|
expirationHeight: "Expiration height",
|
||||||
|
nextPayout: "Next payout",
|
||||||
ons: {
|
ons: {
|
||||||
sessionID: "Session ID",
|
sessionID: "Session ID",
|
||||||
wallet: "Wallet Address",
|
wallet: "Wallet Address",
|
||||||
|
@ -521,6 +522,7 @@ export default {
|
||||||
oxenBalance: "Balance",
|
oxenBalance: "Balance",
|
||||||
lokinetNameDescription:
|
lokinetNameDescription:
|
||||||
"Purchase or update a name on Lokinet. If you purchase a name it may take a minute or two for it to show up in the list. To learn more about lokinet visit: ",
|
"Purchase or update a name on Lokinet. If you purchase a name it may take a minute or two for it to show up in the list. To learn more about lokinet visit: ",
|
||||||
|
oxenAccumulatedRewards: "Accumulated rewards",
|
||||||
oxenUnlockedBalance: "Unlocked balance",
|
oxenUnlockedBalance: "Unlocked balance",
|
||||||
oxenUnlockedShort: "Unlocked",
|
oxenUnlockedShort: "Unlocked",
|
||||||
me: "Me",
|
me: "Me",
|
||||||
|
@ -578,6 +580,7 @@ export default {
|
||||||
signAndVerifyDescription:
|
signAndVerifyDescription:
|
||||||
"Sign data with your primary address's private key or verify a signature against a public address.",
|
"Sign data with your primary address's private key or verify a signature against a public address.",
|
||||||
spendKey: "Spend key",
|
spendKey: "Spend key",
|
||||||
|
stake: "Staking",
|
||||||
startingDaemon: "Starting daemon",
|
startingDaemon: "Starting daemon",
|
||||||
startingWallet: "Starting wallet",
|
startingWallet: "Starting wallet",
|
||||||
switchToDateSelect: "Switch to date select",
|
switchToDateSelect: "Switch to date select",
|
||||||
|
|
|
@ -14,7 +14,7 @@ export default {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
const MAX_NUMBER_OF_CONTRIBUTORS = 4;
|
const MAX_NUMBER_OF_CONTRIBUTORS = 10;
|
||||||
// If we have a reserved spot then that is our minimum:
|
// If we have a reserved spot then that is our minimum:
|
||||||
let minContributionAtomicUnits = this.getUnfilledReservedContribution(node, myaddr);
|
let minContributionAtomicUnits = this.getUnfilledReservedContribution(node, myaddr);
|
||||||
// Otherwise we can contribute our fair share of whatever amount is left (i.e. REMAINING/N
|
// Otherwise we can contribute our fair share of whatever amount is left (i.e. REMAINING/N
|
||||||
|
@ -22,8 +22,13 @@ export default {
|
||||||
if (minContributionAtomicUnits === 0 && node.contributors.length < MAX_NUMBER_OF_CONTRIBUTORS) {
|
if (minContributionAtomicUnits === 0 && node.contributors.length < MAX_NUMBER_OF_CONTRIBUTORS) {
|
||||||
const openContributionRemaining = this.openForContribution(node);
|
const openContributionRemaining = this.openForContribution(node);
|
||||||
|
|
||||||
|
let contributors_length = 0;
|
||||||
|
for (const contributor of node.contributors) {
|
||||||
|
contributors_length = contributors_length + contributor.locked_contributions.length;
|
||||||
|
}
|
||||||
|
|
||||||
minContributionAtomicUnits = openContributionRemaining /
|
minContributionAtomicUnits = openContributionRemaining /
|
||||||
(MAX_NUMBER_OF_CONTRIBUTORS - node.contributors.length);
|
(MAX_NUMBER_OF_CONTRIBUTORS - contributors_length);
|
||||||
}
|
}
|
||||||
|
|
||||||
const minContributionOxen = minContributionAtomicUnits / 1e9;
|
const minContributionOxen = minContributionAtomicUnits / 1e9;
|
||||||
|
|
|
@ -187,11 +187,9 @@ export default {
|
||||||
},
|
},
|
||||||
cancel: {
|
cancel: {
|
||||||
flat: true,
|
flat: true,
|
||||||
label: this.$t("dialog.buttons.cancel"),
|
label: this.$t("dialog.buttons.cancel")
|
||||||
color: this.theme === "dark" ? "white" : "dark"
|
|
||||||
},
|
},
|
||||||
dark: this.theme == "dark",
|
color: "primary"
|
||||||
color: "positive"
|
|
||||||
});
|
});
|
||||||
passwordPromise
|
passwordPromise
|
||||||
.onOk(() => {
|
.onOk(() => {
|
||||||
|
|
|
@ -10,6 +10,8 @@ export const resetWalletData = state => {
|
||||||
height: 0,
|
height: 0,
|
||||||
balance: 0,
|
balance: 0,
|
||||||
unlocked_balance: 0,
|
unlocked_balance: 0,
|
||||||
|
accrued_balance: 0,
|
||||||
|
accrued_balance_next_payout: 0,
|
||||||
view_only: false
|
view_only: false
|
||||||
},
|
},
|
||||||
secret: {
|
secret: {
|
||||||
|
|
|
@ -35,6 +35,9 @@ export default {
|
||||||
unlocked_balance: 0,
|
unlocked_balance: 0,
|
||||||
view_only: false,
|
view_only: false,
|
||||||
hardware_wallet: false
|
hardware_wallet: false
|
||||||
|
accrued_balance: 0,
|
||||||
|
accrued_balance_next_payout: 0,
|
||||||
|
|
||||||
},
|
},
|
||||||
secret: {
|
secret: {
|
||||||
mnemonic: "",
|
mnemonic: "",
|
||||||
|
|
|
@ -0,0 +1,78 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# Script used with Drone CI to upload build artifacts (because specifying all this in
|
||||||
|
# .drone.jsonnet is too painful).
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
set -o errexit
|
||||||
|
|
||||||
|
if [ -z "$SSH_KEY" ]; then
|
||||||
|
echo -e "\n\n\n\e[31;1mUnable to upload artifact: SSH_KEY not set\e[0m"
|
||||||
|
# Just warn but don't fail, so that this doesn't trigger a build failure for untrusted builds
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "$SSH_KEY" >ssh_key
|
||||||
|
|
||||||
|
set -o xtrace # Don't start tracing until *after* we write the ssh key
|
||||||
|
|
||||||
|
chmod 600 ssh_key
|
||||||
|
|
||||||
|
branch_or_tag=${DRONE_BRANCH:-${DRONE_TAG:-unknown}}
|
||||||
|
|
||||||
|
upload_to="oxen.rocks/${DRONE_REPO// /_}/${branch_or_tag// /_}"
|
||||||
|
|
||||||
|
MACOS_APP=${MACOS_APP:-"dist/electron/Packaged/mac/Oxen Electron Wallet.app"}
|
||||||
|
if [ "$(uname -s)" == "Darwin" ]; then
|
||||||
|
if codesign -v "$MACOS_APP"; then
|
||||||
|
echo -e "\e[32;1mApp is codesigned!"
|
||||||
|
else
|
||||||
|
echo -e "\e[33;1mApp is not codesigned; renaming to -unsigned"
|
||||||
|
if [ -z "$MAC_BUILD_IS_CODESIGNED" ]; then
|
||||||
|
for f in dist/electron/Packaged/{oxen-electron-wallet,latest}*-mac*; do
|
||||||
|
if [[ $f = *\** ]]; then # Unexpanded glob means it didn't match anything
|
||||||
|
echo "Did not find any files matching $f"
|
||||||
|
fi
|
||||||
|
newname="${f/mac/mac-unsigned}"
|
||||||
|
mv "$f" "$newname"
|
||||||
|
if [[ "$f" = *.yml ]]; then
|
||||||
|
sed -ie 's/-mac/-mac-unsigned/' "$newname"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
puts=
|
||||||
|
for f in dist/electron/Packaged/{oxen-electron-wallet-*,latest*.yml}; do
|
||||||
|
if [[ $f = *\** ]]; then # Unexpanded glob means it didn't match anything
|
||||||
|
echo "Did not find any files matching $f"
|
||||||
|
ls --color -F -l dist/electron/Packaged
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
puts="$puts
|
||||||
|
put $f $upload_to"
|
||||||
|
done
|
||||||
|
|
||||||
|
# sftp doesn't have any equivalent to mkdir -p, so we have to split the above up into a chain of
|
||||||
|
# -mkdir a/, -mkdir a/b/, -mkdir a/b/c/, ... commands. The leading `-` allows the command to fail
|
||||||
|
# without error.
|
||||||
|
upload_dirs=(${upload_to//\// })
|
||||||
|
mkdirs=
|
||||||
|
dir_tmp=""
|
||||||
|
for p in "${upload_dirs[@]}"; do
|
||||||
|
dir_tmp="$dir_tmp$p/"
|
||||||
|
mkdirs="$mkdirs
|
||||||
|
-mkdir $dir_tmp"
|
||||||
|
done
|
||||||
|
|
||||||
|
sftp -i ssh_key -b - -o StrictHostKeyChecking=off drone@oxen.rocks <<SFTP
|
||||||
|
$mkdirs
|
||||||
|
$puts
|
||||||
|
SFTP
|
||||||
|
|
||||||
|
set +o xtrace
|
||||||
|
|
||||||
|
echo -e "\n\n\n\n\e[32;1mUploaded to https://${upload_to}/${filename}\e[0m\n\n\n"
|
||||||
|
|
|
@ -0,0 +1,49 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
if [ "$#" -ne 1 ] || [[ "$1" != http* ]]; then
|
||||||
|
cat <<EOF >&2
|
||||||
|
Usage: $0 URL -- download and extract an oxen-core build (typically from https://oxen.rocks)
|
||||||
|
Some common URLs:
|
||||||
|
https://oxen.rocks/oxen-io/oxen-core/oxen-stable-linux-LATEST.tar.xz
|
||||||
|
https://oxen.rocks/oxen-io/oxen-core/oxen-stable-win-LATEST.zip
|
||||||
|
https://oxen.rocks/oxen-io/oxen-core/oxen-stable-macos-LATEST.tar.xz
|
||||||
|
https://oxen.rocks/oxen-io/oxen-core/oxen-dev-linux-LATEST.tar.xz
|
||||||
|
https://oxen.rocks/oxen-io/oxen-core/oxen-dev-win-LATEST.zip
|
||||||
|
https://oxen.rocks/oxen-io/oxen-core/oxen-dev-macos-LATEST.tar.xz
|
||||||
|
EOF
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ! [ -f tools/download-oxen-files.sh ] || ! [ -d bin ]; then
|
||||||
|
echo "This script needs to be invoked from the oxen-electron-gui-wallet top-level project directory" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
tar=tar
|
||||||
|
if [[ "$($tar --version)" == bsdtar* ]]; then
|
||||||
|
tar=gtar
|
||||||
|
if ! command -v $tar; then
|
||||||
|
echo "GNU tar is required, but your tar is \`bsdtar' and \`gtar' doesn't work." >&2
|
||||||
|
echo "This is probably a mac; please install gnutar (e.g. via macports or homebrew)" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
rm -f bin/oxen*
|
||||||
|
|
||||||
|
if [[ "$1" = *win*.zip ]]; then
|
||||||
|
tmpzip=$(mktemp XXXXXXXXXXXX.zip)
|
||||||
|
curl -sSo $tmpzip "$1"
|
||||||
|
unzip -p $tmpzip '*/oxend.exe' >bin/oxend.exe
|
||||||
|
unzip -p $tmpzip '*/oxen-wallet-rpc.exe' >bin/oxen-wallet-rpc.exe
|
||||||
|
rm -f $tmpzip
|
||||||
|
|
||||||
|
echo "Extracted:"
|
||||||
|
ls -l bin/*.exe
|
||||||
|
else
|
||||||
|
curl -sS "$1" | $tar --strip-components=1 -C bin -xJv --no-anchored oxend oxen-wallet-rpc
|
||||||
|
|
||||||
|
echo "Checking downloaded versions:"
|
||||||
|
echo -n "oxend: "; ./bin/oxend --version
|
||||||
|
echo -n "oxen-wallet-rpc: "; ./bin/oxen-wallet-rpc --version
|
||||||
|
fi
|
Binary file not shown.
Loading…
Reference in New Issue