Skip to content
This repository has been archived by the owner on Mar 23, 2023. It is now read-only.

Commit

Permalink
Merge branch 'staging'
Browse files Browse the repository at this point in the history
  • Loading branch information
faustbrian committed Sep 23, 2020
2 parents cf74d27 + 0f289fd commit da75fc2
Show file tree
Hide file tree
Showing 65 changed files with 838 additions and 7,652 deletions.
24 changes: 12 additions & 12 deletions .github/workflows/draft-artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,20 +46,20 @@ jobs:
# - name: Upload .AppImage
# uses: actions/upload-artifact@master
# with:
# name: ark-desktop-wallet-linux-2.9.3.AppImage
# path: build/target/ark-desktop-wallet-linux-x86_64-2.9.3.AppImage
# name: ark-desktop-wallet-linux-2.9.4.AppImage
# path: build/target/ark-desktop-wallet-linux-x86_64-2.9.4.AppImage

# - name: Upload .tar.gz
# uses: actions/upload-artifact@master
# with:
# name: ark-desktop-wallet-linux-2.9.3.tar.gz
# path: build/target/ark-desktop-wallet-linux-x64-2.9.3.tar.gz
# name: ark-desktop-wallet-linux-2.9.4.tar.gz
# path: build/target/ark-desktop-wallet-linux-x64-2.9.4.tar.gz

- name: Upload .deb
uses: actions/upload-artifact@master
with:
name: ark-desktop-wallet-linux-2.9.3-${{ github.sha }}.deb
path: build/target/ark-desktop-wallet-linux-amd64-2.9.3.deb
name: ark-desktop-wallet-linux-2.9.4-${{ github.sha }}.deb
path: build/target/ark-desktop-wallet-linux-amd64-2.9.4.deb

build-macOS:
runs-on: macos-latest
Expand Down Expand Up @@ -102,14 +102,14 @@ jobs:
# - name: Upload .zip
# uses: actions/upload-artifact@master
# with:
# name: ark-desktop-wallet-mac-2.9.3.zip
# path: build/target/ark-desktop-wallet-mac-2.9.3.zip
# name: ark-desktop-wallet-mac-2.9.4.zip
# path: build/target/ark-desktop-wallet-mac-2.9.4.zip

- name: Upload .dmg
uses: actions/upload-artifact@v1
with:
name: ark-desktop-wallet-mac-2.9.3-${{ github.sha }}.dmg
path: build/target/ark-desktop-wallet-mac-2.9.3.dmg
name: ark-desktop-wallet-mac-2.9.4-${{ github.sha }}.dmg
path: build/target/ark-desktop-wallet-mac-2.9.4.dmg

build-windows:
runs-on: windows-latest
Expand Down Expand Up @@ -137,5 +137,5 @@ jobs:
- name: Upload .exe
uses: actions/upload-artifact@v1
with:
name: ark-desktop-wallet-win-2.9.3-${{ github.sha }}.exe
path: build/target/ark-desktop-wallet-win-2.9.3.exe
name: ark-desktop-wallet-win-2.9.4-${{ github.sha }}.exe
path: build/target/ark-desktop-wallet-win-2.9.4.exe
22 changes: 11 additions & 11 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,28 +82,28 @@ jobs:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Calculate Checksums for AppImage
run: shasum -a 256 build/target/ark-desktop-wallet-linux-x86_64-2.9.3.AppImage
run: shasum -a 256 build/target/ark-desktop-wallet-linux-x86_64-2.9.4.AppImage

- name: Calculate Checksums for TAR
run: shasum -a 256 build/target/ark-desktop-wallet-linux-x64-2.9.3.tar.gz
run: shasum -a 256 build/target/ark-desktop-wallet-linux-x64-2.9.4.tar.gz

- name: Calculate Checksums for DEB
run: shasum -a 256 build/target/ark-desktop-wallet-linux-amd64-2.9.3.deb
run: shasum -a 256 build/target/ark-desktop-wallet-linux-amd64-2.9.4.deb

