diff --git a/.gitignore b/.gitignore
index 99fee19..67b3bdf 100644
--- a/.gitignore
+++ b/.gitignore
@@ -28,6 +28,7 @@ build/
.gradle
local.properties
*.iml
+*.hprof
# node.js
#
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 1dd6295..efb80dc 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -3,6 +3,15 @@ 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.4.0][v1.4.0] - 12-Nov-2021
+
+### Fixed
+- Fixed behavior when node is down and application crashes[#259](https://github.com/symbol/mobile-wallet/issues/259)
+- Fixed fees selector problems when recipient address is not provided [#254](https://github.com/symbol/mobile-wallet/issues/254)
+### Changed
+- Updated CI/CD pipeline
+- Build Android version against SDK version30
+
## [v1.3.0][v1.3.0] - 1-Nov-2021
### Fixed
@@ -28,3 +37,4 @@ The changelog format is based on [Keep a Changelog](https://keepachangelog.com/e
[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
+[v1.4.0]: https://github.com/symbol/mobile-wallet/releases/tag/1.4.0
diff --git a/Jenkinsfile b/Jenkinsfile
index 1fef9fd..2475c25 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -6,8 +6,7 @@ pipeline {
}
parameters {
- string(name: 'VERSION_NUMBER', defaultValue: '4.4.2', description: 'Version Number')
- string(name: 'BUILD_NUMBER', defaultValue: '59', description: 'Build Number')
+ string(name: 'VERSION_NUMBER', defaultValue: '4.4.3', description: 'Version Number')
string(name: 'DEPLOY_BETA_BRANCH', defaultValue: 'dev', description: 'Deploy Beta Branch Name')
choice(
name: 'TARGET_OS',
@@ -19,7 +18,7 @@ pipeline {
environment {
RUNNING_ON_CI = 'true'
VERSION_NUMBER = "${params.VERSION_NUMBER}"
- BUILD_NUMBER = "${params.BUILD_NUMBER}"
+ BUILD_NUMBER = sh(script: "echo `date +%y%m.%d.%H%M`", returnStdout: true).trim()
DEPLOY_BETA_BRANCH = "${params.DEPLOY_BETA_BRANCH}"
TARGET_OS = "${params.TARGET_OS}"
MATCH_GIT_BASIC_AUTHORIZATION = credentials('GHUB_CREDS_SECRET')
@@ -90,6 +89,19 @@ pipeline {
}
}
+ stage('Upload Android') {
+ when {
+ expression {
+ TARGET_OS == 'All' || TARGET_OS == 'Android'
+ }
+ }
+ steps {
+ // upload apk artifact to folder(env.branch_name) in AWS S3 bucket (s3://symbol-mobile-builds/branches)
+ // note that there is a s3 bucket retention policy deleting the files older than 60 days
+ sh "aws s3 cp android/app/build/outputs/apk/prod/release/ s3://symbol-mobile-builds/branches/\$BRANCH_NAME --recursive --exclude '*' --include '*.apk'"
+ }
+ }
+
// deploy to testnet
stage ('Deploy IOS - Alpha version') {
when {
@@ -98,7 +110,17 @@ pipeline {
}
}
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 '''
+ 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}'"
}
}
diff --git a/android/build.gradle b/android/build.gradle
index e473139..fbcad35 100644
--- a/android/build.gradle
+++ b/android/build.gradle
@@ -3,9 +3,9 @@
buildscript {
ext {
minSdkVersion = 23
- compileSdkVersion = 29
- targetSdkVersion = 29
- supportLibVersion = "28.0.0"
+ compileSdkVersion = 30
+ targetSdkVersion = 30
+ supportLibVersion = "30.0.0"
RNNKotlinVersion = "1.3.61" // Or any version above 1.3.x
RNNKotlinStdlib = "kotlin-stdlib-jdk8"
}
diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties
index e0c4de3..8cf6eb5 100644
--- a/android/gradle/wrapper/gradle-wrapper.properties
+++ b/android/gradle/wrapper/gradle-wrapper.properties
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-5.5-all.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.3-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
diff --git a/android/tools/script-git-version.gradle b/android/tools/script-git-version.gradle
index 5f2fcb4..c0b2724 100644
--- a/android/tools/script-git-version.gradle
+++ b/android/tools/script-git-version.gradle
@@ -16,7 +16,7 @@ ext {
gitVersionCode = git.log().size()
gitVersionCodeTime = git.head().time
buildDate = new Date()
- customVersionName = "${gitShortVersionName}-${git.head().abbreviatedId}-${buildDate.format('yyMMdd')}"
+ customVersionName = "${gitShortVersionName}-${git.head().abbreviatedId}-${buildDate.format('yyMMddHHmm')}"
}
task printVersion() {
diff --git a/ios/NEMCatapultWallet/Info.plist b/ios/NEMCatapultWallet/Info.plist
index 1e505b8..5d61cad 100644
--- a/ios/NEMCatapultWallet/Info.plist
+++ b/ios/NEMCatapultWallet/Info.plist
@@ -21,7 +21,7 @@
CFBundlePackageType
APPL
CFBundleShortVersionString
- 4.4.2
+ 4.4.3
CFBundleSignature
????
CFBundleVersion
@@ -89,5 +89,7 @@
Light
UIViewControllerBasedStatusBarAppearance
+ ITSAppUsesNonExemptEncryption
+
diff --git a/package-lock.json b/package-lock.json
index f7f8961..85fc739 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,6 +1,6 @@
{
"name": "symbol-mobile-wallet",
- "version": "1.3.0",
+ "version": "1.4.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
diff --git a/package.json b/package.json
index cfb475a..6ec0a28 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "symbol-mobile-wallet",
- "version": "1.3.0",
+ "version": "1.4.0",
"private": true,
"scripts": {
"git-info": "echo export default \"{ version: '$(git describe --tags `git rev-list --tags --max-count=1`)' };\" > src/shared/_git_commit.js",
@@ -9,6 +9,8 @@
"start": "yarn git-info; react-native start",
"dev": "react-native start",
"reconnect": "adb reverse tcp:8081 tcp:8081",
+ "build:android:dev": "react-native run-android --variant=devDebug",
+ "build:android:prod": "cd ./android && gradlew assembleProdRelease",
"test": "jest",
"lint": "eslint .",
"postinstall": "./scripts/post-install.sh"
diff --git a/src/screens/Send.js b/src/screens/Send.js
index 1152f3c..ca3b92e 100644
--- a/src/screens/Send.js
+++ b/src/screens/Send.js
@@ -59,15 +59,19 @@ class Send extends Component {
const { recipientAddress, amount, mosaicName, message } = this.props;
let isMosaicPresent = true;
- if(recipientAddress)
- this.onAddressChange(recipientAddress);
- if(mosaicName)
+ if (recipientAddress) {
+ this.onAddressChange(recipientAddress);
+ }
+ if (mosaicName) {
isMosaicPresent = await this.onMosaicChange(mosaicName);
- if(amount && isMosaicPresent)
- this.onAmountChange(amount);
- if(message)
- this.onMessageChange(message);
-
+ }
+ if (amount && isMosaicPresent) {
+ this.onAmountChange(amount);
+ }
+ if (message) {
+ this.onMessageChange(message);
+ }
+ await this.updateMaxFee();
};
verify = () => {
diff --git a/src/store/network.js b/src/store/network.js
index eb475f1..3224ea0 100644
--- a/src/store/network.js
+++ b/src/store/network.js
@@ -83,6 +83,16 @@ export default {
const networkType = getDefaultNetworkType();
const nodeList = networkType === 'mainnet' ? state.network.mainnetNodes : state.network.testnetNodes;
+ // verify selected node availability
+ if (selectedNode) {
+ try {
+ await NetworkService.getNetworkModelFromNode(selectedNode);
+ } catch (error) {
+ // reset selected node
+ selectedNode = null;
+ }
+ }
+
// assign node, if node list available and selectedNode is not set
if (nodeList.length && !selectedNode) {
const randomIndex = Math.floor(Math.random() * nodeList.length); //NOSONAR
diff --git a/src/store/transfer.js b/src/store/transfer.js
index cfb43a0..56a1af3 100644
--- a/src/store/transfer.js
+++ b/src/store/transfer.js
@@ -58,9 +58,10 @@ export default {
getMaxFee: async ({ state }, payload) => {
const networkType = NetworkService.getNetworkTypeFromModel(state.network.selectedNetwork);
const dummyAccount = Account.generateNewAccount(networkType);
+ const recipientAddress = payload.recipientAddress || dummyAccount.address.plain();
const transactionModel = {
type: 'transfer',
- recipientAddress: payload.recipientAddress,
+ recipientAddress: recipientAddress,
messageText: payload.message,
messageEncrypted: payload.messageEncrypted,
mosaics: payload.mosaics,