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

Commit

Permalink
Merge pull request #549 from ArkEcosystem/develop
Browse files Browse the repository at this point in the history
release: 1.8.0
  • Loading branch information
luciorubeens committed Mar 27, 2020
2 parents 0252946 + 2a0bfd0 commit 6a91f81
Show file tree
Hide file tree
Showing 265 changed files with 26,472 additions and 17,010 deletions.
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
coverage
59 changes: 59 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
{
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "./tsconfig.eslint.json"
},
"plugins": [
"@typescript-eslint",
"prettier",
"simple-import-sort",
"html",
"unused-imports"
],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
"plugin:@typescript-eslint/recommended",
"plugin:prettier/recommended",
"prettier/@typescript-eslint"
],
"rules": {
"@typescript-eslint/prefer-string-starts-ends-with": "off",
"@typescript-eslint/no-this-alias": "off",
"@typescript-eslint/await-thenable": "off",
"@typescript-eslint/ban-ts-ignore": "off",
"@typescript-eslint/camelcase": "off",
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/explicit-member-accessibility": ["off"],
"@typescript-eslint/interface-name-prefix": "off",
"@typescript-eslint/member-ordering": ["error"],
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/no-empty-interface": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-inferrable-types": "off",
"@typescript-eslint/no-misused-promises": "off",
"@typescript-eslint/no-namespace": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-unnecessary-condition": "off",
"@typescript-eslint/no-unused-vars": "off",
"@typescript-eslint/no-var-requires": "off",
"@typescript-eslint/prefer-regexp-exec": "off",
"@typescript-eslint/require-await": "off",
"@typescript-eslint/unbound-method": "off",
"no-async-promise-executor": "off",
"no-empty": "off",
"no-inferrable-types": "off",
"no-prototype-builtins": "off",
"prefer-const": [
"error",
{
"destructuring": "all"
}
],
"prettier/prettier": "error",
"require-atomic-updates": "off",
"simple-import-sort/sort": "error",
"unused-imports/no-unused-imports-ts": "error"
}
}
4 changes: 1 addition & 3 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@ jobs:
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Install pre dependencies
run: npm install -g ionic cordova
- name: Install
run: npm rebuild node-sass && npm install
run: npm install --ignore-scripts
- name: Lint
run: npm run lint
14 changes: 5 additions & 9 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ jobs:
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Install pre dependencies
run: npm i -g ionic cordova
- name: Install
run: npm rebuild node-sass && npm install
run: npm install --ignore-scripts
- name: Test
run: npm run test:coverage
- name: Build
run: npm run build -- --prod
- name: Codecov
run: ./node_modules/.bin/codecov --token=${{ secrets.CODECOV_TOKEN }}

e2e:
runs-on: ubuntu-latest
Expand All @@ -43,11 +43,7 @@ jobs:
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Install pre dependencies
run: npm i -g ionic cordova
- name: Install
run: npm rebuild node-sass && npm install
run: npm install --ignore-scripts
- name: Test
run: npm run test:e2e
- name: Build
run: npm run build -- --prod
run: npm run test:e2e -- --prod
3 changes: 1 addition & 2 deletions .lintstagedrc.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"*.ts": ["tslint -c tslint.json --fix", "prettier --write"],
"src/**/*.ts": ["ng-lint-staged lint --fix --"],
"*.ts": ["prettier --write", "eslint --fix"],
"*.{css,pcss,scss,html,json,md,js}": ["prettier --write"]
}
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
coverage
21 changes: 21 additions & 0 deletions .storybook/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
module.exports = {
stories: ["../src/**/*.stories.[tj]s"],
webpackFinal: config => {
config.module.rules.push({
test: /\.(scss|pcss)$/,
loader: "postcss-loader",
options: {
ident: "postcss",
syntax: "postcss-scss",
plugins: () => [
require("postcss-import"),
require("tailwindcss"),
require("postcss-nested"),
require("autoprefixer"),
],
},
});

return config;
},
};
25 changes: 25 additions & 0 deletions .storybook/preview.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { addDecorator } from "@storybook/angular";
import { IonicModule } from "@ionic/angular";
import { moduleMetadata } from "@storybook/angular";
import { TranslateModule, TranslateLoader } from "@ngx-translate/core";
import { of } from "rxjs";
// @ts-ignore
import enLocale from "../src/assets/i18n/en.json";

class CustomLoader implements TranslateLoader {
getTranslation(lang: string) {
return of(enLocale);
}
}