- name: VirusTotal Scan for AppImage
run: |
UPLOAD_URL=$(curl -s --location --url 'https://www.virustotal.com/vtapi/v2/file/scan/upload_url?apikey=${{ secrets.VIRUSTOTAL_TOKEN }}' | jq -r .upload_url)
curl -s --url "$UPLOAD_URL" --form 'apikey=${{ secrets.VIRUSTOTAL_TOKEN }}' --form 'file=@build/target/ark-desktop-wallet-linux-x86_64-2.9.3.AppImage' | jq -r .permalink
curl -s --url "$UPLOAD_URL" --form 'apikey=${{ secrets.VIRUSTOTAL_TOKEN }}' --form 'file=@build/target/ark-desktop-wallet-linux-x86_64-2.9.4.AppImage' | jq -r .permalink
- name: VirusTotal Scan for TAR
run: |
UPLOAD_URL=$(curl -s --location --url 'https://www.virustotal.com/vtapi/v2/file/scan/upload_url?apikey=${{ secrets.VIRUSTOTAL_TOKEN }}' | jq -r .upload_url)
curl -s --url "$UPLOAD_URL" --form 'apikey=${{ secrets.VIRUSTOTAL_TOKEN }}' --form 'file=@build/target/ark-desktop-wallet-linux-x64-2.9.3.tar.gz' | jq -r .permalink
curl -s --url "$UPLOAD_URL" --form 'apikey=${{ secrets.VIRUSTOTAL_TOKEN }}' --form 'file=@build/target/ark-desktop-wallet-linux-x64-2.9.4.tar.gz' | jq -r .permalink
- name: VirusTotal Scan for DEB
run: |
UPLOAD_URL=$(curl -s --location --url 'https://www.virustotal.com/vtapi/v2/file/scan/upload_url?apikey=${{ secrets.VIRUSTOTAL_TOKEN }}' | jq -r .upload_url)
curl -s --url "$UPLOAD_URL" --form 'apikey=${{ secrets.VIRUSTOTAL_TOKEN }}' --form 'file=@build/target/ark-desktop-wallet-linux-amd64-2.9.3.deb' | jq -r .permalink
curl -s --url "$UPLOAD_URL" --form 'apikey=${{ secrets.VIRUSTOTAL_TOKEN }}' --form 'file=@build/target/ark-desktop-wallet-linux-amd64-2.9.4.deb' | jq -r .permalink
publish-macos:
needs: ["create-release"]
Expand Down Expand Up @@ -148,20 +148,20 @@ jobs:
CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }}

- name: Calculate Checksums for DMG
run: shasum -a 256 build/target/ark-desktop-wallet-mac-2.9.3.dmg
run: shasum -a 256 build/target/ark-desktop-wallet-mac-2.9.4.dmg

- name: Calculate Checksums for ZIP
run: shasum -a 256 build/target/ark-desktop-wallet-mac-2.9.3.zip
run: shasum -a 256 build/target/ark-desktop-wallet-mac-2.9.4.zip

- name: VirusTotal Scan for DMG
run: |
UPLOAD_URL=$(curl -s --location --url 'https://www.virustotal.com/vtapi/v2/file/scan/upload_url?apikey=${{ secrets.VIRUSTOTAL_TOKEN }}' | jq -r .upload_url)
curl -s --url "$UPLOAD_URL" --form 'apikey=${{ secrets.VIRUSTOTAL_TOKEN }}' --form 'file=@build/target/ark-desktop-wallet-mac-2.9.3.dmg' | jq -r .permalink
curl -s --url "$UPLOAD_URL" --form 'apikey=${{ secrets.VIRUSTOTAL_TOKEN }}' --form 'file=@build/target/ark-desktop-wallet-mac-2.9.4.dmg' | jq -r .permalink
- name: VirusTotal Scan for ZIP
run: |
UPLOAD_URL=$(curl -s --location --url 'https://www.virustotal.com/vtapi/v2/file/scan/upload_url?apikey=${{ secrets.VIRUSTOTAL_TOKEN }}' | jq -r .upload_url)
curl -s --url "$UPLOAD_URL" --form 'apikey=${{ secrets.VIRUSTOTAL_TOKEN }}' --form 'file=@build/target/ark-desktop-wallet-mac-2.9.3.zip' | jq -r .permalink
curl -s --url "$UPLOAD_URL" --form 'apikey=${{ secrets.VIRUSTOTAL_TOKEN }}' --form 'file=@build/target/ark-desktop-wallet-mac-2.9.4.zip' | jq -r .permalink
publish-windows:
needs: ["create-release"]
Expand Down Expand Up @@ -199,5 +199,5 @@ jobs:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Calculate Checksums for EXE
run: Get-FileHash build/target/ark-desktop-wallet-win-2.9.3.exe -Algorithm SHA256 | Format-List
run: Get-FileHash build/target/ark-desktop-wallet-win-2.9.4.exe -Algorithm SHA256 | Format-List
shell: powershell
24 changes: 12 additions & 12 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,20 +90,20 @@ jobs:
# - name: Upload .AppImage
# uses: actions/upload-artifact@master
# with:
# name: ark-desktop-wallet-linux-2.9.3.AppImage
# path: build/target/ark-desktop-wallet-linux-x86_64-2.9.3.AppImage
# name: ark-desktop-wallet-linux-2.9.4.AppImage
# path: build/target/ark-desktop-wallet-linux-x86_64-2.9.4.AppImage

