Skip to content

Commit

Permalink
Merge pull request #263 from symbol/dev
Browse files Browse the repository at this point in the history
Dev->Main
  • Loading branch information
AnthonyLaw authored Nov 21, 2021
2 parents 7f46512 + c843948 commit 7328238
Show file tree
Hide file tree
Showing 12 changed files with 73 additions and 21 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ build/
.gradle
local.properties
*.iml
*.hprof

# node.js
#
Expand Down
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
30 changes: 26 additions & 4 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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')
Expand Down Expand Up @@ -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 {
Expand All @@ -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}'"
}
}
Expand Down
6 changes: 3 additions & 3 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Expand Down
2 changes: 1 addition & 1 deletion android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion android/tools/script-git-version.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
4 changes: 3 additions & 1 deletion ios/NEMCatapultWallet/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>4.4.2</string>
<string>4.4.3</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
Expand Down Expand Up @@ -89,5 +89,7 @@
<string>Light</string>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
</dict>
</plist>
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand All @@ -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"
Expand Down
20 changes: 12 additions & 8 deletions src/screens/Send.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,19 @@ class Send extends Component<Props, State> {
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 = () => {
Expand Down
10 changes: 10 additions & 0 deletions src/store/network.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion src/store/transfer.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 7328238

Please sign in to comment.