addDecorator(
moduleMetadata({
imports: [
IonicModule.forRoot(),
TranslateModule.forRoot({
loader: { provide: TranslateLoader, useClass: CustomLoader },
defaultLanguage: "en",
}),
],
}),
);
8 changes: 8 additions & 0 deletions .storybook/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"extends": "../tsconfig.json",
"compilerOptions": {
"resolveJsonModule": true
},
"exclude": ["../src/test.ts", "../src/**/*.spec.ts"],
"include": ["../src/**/*"]
}
2 changes: 1 addition & 1 deletion CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1 +1 @@
* @luciorubeens @alexbarnsley
* @luciorubeens @clucasalcantara
46 changes: 23 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ ARK’s mobile wallet is a hybrid application (using the same codebase for Andro

## Download

- [Google Play](https://play.google.com/store/apps/details?id=io.ark.wallet.mobile)
- [App Store](https://itunes.apple.com/us/app/mobile-ark/id1324625967)
- [Google Play](https://play.google.com/store/apps/details?id=io.ark.wallet.mobile)
- [App Store](https://itunes.apple.com/us/app/mobile-ark/id1324625967)

## Installation

Expand All @@ -29,7 +29,7 @@ Download and install [Node.js](https://nodejs.org/).
Then follow the steps below:

```bash
npm install -g ionic cordova
npm install -g @ionic/cli cordova
npm install -g cordova-res native-run
npm install
ionic cordova prepare
Expand All @@ -56,9 +56,9 @@ npm install -g ios-deploy

Download and install:

- [JDK8](https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html)
- [Gradle](https://gradle.org/install/)
- [Android Studio](https://developer.android.com/studio/)
- [JDK8](https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html)
- [Gradle](https://gradle.org/install/)
- [Android Studio](https://developer.android.com/studio/)

Then install Android SDK (API 28) on Android Studio and configure the [environment variables](https://developer.android.com/studio/command-line/variables) (`ANDROID_SDK_ROOT`).

Expand Down Expand Up @@ -88,36 +88,36 @@ npm run build:android

### iOS Deploy

- Download the `Development` and `Distribution` certificates in [Apple's member center](https://developer.apple.com/membercenter)
- Open Xcode and import the workspace file in `/platforms/ios`
- Check the `Signing and Capabilities` tab to ensure that the `Provisioning Profile` is set correctly
- Go to `Product` > `Archive` in menu.
- Proceed in `Distribute App` wizard.
- `App Store Connect` > `Upload`. Then it will be listed on [iTunes Connect](https://itunesconnect.apple.com/)
- `App Store Connect` > `Export` to create the `.ipa` file
- Download the `Development` and `Distribution` certificates in [Apple's member center](https://developer.apple.com/membercenter)
- Open Xcode and import the workspace file in `/platforms/ios`
- Check the `Signing and Capabilities` tab to ensure that the `Provisioning Profile` is set correctly
- Go to `Product` > `Archive` in menu.
- Proceed in `Distribute App` wizard.
- `App Store Connect` > `Upload`. Then it will be listed on [iTunes Connect](https://itunesconnect.apple.com/)
- `App Store Connect` > `Export` to create the `.ipa` file

### Android Deploy

- Open the output directory `cd platforms/android/build/outputs/apk`
- Generate a private key to sign the APK (skip this if you already have one):
- Open the output directory `cd platforms/android/build/outputs/apk`
- Generate a private key to sign the APK (skip this if you already have one):

```bash
keytool -genkey -v -keystore release-key.keystore -alias ark -keyalg RSA -keysize 2048 -validity 10000
```

- Sign the unsigned APK:
- Sign the unsigned APK:

```bash
jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore ./release-key.keystore app-release-unsigned.apk mobile-app
```

- Optimize the APK:
- Optimize the APK:

```bash
zipalign -v 4 app-release-unsigned.apk AppRelease.apk
```

- Open the [Google Play Store Developer Console](https://play.google.com/apps/publish) and upload the `AppRelease.apk`
- Open the [Google Play Store Developer Console](https://play.google.com/apps/publish) and upload the `AppRelease.apk`

## Testing

Expand All @@ -127,10 +127,10 @@ npm test

## Contributing

- If you find any bugs, submit an [issue](../../issues) or open [pull-request](../../pulls), helping us catch and fix them.
- Engage with other users and developers on [ARK Slack](https://ark.io/slack/).
- [Contribution bounties](https://docs.ark.io/guidebook/contribution-guidelines/contributing.html).
- [Help translate](./TRANSLATING.md).
- If you find any bugs, submit an [issue](../../issues) or open [pull-request](../../pulls), helping us catch and fix them.
- Engage with other users and developers on [ARK Slack](https://ark.io/slack/).
- [Contribution bounties](https://docs.ark.io/guidebook/contribution-guidelines/contributing.html).
- [Help translate](./TRANSLATING.md).

## Security

Expand All @@ -142,4 +142,4 @@ This project exists thanks to all the people who [contribute](../../contributors

## License

[MIT](LICENSE) © [ARK Ecosystem](https://ark.io)
[MIT](LICENSE) © [ARK Ecosystem](https://ark.io)
6 changes: 4 additions & 2 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"build": {
"builder": "@angular-builders/custom-webpack:browser",
"options": {
"aot": true,
"customWebpackConfig": {
"path": "./webpack.config.js"
},
Expand Down Expand Up @@ -66,7 +67,6 @@
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"aot": true,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
Expand Down Expand Up @@ -109,6 +109,7 @@
"test": {
"builder": "@angular-builders/custom-webpack:karma",
"options": {
"codeCoverage": false,
"customWebpackConfig": {
"path": "./webpack.config.js"
},
Expand Down Expand Up @@ -192,7 +193,8 @@
}
},
"cli": {
"defaultCollection": "@ionic/angular-toolkit"
"defaultCollection": "@ionic/angular-toolkit",
"analytics": false
},
"schematics": {
"@ionic/angular-toolkit:component": {
Expand Down
7 changes: 4 additions & 3 deletions config.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version='1.0' encoding='utf-8'?>
<widget id="io.ark.wallet.mobile" version="1.7.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<widget id="io.ark.wallet.mobile" version="1.8.0" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>Ark Mobile</name>
<description>ARK</description>
<author email="[email protected]" href="http://ark.io/">Ark Ecosystem</author>
Expand Down Expand Up @@ -29,9 +29,11 @@
<preference name="KeyboardResizeMode" value="native" />
<preference name="Orientation" value="portrait" />
<preference name="target-device" value="handset" />
<preference name="DisableDeploy" value="true" />
<platform name="android">
<edit-config file="app/src/main/AndroidManifest.xml" mode="merge" target="/manifest/application" xmlns:android="http://schemas.android.com/apk/res/android">
<edit-config file="AndroidManifest.xml" mode="merge" target="/manifest/application" xmlns:android="http://schemas.android.com/apk/res/android">
<application android:networkSecurityConfig="@xml/network_security_config" />
<application android:usesCleartextTraffic="true" />
</edit-config>
<edit-config file="AndroidManifest.xml" mode="merge" target="/manifest/application/activity" xmlns:android="http://schemas.android.com/apk/res/android">
<activity android:windowSoftInputMode="adjustPan" />
Expand Down Expand Up @@ -123,7 +125,6 @@
<plugin name="cordova-plugin-qrscanner" spec="^3.0.1" />
<plugin name="cordova-plugin-inappbrowser" spec="^3.1.0" />
<plugin name="cordova-plugin-x-socialsharing" spec="^5.6.2" />
<plugin name="cordova-plugin-local-notification" spec="^0.9.0-beta.2" />
<plugin name="cordova-sqlite-storage" spec="3.4.0" />
<plugin name="cordova-plugin-network-information" spec="^2.0.2" />
<plugin name="cordova-plugin-screen-orientation" spec="^3.0.2" />
Expand Down
6 changes: 2 additions & 4 deletions e2e/protractor.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,14 @@
// https://github.com/angular/protractor/blob/master/lib/config.ts

const { SpecReporter } = require("jasmine-spec-reporter");
const puppeteer = require("puppeteer");

exports.config = {
allScriptsTimeout: 11000,
specs: ["./src/**/*.e2e-spec.ts"],
capabilities: {
browserName: "chrome",
chromeOptions: {
args: ["--headless"],
binary: puppeteer.executablePath(),
args: ["--headless", "--no-sandbox"],
},
},
directConnect: true,
Expand All @@ -20,7 +18,7 @@ exports.config = {
jasmineNodeOpts: {
showColors: true,
defaultTimeoutInterval: 30000,
print: function() {},
print: function () {},
},
onPrepare() {
require("ts-node").register({
Expand Down
4 changes: 3 additions & 1 deletion ionic.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,7 @@
"name": "ark-ionic",
"integrations": {
"cordova": {}
}
},
"type": "angular",
"id": "efb289f2"
}
Loading

0 comments on commit 6a91f81

Please sign in to comment.