# - name: Upload .tar.gz
# uses: actions/upload-artifact@master
# with:
# name: ark-desktop-wallet-linux-2.9.3.tar.gz
# path: build/target/ark-desktop-wallet-linux-x64-2.9.3.tar.gz
# name: ark-desktop-wallet-linux-2.9.4.tar.gz
# path: build/target/ark-desktop-wallet-linux-x64-2.9.4.tar.gz

- name: Upload .deb
uses: actions/upload-artifact@master
with:
name: ark-desktop-wallet-linux-2.9.3-${{ github.sha }}.deb
path: build/target/ark-desktop-wallet-linux-amd64-2.9.3.deb
name: ark-desktop-wallet-linux-2.9.4-${{ github.sha }}.deb
path: build/target/ark-desktop-wallet-linux-amd64-2.9.4.deb

build-macOS:
runs-on: macos-latest
Expand Down Expand Up @@ -138,14 +138,14 @@ jobs:
# - name: Upload .zip
# uses: actions/upload-artifact@master
# with:
# name: ark-desktop-wallet-mac-2.9.3.zip
# path: build/target/ark-desktop-wallet-mac-2.9.3.zip
# name: ark-desktop-wallet-mac-2.9.4.zip
# path: build/target/ark-desktop-wallet-mac-2.9.4.zip

- name: Upload .dmg
uses: actions/upload-artifact@v1
with:
name: ark-desktop-wallet-mac-2.9.3-${{ github.sha }}.dmg
path: build/target/ark-desktop-wallet-mac-2.9.3.dmg
name: ark-desktop-wallet-mac-2.9.4-${{ github.sha }}.dmg
path: build/target/ark-desktop-wallet-mac-2.9.4.dmg

build-windows:
runs-on: windows-latest
Expand Down Expand Up @@ -173,5 +173,5 @@ jobs:
- name: Upload .exe
uses: actions/upload-artifact@v1
with:
name: ark-desktop-wallet-win-2.9.3-${{ github.sha }}.exe
path: build/target/ark-desktop-wallet-win-2.9.3.exe
name: ark-desktop-wallet-win-2.9.4-${{ github.sha }}.exe
path: build/target/ark-desktop-wallet-win-2.9.4.exe
1 change: 0 additions & 1 deletion __tests__/unit/__mocks__/@/services/wallet.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ export default {
passphrase: 'passphrase'
}
}),
canResignBusiness: jest.fn(() => false),
getAddressFromPublicKey: jest.fn(publicKey => `address of ${publicKey}`),
getPublicKeyFromPassphrase: jest.fn(passphrase => `public key of ${passphrase}`),
getPublicKeyFromMultiSignatureAsset: jest.fn(() => 'public key of multisignature'),
Expand Down
2 changes: 2 additions & 0 deletions __tests__/unit/__utils__/setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import VTooltip from 'v-tooltip'
import eventBus from '@/plugins/event-bus'
import directives from '@/directives'
import filters from '@/filters'
import TransactionTypesMixin from '@/mixins/transaction-types'

require('babel-plugin-require-context-hook/register')()

Expand All @@ -20,6 +21,7 @@ Vue.use(VTooltip, {
})
Vue.use(directives)
Vue.use(filters)
Vue.mixin(TransactionTypesMixin)
Vue.config.ignoredElements = ['webview']

VueTestUtils.config.mocks.$eventBus = eventBus
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import { createLocalVue, mount } from '@vue/test-utils'
import installI18n from '../../../__utils__/i18n'
import TransactionConfirm, * as TransactionConfirmComponents from '@/components/Transaction/TransactionConfirm'
import TransactionConfirmBusiness from '@/components/Transaction/TransactionConfirm/TransactionConfirmBusiness'
import TransactionConfirmBridgechain from '@/components/Transaction/TransactionConfirm/TransactionConfirmBridgechain'
import CurrencyMixin from '@/mixins/currency'

