Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
AnthonyLaw committed Nov 4, 2021
2 parents 6f2425a + cfeab26 commit 7f46512
Show file tree
Hide file tree
Showing 60 changed files with 853 additions and 521 deletions.
61 changes: 0 additions & 61 deletions .circleci/config.yml

This file was deleted.

18 changes: 17 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,21 @@ All notable changes to this project will be documented in this file.

The changelog format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

## [v1.3.0][v1.3.0] - 1-Nov-2021

### Fixed
- Fix invalid accounts generated when importing private key instead mnemonics [#232](https://github.com/symbol/mobile-wallet/issues/232)
- Fix node list should not be hardcoded [#235](https://github.com/symbol/mobile-wallet/issues/235)
- Fix not able to send transaction with encrypted message [#236](https://github.com/symbol/mobile-wallet/issues/236)
- Hide news feed [#242](https://github.com/symbol/mobile-wallet/issues/242)
- Update explorer and faucet url. [#252](https://github.com/symbol/mobile-wallet/pull/252)

### Added
- Add Multisig multi-level support [#223](https://github.com/symbol/mobile-wallet/issues/223)
- Add harvesting verification if account importance is above zero [#234](https://github.com/symbol/mobile-wallet/issues/234)
- Display current account importance in Harvesting Page [#239](https://github.com/symbol/mobile-wallet/issues/239)
- Add Jenkins pipeline setup [#247](https://github.com/symbol/mobile-wallet/pull/247)

## [v1.2][v1.2] - 6-Oct-2021

### Fixed
Expand All @@ -11,4 +26,5 @@ The changelog format is based on [Keep a Changelog](https://keepachangelog.com/e
- Fix harvesting status [#134](https://github.com/symbol/mobile-wallet/issues/134)
- Minor translations update.

[v1.2]: https://github.com/symbol/mobile-wallet/releases/tag/1.2
[v1.2]: https://github.com/symbol/mobile-wallet/releases/tag/1.2
[v1.3.0]: https://github.com/symbol/mobile-wallet/releases/tag/1.3.0
113 changes: 113 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
pipeline {
agent { label 'macos' }

options {
skipStagesAfterUnstable()
}

parameters {
string(name: 'VERSION_NUMBER', defaultValue: '4.4.2', description: 'Version Number')
string(name: 'BUILD_NUMBER', defaultValue: '59', description: 'Build Number')
string(name: 'DEPLOY_BETA_BRANCH', defaultValue: 'dev', description: 'Deploy Beta Branch Name')
choice(
name: 'TARGET_OS',
choices: ['All', 'IOS', 'Android'],
description: 'Target Environment'
)
}

environment {
RUNNING_ON_CI = 'true'
VERSION_NUMBER = "${params.VERSION_NUMBER}"
BUILD_NUMBER = "${params.BUILD_NUMBER}"
DEPLOY_BETA_BRANCH = "${params.DEPLOY_BETA_BRANCH}"
TARGET_OS = "${params.TARGET_OS}"
MATCH_GIT_BASIC_AUTHORIZATION = credentials('GHUB_CREDS_SECRET')
MATCH_PASSWORD = credentials('MATCH_PASSWORD')
FASTLANE_KEYCHAIN = 'fastlane.keychain'
FASTLANE_KEYCHAIN_PASSWORD = credentials("FASTLANE_KEYCHAIN_PASSWORD")
APP_STORE_CONNECT_API_KEY_KEY_ID = credentials("APP_STORE_CONNECT_API_KEY_KEY_ID")
APP_STORE_CONNECT_API_KEY_ISSUER_ID = credentials("APP_STORE_CONNECT_API_KEY_ISSUER_ID")
APP_STORE_CONNECT_API_KEY_KEY = credentials("APP_STORE_CONNECT_API_KEY_KEY")
}

stages {
stage('Install') {
steps {
withCredentials([file(credentialsId: 'ENV_FILE_ZIP', variable: 'default_env_zip')]) {
sh "cp $default_env_zip default_whitelist_zip.zip"
}
script {
unzip zipFile: 'default_whitelist_zip.zip', quiet: true
def jsonWhitelist = readJSON file: 'default_whitelist.json'
def json = readJSON file: 'env/default.json.example'
json.optInWhiteList = jsonWhitelist.optInWhiteList
writeJSON file: 'env/default.json', json: json
}
sh "rm -f default_whitelist_zip.zip && rm -f default_whitelist.json"
// Run yarn install for the dependencies
sh "yarn cache clean && yarn install --network-concurrency 1"
sh "npx jetify" // for android
}
}

stage('Build') {
parallel {
stage('Build - IOS') {
when {
expression {
BRANCH_NAME == DEPLOY_BETA_BRANCH && (TARGET_OS == 'All' || TARGET_OS == 'IOS')
}
}
steps {
sh "cd ios && bundle install"
sh "cd ios && bundle exec pod install"
}
}
stage('Build - Android') {
when {
expression {
TARGET_OS == 'All' || TARGET_OS == 'Android'
}
}
steps {
// copy key.properties and copy keystore file
withCredentials([file(credentialsId: 'ANDROID_KEY_PROPERTIES', variable: 'android_key_properties'),
file(credentialsId: 'ANDROID_KEY_PROPERTIES_STORE_FILE', variable: 'release_keystore')]) {
sh 'cp $android_key_properties ./android/app/key.properties'
sh 'cp $release_keystore ./android/app/release.keystore'
sh "cd android && ./gradlew assembleProdRelease -PBUILD_NUMBER=${BUILD_NUMBER}"
sh "echo 'Build completed and .apk file is generated. Version:${VERSION_NUMBER}, Build:${BUILD_NUMBER}'"
}
}
}
}
}

stage ('Test') {
steps {
sh "echo 'Currently there are no tests to run!'"
}
}

// deploy to testnet
stage ('Deploy IOS - Alpha version') {
when {
expression {
BRANCH_NAME == DEPLOY_BETA_BRANCH && (TARGET_OS == 'All' || TARGET_OS == 'IOS')
}
}
steps {
sh 'cd ios && export APP_STORE_CONNECT_API_KEY_KEY_ID=${APP_STORE_CONNECT_API_KEY_KEY_ID} && export APP_STORE_CONNECT_API_KEY_ISSUER_ID=${APP_STORE_CONNECT_API_KEY_ISSUER_ID} && export APP_STORE_CONNECT_API_KEY_KEY=${APP_STORE_CONNECT_API_KEY_KEY} && export FASTLANE_KEYCHAIN=${FASTLANE_KEYCHAIN} && export FASTLANE_KEYCHAIN_PASSWORD=${FASTLANE_KEYCHAIN_PASSWORD} && export RUNNING_ON_CI=${RUNNING_ON_CI} && export BUILD_NUMBER=${BUILD_NUMBER} && export VERSION_NUMBER=${VERSION_NUMBER} && bundle exec fastlane beta'
sh "echo 'Deployed to TestFlight. Version:${VERSION_NUMBER}, Build:${BUILD_NUMBER}'"
}
}
}
post {
always {
archiveArtifacts artifacts: 'android/app/build/outputs/apk/prod/release/*.apk', allowEmptyArchive: true
archiveArtifacts artifacts: 'ios/output/*.ipa', allowEmptyArchive: true
cleanWs()
}
}
}
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

Official Android and iOS applications for NEM2(a.k.a Catapult).

[![CircleCI](https://circleci.com/gh/hatioin/nem-catapult-wallet.svg?style=svg&circle-token=8a16be5d725e06b1380904c8024e6622b6193e86)](https://circleci.com/gh/hatioin/nem-catapult-wallet)

## Getting Started

Expand Down
30 changes: 20 additions & 10 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -102,14 +102,14 @@ def enableProguardInReleaseBuilds = false
* The preferred build flavor of JavaScriptCore.
*
* For example, to use the international variant, you can use:
* `def jscFlavor = 'org.webkit:android-jsc-intl:+'`
* `def jscFlavor = 'org.webkit:android-jsc:+''
*
* The international variant includes ICU i18n library and necessary data
* allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that
* give correct results when using with locales other than en-US. Note that
* this variant is about 6MiB larger per architecture than default.
*/
def jscFlavor = 'org.webkit:android-jsc:+'
def jscFlavor = 'org.webkit:android-jsc-intl:+'

/**
* Whether to enable the Hermes VM.
Expand All @@ -119,6 +119,16 @@ def jscFlavor = 'org.webkit:android-jsc:+'
* and the benefits of using Hermes will therefore be sharply reduced.
*/
def enableHermes = project.ext.react.get("enableHermes", false);
def keystoreProperties = new Properties()
def keyPropertiesFilePath = 'key.properties'
def keystorePropertiesFile = file(keyPropertiesFilePath)
if (keystorePropertiesFile.exists()) {
println "${keyPropertiesFilePath} file exists."
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
println "storeFile is ${keystoreProperties['storeFile']}"
} else {
println "${keyPropertiesFilePath} file not found!"
}

android {
compileSdkVersion rootProject.ext.compileSdkVersion
Expand All @@ -144,12 +154,12 @@ android {
}
}
signingConfigs {
debug {
storeFile file('debug.keystore')
storePassword 'android'
keyAlias 'androiddebugkey'
keyPassword 'android'
}
config {
storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null
storePassword keystoreProperties['storePassword']
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
}
}
flavorDimensions "version"
productFlavors {
Expand All @@ -166,12 +176,12 @@ android {
}
buildTypes {
debug {
signingConfig signingConfigs.debug
signingConfig signingConfigs.config
}
release {
// Caution! In production, you need to generate your own keystore file.
// see https://facebook.github.io/react-native/docs/signed-apk-android.
signingConfig signingConfigs.debug
signingConfig signingConfigs.config
minifyEnabled enableProguardInReleaseBuilds
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
}
Expand Down
4 changes: 4 additions & 0 deletions android/app/key.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
storeFile=debug.keystore
storePassword=android
keyAlias=androiddebugkey
keyPassword=android
1 change: 1 addition & 0 deletions android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@

android.useAndroidX=true
android.enableJetifier=true
org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
29 changes: 7 additions & 22 deletions env/default.json.example
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
{
"sessionTimeoutInSeconds": 10,
"marketCurrencyName": "nem",
"newsURL": "https://nemflash.io/feed",
"explorerURL": {
"testnet": "http://explorer.testnet.symboldev.network/",
"mainnet": "http://explorer.symbolblockchain.io/"
"testnet": "https://testnet.symbol.fyi/",
"mainnet": "https://symbol.fyi/"
},
"faucetURL": "http://faucet.testnet.symboldev.network/",
"statisticsServiceURL": {
"testnet": "https://testnet.symbol.services/",
"mainnet": "https://symbol.services/"
},
"faucetURL": "https://testnet.symbol.tools/",
"aboutURL": "https://nem.io",
"currencies": {
"USD": "usd",
Expand All @@ -29,31 +32,13 @@
"http://hugealice2.nem.ninja",
"http://hachi.nem.ninja",
"http://alice2.nem.ninja"
],
"nodes": [
"http://ngl-api-501.symbolblockchain.io:3000",
"http://ngl-api-601.symbolblockchain.io:3000",
"http://ngl-api-401.symbolblockchain.io:3000",
"http://ngl-api-001.symbolblockchain.io:3000",
"http://ngl-api-101.symbolblockchain.io:3000",
"http://ngl-api-301.symbolblockchain.io:3000",
"http://ngl-api-201.symbolblockchain.io:3000"
]
},
"testnet": {
"nisNodes": [
"http://hugetestalice2.nem.ninja",
"http://hugetestalice.nem.ninja",
"http://medalice2.nem.ninja"
],
"nodes": [
"http://ngl-dual-001.testnet.symboldev.network:3000",
"http://ngl-dual-101.testnet.symboldev.network:3000",
"http://ngl-dual-201.testnet.symboldev.network:3000",
"http://ngl-dual-301.testnet.symboldev.network:3000",
"http://ngl-dual-401.testnet.symboldev.network:3000",
"http://ngl-dual-501.testnet.symboldev.network:3000",
"http://ngl-dual-601.testnet.symboldev.network:3000"
]
}
},
Expand Down
7 changes: 5 additions & 2 deletions ios/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ GEM
algoliasearch (1.27.5)
httpclient (~> 2.8, >= 2.8.3)
json (>= 1.5.1)
artifactory (3.0.15)
atomos (0.1.3)
aws-eventstream (1.1.0)
aws-partitions (1.358.0)
Expand Down Expand Up @@ -93,9 +94,10 @@ GEM
faraday_middleware (1.0.0)
faraday (~> 1.0)
fastimage (2.2.0)
fastlane (2.156.1)
fastlane (2.181.0)
CFPropertyList (>= 2.3, < 4.0.0)
addressable (>= 2.3, < 3.0.0)
artifactory (~> 3.0)
aws-sdk-s3 (~> 1.0)
babosa (>= 1.0.3, < 2.0.0)
bundler (>= 1.12.0, < 3.0.0)
Expand All @@ -116,6 +118,7 @@ GEM
jwt (>= 2.1.0, < 3)
mini_magick (>= 4.9.4, < 5.0.0)
multipart-post (~> 2.0.0)
naturally (~> 2.2)
plist (>= 3.1.0, < 4.0.0)
rubyzip (>= 2.0.0, < 3.0.0)
security (= 0.1.3)
Expand Down Expand Up @@ -240,4 +243,4 @@ DEPENDENCIES
fastlane

BUNDLED WITH
2.1.2
2.2.28
4 changes: 2 additions & 2 deletions ios/NEMCatapultWallet/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1</string>
<string>4.4.2</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
<string>58</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSAppTransportSecurity</key>
Expand Down
Loading

0 comments on commit 7f46512

Please sign in to comment.