const transactions = {
Expand Down Expand Up @@ -172,9 +170,7 @@ const createWrapper = (component, transaction) => {
stubs: {
Identicon: true,
TransactionDetail: true,
...TransactionConfirmComponents,
...TransactionConfirmBusiness,
...TransactionConfirmBridgechain
...TransactionConfirmComponents
}
})
}
Expand Down Expand Up @@ -252,54 +248,6 @@ describe('TransactionConfirm', () => {

expect(wrapper.contains('.TransactionConfirmDelegateResignation')).toBe(true)
})

it('should render business registration confirm component', async () => {
createWrapper(null, transactions.businessRegistration)

await wrapper.vm.$nextTick()

expect(wrapper.contains('.TransactionConfirmBusinessRegistration')).toBe(true)
})

it('should render business resignation confirm component', async () => {
createWrapper(null, transactions.businessResignation)

await wrapper.vm.$nextTick()

expect(wrapper.contains('.TransactionConfirmBusinessResignation')).toBe(true)
})

it('should render business update confirm component', async () => {
createWrapper(null, transactions.businessUpdate)

await wrapper.vm.$nextTick()

expect(wrapper.contains('.TransactionConfirmBusinessUpdate')).toBe(true)
})

it('should render bridgechain registration confirm component', async () => {
createWrapper(null, transactions.bridgechainRegistration)

await wrapper.vm.$nextTick()

expect(wrapper.contains('.TransactionConfirmBridgechainRegistration')).toBe(true)
})

it('should render bridgechain resignation confirm component', async () => {
createWrapper(null, transactions.bridgechainResignation)

await wrapper.vm.$nextTick()

expect(wrapper.contains('.TransactionConfirmBridgechainResignation')).toBe(true)
})

it('should render bridgechain update confirm component', async () => {
createWrapper(null, transactions.bridgechainUpdate)

await wrapper.vm.$nextTick()

expect(wrapper.contains('.TransactionConfirmBridgechainUpdate')).toBe(true)
})
})

describe('computed', () => {
Expand Down Expand Up @@ -478,56 +426,6 @@ describe('TransactionConfirm', () => {
expect(wrapper.vm.activeComponent).toBe('TransactionConfirmDelegateResignation')
})

it('should render business registration confirm component', async () => {
createWrapper(null, transactions.businessRegistration)

await wrapper.vm.$nextTick()

expect(wrapper.vm.activeComponent).toBe('TransactionConfirmBusinessRegistration')
})

it('should render business resignation confirm component', async () => {
createWrapper(null, transactions.businessResignation)

await wrapper.vm.$nextTick()

expect(wrapper.vm.activeComponent).toBe('TransactionConfirmBusinessResignation')
})

it('should render business update confirm component', async () => {
createWrapper(null, transactions.businessUpdate)

await wrapper.vm.$nextTick()

expect(wrapper.vm.activeComponent).toBe('TransactionConfirmBusinessUpdate')
})

it('should render bridgechain registration confirm component', async () => {
createWrapper(null, transactions.bridgechainRegistration)

await wrapper.vm.$nextTick()

expect(wrapper.vm.activeComponent).toBe('TransactionConfirmBridgechainRegistration')
})

it('should render bridgechain resignation confirm component', async () => {
createWrapper(null, transactions.bridgechainResignation)

await wrapper.vm.$nextTick()

expect(wrapper.vm.transaction.type).toBe(4)
expect(wrapper.vm.transaction.typeGroup).toBe(2)
expect(wrapper.vm.activeComponent).toBe('TransactionConfirmBridgechainResignation')
})

it('should render bridgechain update confirm component', async () => {
createWrapper(null, transactions.bridgechainUpdate)

await wrapper.vm.$nextTick()

expect(wrapper.vm.activeComponent).toBe('TransactionConfirmBridgechainUpdate')
})

it('should error if no component based on transaction type', () => {
expect(() => { createWrapper(null, { type: 1000 }) }).toThrow('[TransactionConfirm] - Confirm for type 1000 (group 1) not found.')
})
Expand Down

0 comments on commit da75fc2

Please sign in to comment.