diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f3c60895c4548656d7cc5b7f620cf92a2a186de6..1f91cf99120d05847ea7faa83e6b619a8f5ae073 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -26,7 +26,7 @@ fast-build: failsafe-build: stage: alt_build when: on_failure - image: node:5 + image: node:6 script: - npm install - npm run postinstall @@ -50,7 +50,7 @@ docker-for-fast-build: services: - docker:dind script: - - echo 'FROM node:5' > Dockerfile + - echo 'FROM node:6' > Dockerfile - echo 'WORKDIR /customCache' >> Dockerfile - echo 'COPY ./ ./' >> Dockerfile - echo 'RUN du -s `find . -maxdepth 1 | egrep -v "^\.$"`>/before.txt' >> Dockerfile @@ -66,7 +66,7 @@ docker-for-fast-build: pages: stage: publish - image: node:latest + image: node:6 variables: GIT_STRATEGY: none script: @@ -99,7 +99,7 @@ mirror: release-web: stage: publish - image: node:latest + image: node:6 variables: GIT_STRATEGY: none script: diff --git a/build.json b/build.json index 17e9128d1ba358d5521cbec3403274497a633381..9e2e91a93aef3123b223d055823607a00d20d858 100644 --- a/build.json +++ b/build.json @@ -1,19 +1,5 @@ { "android": { - "debug": { - "keystore": "./Cesium.keystore", - "storePassword": "Ces1um2020!", - "alias": "Cesium", - "password": "Ces1um2020!", - "keystoreType": "jks" - }, - "release": { - "keystore": "./Cesium.keystore", - "storePassword": "Ces1um2020!", - "alias": "Cesium", - "password": "Ces1um2020!", - "keystoreType": "jks" - } }, "ios": { "debug": { @@ -29,4 +15,4 @@ "packageType": "app-store" } } -} \ No newline at end of file +} diff --git a/config.xml b/config.xml index 2b13e4c861a4e1848139853ec45b74a33e4a75f8..7008c1054e964b32efaca6c4955f94cc775e7296 100644 --- a/config.xml +++ b/config.xml @@ -1,5 +1,5 @@ <?xml version='1.0' encoding='utf-8'?> -<widget android-versionCode="104008" id="fr.duniter.cesium" ios-CFBundleIdentifier="org.duniter.cesium" version="1.4.8" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0"> +<widget android-versionCode="104012" id="fr.duniter.cesium" ios-CFBundleIdentifier="org.duniter.cesium" version="1.4.12" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0"> <name>Cesium</name> <description> An simple App for Duniter wallet diff --git a/doc/build_ios.md b/doc/build_ios.md index 233851ae3b87f466fc0caa1556b27be1f93d754e..d99ec0c3603750ea4e35a3ad2ab59c3c254aa5d0 100644 --- a/doc/build_ios.md +++ b/doc/build_ios.md @@ -70,7 +70,7 @@ export NVM_DIR="$HOME/.nvm" [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm # Node.js -nvm install 5 +nvm install 6 # node-pre-gyp npm install -g nw-gyp node-pre-gyp diff --git a/doc/development_guide.md b/doc/development_guide.md index 34e9af096992cd8c9c34bd5bc87d31d9999b2a6e..bec7a54187fc3213fd52a8171eeed938689cd42d 100644 --- a/doc/development_guide.md +++ b/doc/development_guide.md @@ -45,7 +45,7 @@ To build Cesium, you will have to: > To remind: check that your command line is configured: > - You must place yourself in the directory of the application: `cd cesium` -> - and be configured for NodeJs v5: `nvm use 5` (please check using the command `node --version`) +> - and be configured for NodeJs v6: `nvm use 6` (please check using the command `node --version`) ## Prepare environment, then compile and launch diff --git a/doc/fr/development_tutorial-01.md b/doc/fr/development_tutorial-01.md index cef797671a2b069a5ea5a88093de217d3a6edeb2..922307276351eaace0c33f30e1232b28bdff27bd 100644 --- a/doc/fr/development_tutorial-01.md +++ b/doc/fr/development_tutorial-01.md @@ -93,10 +93,10 @@ Vous pouvez installer nvm avec la commande suivante : curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.6/install.sh | bash ``` -Fermez puis rouvrez votre terminal, comme indiqué. Puis, installez Node.js (choisissez la version 5) : +Fermez puis rouvrez votre terminal, comme indiqué. Puis, installez Node.js (choisissez la version 6) : ```bash -nvm install 5 +nvm install 6 ``` Vous aurez alors la dernière version de la branche 5.x de Node.js prête à l'emploi. @@ -110,7 +110,7 @@ sudo apt-get install build-essential #### Sous Windows -Pour Windows, téléchargez la version 5 disponible sur le site officiel de Node.js : https://nodejs.org +Pour Windows, téléchargez la version 6 disponible sur le site officiel de Node.js : https://nodejs.org Puis lancez l'installeur ainsi téléchargé. diff --git a/doc/fr/development_tutorial-03-android.md b/doc/fr/development_tutorial-03-android.md index 2ba71aa40f3a36b105a1b4794f3103d33bdebc1f..779fc0243404af2ad18ee5120786f1f8b9cde3a1 100644 --- a/doc/fr/development_tutorial-03-android.md +++ b/doc/fr/development_tutorial-03-android.md @@ -116,10 +116,10 @@ Vérifiez que vous utilisez bien la version de NodeJs dont Cesium a besoin à l' node --version ``` -Si vous n'êtes pas sur une v5.X.X, utilisez la commande +Si vous n'êtes pas sur une v6, utilisez la commande ``` -nvm use 5 +nvm use 6 ``` Vous pouvez maintenant lancer l'instalaltion du projet Cesium pour Android : diff --git a/github.sh b/github.sh index 2f40d8a452ed91f4ab6efbff32dfcede79e49dc5..68a4fed4ba33c92938890c76c382ba0d2c1f4f31 100755 --- a/github.sh +++ b/github.sh @@ -9,11 +9,10 @@ then fi ### Get version to release -current=`grep -P "version\": \"\d+.\d+.\d+(\w*)" package.json | grep -oP "\d+.\d+.\d+(\w*)"` -if [[ "_$version" != "_" ]]; then - echo "ERROR: Unable to read 'version' in the file 'package.json'." - echo " - Make sure the file 'package.json' exists and is readable." - exit 1 +current=`grep -P "version\": \"\d+.\d+.\d+(\w*)" package.json | grep -m 1 -oP "\d+.\d+.\d+(\w*)"` +if [[ "_$current" == "_" ]]; then + echo "Unable to read the current version in 'package.json'. Please check version format is: x.y.z (x and y should be an integer)." + exit 1; fi echo "Current version: $current" @@ -53,10 +52,10 @@ case "$1" in prerelease="false" fi - description=`echo $2` - if [[ "_$description" = "_" ]]; then - description="Release v$current" - fi + description=`echo $2` + if [[ "_$description" = "_" ]]; then + description="Release v$current" + fi result=`curl -s -H ''"$GITHUT_AUTH"'' "$REPO_API_URL/releases/tags/v$current"` release_url=`echo "$result" | grep -P "\"url\": \"[^\"]+" | grep -oP "https://[A-Za-z0-9/.-]+/releases/\d+"` @@ -87,7 +86,7 @@ case "$1" in fi ### Sending files - echo "Uploading files to ${upload_url}" + echo "Uploading files to ${upload_url} ..." dirname=$(pwd) ZIP_FILE="$dirname/platforms/web/build/${PROJECT_NAME}-v$current-web.zip" diff --git a/install.sh b/install.sh index 7efea5784f5b770c9cb9409fd4489aa50ac3f879..a59a1b6c4b1105ef721e1e5049bbc178723f25af 100755 --- a/install.sh +++ b/install.sh @@ -15,7 +15,7 @@ if [ "_$CESIUM_DIR" = "_" ]; then fi latest_version() { - echo "v1.4.8" #lastest + echo "v1.4.12" #lastest } api_release_url() { diff --git a/package.json b/package.json index 850007322cf37d9af76e3d3672cb7f3ed55b911d..4d5a0a1ec8d3fb2d91cf9b6f8defb5bd81510c11 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,9 @@ { "name": "cesium", - "version": "1.4.8", + "version": "1.4.12", "description": "Cesium Wallet for G1 libre currency", + "author": "Benoit Lavenier <benoit.lavenier@e-is.pro>", + "license": "AGPL-3.0", "repository": { "type": "git", "url": "git@git.duniter.org:clients/cesium/cesium.git" @@ -22,8 +24,6 @@ "cordova", "crypto-currency" ], - "author": "Benoit Lavenier <benoit.lavenier@e-is.pro>", - "license": "AGPL-3.0", "readmeFilename": "README.md", "bugs": { "url": "https://git.duniter.org/clients/cesium-grp/cesium/issues", @@ -119,7 +119,7 @@ "cordova-clipboard", { "id": "cordova-plugin-minisodium", - "locator": "https://github.com/bpresles/cordova-plugin-minisodium.git" + "locator": "https://github.com/E-IS/cordova-plugin-minisodium.git" }, { "id": "phonegap-plugin-barcodescanner", diff --git a/release.sh b/release.sh index 5735b2676eaeef47acf24f1508236927e6aa5e1c..6d243caa2508dc88f4990366544055111d5ba495 100755 --- a/release.sh +++ b/release.sh @@ -11,7 +11,7 @@ fi DIRNAME=`pwd` ### Get current version (package.json) -current=`grep -oP "version\": \"\d+.\d+.\d+((a|b)[0-9]+)?" package.json | grep -oP "\d+.\d+.\d+((a|b)[0-9]+)?"` +current=`grep -oP "version\": \"\d+.\d+.\d+((a|b)[0-9]+)?" package.json | grep -m 1 -oP "\d+.\d+.\d+((a|b)[0-9]+)?"` if [[ "_$current" == "_" ]]; then echo "Unable to read the current version in 'package.json'. Please check version format is: x.y.z (x and y should be an integer)." exit 1; @@ -26,162 +26,167 @@ if [[ "_$currentAndroid" == "_" ]]; then fi echo "Current Android version: $currentAndroid" +# Check version format +if [[ ! $2 =~ ^[0-9]+.[0-9]+.[0-9]+((a|b)[0-9]+)?$ || ! $3 =~ ^[0-9]+$ ]]; then + echo "Wrong version format" + echo "Usage:" + echo " > ./release.sh [pre|rel] <version> <android-version> <release_description>" + echo "with:" + echo " - pre: use for pre-release" + echo " - rel: for full release" + echo " - version: x.y.z" + echo " - android-version: nnn" + echo " - release_description: a comment on release" + exit 1 +fi -### Releasing -if [[ $2 =~ ^[0-9]+.[0-9]+.[0-9]+((a|b)[0-9]+)?$ && $3 =~ ^[0-9]+$ ]]; then - - echo "new build version: $2" - echo "new build android version: $3" - case "$1" in - rel|pre) - # Change the version in files: 'package.json' and 'config.xml' - sed -i "s/version\": \"$current\"/version\": \"$2\"/g" package.json - currentConfigXmlVersion=`grep -oP "version=\"\d+.\d+.\d+((a|b)[0-9]+)?\"" config.xml | grep -oP "\d+.\d+.\d+((a|b)[0-9]+)?"` - sed -i "s/ version=\"$currentConfigXmlVersion\"/ version=\"$2\"/g" config.xml - sed -i "s/ android-versionCode=\"$currentAndroid\"/ android-versionCode=\"$3\"/g" config.xml - - # Change version in file: 'www/manifest.json' - currentManifestJsonVersion=`grep -oP "version\": \"\d+.\d+.\d+((a|b)[0-9]+)?\"" www/manifest.json | grep -oP "\d+.\d+.\d+((a|b)[0-9]+)?"` - sed -i "s/version\": \"$currentManifestJsonVersion\"/version\": \"$2\"/g" www/manifest.json - - # Bump the install.sh - sed -i "s/echo \"v.*\" #lastest/echo \"v$2\" #lastest/g" install.sh - ;; - *) - echo "No task given" - exit 1 - ;; - esac - - # Load env.sh if exists - if [[ -f "${DIRNAME}/.local/env.sh" ]]; then - echo "Loading .local/env.sh ..." - source "${DIRNAME}/.local/env.sh" $* - fi - - # Check the Java version - JAVA_VERSION=`java -version 2>&1 | egrep "(java|openjdk) version" | awk '{print $3}' | tr -d \"` - if [[ $? -ne 0 ]]; then - echo "No Java JRE 1.8 found in machine. This is required for Android artifacts." - exit 1 - fi - JAVA_MAJOR_VERSION=`echo ${JAVA_VERSION} | awk '{split($0, array, ".")} END{print array[1]}'` - JAVA_MINOR_VERSION=`echo ${JAVA_VERSION} | awk '{split($0, array, ".")} END{print array[2]}'` - if [[ ${JAVA_MAJOR_VERSION} -ne 1 ]] || [[ ${JAVA_MINOR_VERSION} -ne 8 ]]; then - echo "Require a Java JRE in version 1.8, but found ${JAVA_VERSION}. You can override your default JAVA_HOME in '.local/env.sh'." +echo "new build version: $2" +echo "new build android version: $3" +case "$1" in + rel|pre) + # Change the version in files: 'package.json' and 'config.xml' + sed -i "s/version\": \"$current\"/version\": \"$2\"/g" package.json + currentConfigXmlVersion=`grep -oP "version=\"\d+.\d+.\d+((a|b)[0-9]+)?\"" config.xml | grep -oP "\d+.\d+.\d+((a|b)[0-9]+)?"` + sed -i "s/ version=\"$currentConfigXmlVersion\"/ version=\"$2\"/g" config.xml + sed -i "s/ android-versionCode=\"$currentAndroid\"/ android-versionCode=\"$3\"/g" config.xml + + # Change version in file: 'www/manifest.json' + currentManifestJsonVersion=`grep -oP "version\": \"\d+.\d+.\d+((a|b)[0-9]+)?\"" www/manifest.json | grep -oP "\d+.\d+.\d+((a|b)[0-9]+)?"` + sed -i "s/version\": \"$currentManifestJsonVersion\"/version\": \"$2\"/g" www/manifest.json + + # Bump the install.sh + sed -i "s/echo \"v.*\" #lastest/echo \"v$2\" #lastest/g" install.sh + ;; + *) + echo "No task given" exit 1 - fi - echo "Java: $JAVA_VERSION" - + ;; +esac - # force nodejs version to 6 - if [[ -d "$NVM_DIR" ]]; then - . $NVM_DIR/nvm.sh - nvm use 6 - if [[ $? -ne 0 ]]; then - exit 1 - fi - else - echo "nvm (Node version manager) not found (directory $NVM_DIR not found). Please install, and retry" - exit 1 - fi +# Load env.sh if exists +if [[ -f "${DIRNAME}/.local/env.sh" ]]; then + echo "Loading .local/env.sh ..." + source "${DIRNAME}/.local/env.sh" $* +fi - # Update config file - gulp config --env default_fr +# Check the Java version +JAVA_VERSION=`java -version 2>&1 | egrep "(java|openjdk) version" | awk '{print $3}' | tr -d \"` +if [[ $? -ne 0 ]]; then + echo "No Java JRE 1.8 found in machine. This is required for Android artifacts." + exit 1 +fi +JAVA_MAJOR_VERSION=`echo ${JAVA_VERSION} | awk '{split($0, array, ".")} END{print array[1]}'` +JAVA_MINOR_VERSION=`echo ${JAVA_VERSION} | awk '{split($0, array, ".")} END{print array[2]}'` +if [[ ${JAVA_MAJOR_VERSION} -ne 1 ]] || [[ ${JAVA_MINOR_VERSION} -ne 8 ]]; then + echo "Require a Java JRE in version 1.8, but found ${JAVA_VERSION}. You can override your default JAVA_HOME in '.local/env.sh'." + exit 1 +fi +echo "Java: $JAVA_VERSION" - echo "----------------------------------" - echo "- Compiling sources..." - echo "----------------------------------" - gulp - echo "----------------------------------" - echo "- Building Android artifact..." - echo "----------------------------------" - rm -rf platforms/android/build/outputs/release/* - ionic build android --release +# force nodejs version to 6 +if [[ -d "$NVM_DIR" ]]; then + . $NVM_DIR/nvm.sh + nvm use 6 if [[ $? -ne 0 ]]; then exit 1 fi +else + echo "nvm (Node version manager) not found (directory $NVM_DIR not found). Please install, and retry" + exit 1 +fi - echo "----------------------------------" - echo "- Building web artifact..." - echo "----------------------------------" +# Update config file +gulp config --env default_fr - # Update config file - gulp config --env default - gulp build:web --release - if [[ $? -ne 0 ]]; then - exit 1 - fi +echo "----------------------------------" +echo "- Compiling sources..." +echo "----------------------------------" +gulp - echo "----------------------------------" - echo "- Executing git push, with tag: v$2" - echo "----------------------------------" - - # Commit - cd $DIRNAME - git reset HEAD - git add package.json config.xml install.sh www/js/config.js www/manifest.json - git commit -m "v$2" - git tag "v$2" - git push - if [[ $? -ne 0 ]]; then - exit 1 - fi +echo "----------------------------------" +echo "- Building Android artifact..." +echo "----------------------------------" +rm -rf platforms/android/build/outputs/release/* +ionic build android --release +if [[ $? -ne 0 ]]; then + exit 1 +fi - # Pause (wait propagation to from git.duniter.org to github) - echo " Waiting 30s, for propagation to github..." - sleep 30s +echo "----------------------------------" +echo "- Building web artifact..." +echo "----------------------------------" - description="$4" - if [[ "_$description" == "_" ]]; then - description="Release v$2" - fi +# Update config file +gulp config --env default +gulp build:web --release +if [[ $? -ne 0 ]]; then + exit 1 +fi - echo "**********************************" - echo "* Uploading artifacts to Github..." - echo "**********************************" +echo "----------------------------------" +echo "- Executing git push, with tag: v$2" +echo "----------------------------------" + +# Commit +cd $DIRNAME +git reset HEAD +git add package.json config.xml install.sh www/js/config.js www/manifest.json +git commit -m "v$2" +git tag "v$2" +git push +if [[ $? -ne 0 ]]; then + exit 1 +fi - ./github.sh $1 ''"$description"'' - if [[ $? -ne 0 ]]; then - exit 1 - fi +# Pause (wait propagation to from git.duniter.org to github) +echo " Waiting 30s, for propagation to github..." +sleep 40s - echo "----------------------------------" - echo "- Building desktop artifacts..." - echo "----------------------------------" +description="$4" +if [[ "_$description" == "_" ]]; then + description="Release v$2" +fi - git submodule init - git submodule sync - git submodule update --remote --merge +echo "**********************************" +echo "* Uploading artifacts to Github..." +echo "**********************************" - if [[ -d "$DIRNAME/platforms/desktop" ]]; then - cd platforms/desktop +./github.sh $1 ''"$description"'' +if [[ $? -ne 0 ]]; then + exit 1 +fi - # Build desktop assets - ./release.sh $2 - if [[ $? -ne 0 ]]; then - exit 1 - fi - else - echo "WARN: platform/desktop not found -> Skipping desktop build!" - fi; +echo "----------------------------------" +echo "- Building desktop artifacts..." +echo "----------------------------------" - # back to nodejs version 6 - cd $DIRNAME - nvm use 6 +git submodule init && git submodule sync && git submodule update --remote --merge +if [[ $? -ne 0 ]]; then + echo "Unable to sync git submodule. Could not build desktop version" + exit 1 +fi - echo "**********************************" - echo "* Build release succeed !" - echo "**********************************" +if [[ -d "${DIRNAME}/platforms/desktop" ]]; then + cd "${DIRNAME}/platforms/desktop" + # Fetch last updates + git fetch origin && git merge origin/master || exit 1 + + # Build desktop assets + ./release.sh $2 + if [[ $? -ne 0 ]]; then + exit 1 + fi else - echo "Wrong version format" - echo "Usage:" - echo " > ./release.sh [pre|rel] <version> <android-version> <release_description>" - echo "with:" - echo " version: x.y.z" - echo " android-version: nnn" - echo " release_description: a short description of the release" -fi + echo "WARN: platform/desktop not found -> Skipping desktop build!" +fi; + +# back to nodejs version 6 +cd ${DIRNAME} +nvm use 6 + +echo "**********************************" +echo "* Build release succeed !" +echo "**********************************" diff --git a/resources/android/store/logo_512px.png b/resources/android/store/logo_512px.png new file mode 100644 index 0000000000000000000000000000000000000000..68daf16b415754e4300fa873514780a16f509082 Binary files /dev/null and b/resources/android/store/logo_512px.png differ diff --git a/www/i18n/locale-en-GB.json b/www/i18n/locale-en-GB.json index 6749473f242e72d526596a84b09b992922cbce0a..60c0deb561146e3e342e5bb16326b4351fc7615a 100644 --- a/www/i18n/locale-en-GB.json +++ b/www/i18n/locale-en-GB.json @@ -774,7 +774,8 @@ "COULD_NOT_ADD_EXISTING_WALLET": "Wallet already existing in the list.", "UNKNOWN_WALLET_ID": "Unknown secondary wallet.", "RESTORE_WALLET_LIST_FAILED": "Unable to restore the list of wallets.", - "INVALID_FILE_FORMAT": "Invalid file format." + "INVALID_FILE_FORMAT": "Invalid file format.", + "SAME_TX_RECIPIENT": "The recipient must be different from the issuer." }, "INFO": { "POPUP_TITLE": "Information", diff --git a/www/i18n/locale-en.json b/www/i18n/locale-en.json index 378db495a54c815e83d76310db4d000eb00a83aa..725db3dbffde55625fbb51841eaffb925306f927 100644 --- a/www/i18n/locale-en.json +++ b/www/i18n/locale-en.json @@ -774,7 +774,8 @@ "COULD_NOT_ADD_EXISTING_WALLET": "Wallet already existing in the list.", "UNKNOWN_WALLET_ID": "Unknown secondary wallet.", "RESTORE_WALLET_LIST_FAILED": "Unable to restore the list of wallets.", - "INVALID_FILE_FORMAT": "Invalid file format." + "INVALID_FILE_FORMAT": "Invalid file format.", + "SAME_TX_RECIPIENT": "The recipient must be different from the issuer." }, "INFO": { "POPUP_TITLE": "Information", diff --git a/www/i18n/locale-eo-EO.json b/www/i18n/locale-eo-EO.json index 2d5968ea3cba0be42fb8c2bf414950a0fa32ab33..04c3ae4d9dcd1690c008426520d4b40b01bc2f84 100644 --- a/www/i18n/locale-eo-EO.json +++ b/www/i18n/locale-eo-EO.json @@ -57,10 +57,10 @@ "LANGUAGE": "Lingvo", "UNIVERSAL_DIVIDEND": "Universala dividendo", "UD": "UD", - "DATE_PATTERN": "TT/MM/JJ HH:mm", - "DATE_FILE_PATTERN": "JJJJ-MM-TT", - "DATE_SHORT_PATTERN": "TT/MM/JJ", - "DATE_MONTH_YEAR_PATTERN": "MM/JJJJ", + "DATE_PATTERN": "DD/MM/YY HH:mm", + "DATE_FILE_PATTERN": "YYYY-MM-DD", + "DATE_SHORT_PATTERN": "DD/MM/YY", + "DATE_MONTH_YEAR_PATTERN": "MM/YYYY", "EMPTY_PARENTHESIS": "(malplena)", "UID": "PseÅdonimo", "ENABLE": "Aktiva", @@ -239,7 +239,7 @@ "TAB_WOT": "Reto de fido", "TAB_NETWORK": "Reto", "TAB_BLOCKS": "Blokoj", - "CURRENCY_SHORT_DESCRIPTION": "{{currency|abbreviate}} estas <b>libera mono</b>, kiu ekis {{firstBlockTime|formatFromNow}}. Äœi nombras nun <b>{{N}} membrojn</b>, kiuj produktas kaj ricevas <a ng-click=\"showHelpModal('ud')\">Universalan Dividendon</a> (DU), ĉiun {{dt|formatPeriod}}n.", + "CURRENCY_SHORT_DESCRIPTION": "{{currency|abbreviate}} estas <b>libera mono</b>, kiu ekis {{firstBlockTime|formatFromNow}}. Äœi nombras nun <b>{{N}} membrojn</b>, kiuj produktas kaj ricevas <a ng-click=\"showHelpModal('ud')\">Universalan Dividendon</a> (UD), ĉiun {{dt|formatPeriod}}n.", "NETWORK_RULES_DIVIDER": "Reguloj de la reto", "CURRENCY_NAME": "Nomo de la mono", "MEMBERS": "Nombro de membroj", @@ -490,9 +490,9 @@ "NEED_RENEW_MEMBERSHIP": "Vi ne plu estas membro de la mono, ĉar <b>via aliÄo finiÄis</b>. Pensu <a ng-click=\"doQuickFix('renew')\">revalidigi vian aliÄon</a>.", "NEED_RENEW_MEMBERSHIP_AFTER_CANCELLED": "Vi ne plu estas membro de la mono, <b>pro manko da atestaĵoj</b>. Pensu <a ng-click=\"doQuickFix('renew')\">revalidigi vian aliÄon</a>.", "NO_WAITING_MEMBERSHIP": "Neniu aliÄo-peto atendanta. Se vi deziras <b>fariÄi membro</b>, pensu <a ng-click=\"doQuickFix('membership')\">sendi la aliÄo-peton</a>.", - "CERTIFICATION_COUNT": "Atestaĵoj ricevitaj", + "CERTIFICATION_COUNT": "Ricevitaj atestaĵoj", "CERTIFICATION_COUNT_SHORT": "Atestaĵoj", - "SIG_STOCK": "Atestaĵoj senditaj", + "SIG_STOCK": "Senditaj atestaĵoj", "BTN_RECEIVE_MONEY": "Enkasigi", "BTN_SELECT_ALTERNATIVES_IDENTITIES": "Aliri alian identecon...", "BTN_FIX_MEMBERSHIP": "Resendi la aliÄo-peton...", @@ -518,7 +518,7 @@ "SELECT_ACCOUNT_TYPE": "Elektu la tipon de konto kreota:", "MEMBER_ACCOUNT": "Membro-konto", "MEMBER_ACCOUNT_TITLE": "Kreado de membro-konto", - "MEMBER_ACCOUNT_HELP": "Se vi ankoraÅ ne enskribiÄis kiel individuo (nur unu konto eblas por unu individuo). Tia konto ebligas kunprodukti la monon, ricevante <b> universalan dividendon</b> ĉiun {{parameters.dt|formatPeriod}}.", + "MEMBER_ACCOUNT_HELP": "Se vi ankoraÅ ne enskribiÄis kiel individuo (nur unu konto eblas por unu individuo). Tia konto ebligas kunprodukti la monon, ricevante <b> universalan dividendon</b> ĉiun {{parameters.dt|formatPeriod}}n.", "WALLET_ACCOUNT": "Simpla monujo", "WALLET_ACCOUNT_TITLE": "Kreado de monujo", "WALLET_ACCOUNT_HELP": "Por ĉiuj aliaj kazoj, ekzemple se vi bezonas plian konton.<br/>Neniu universala dividendo estos kreita per tia konto.", diff --git a/www/i18n/locale-es-ES.json b/www/i18n/locale-es-ES.json index b0515312ea37d623ebfab1ecb0ef55e74e3d63fc..b34ee808529324ebdaa0bc8ef42caa6248bd825d 100644 --- a/www/i18n/locale-es-ES.json +++ b/www/i18n/locale-es-ES.json @@ -713,7 +713,8 @@ "EXISTING_ACCOUNT_REQUEST": "Por favor, cambie su frase secreta para que coincida con una cuenta sin usar.", "GET_LICENSE_FILE_FAILED": "Error al obtener el archivo de licencia", "CHECK_NETWORK_CONNECTION": "Ningún nodo parece alcanzable.<br/><br/><b>Compruebe la conexión a Internet</b>.", - "INVALID_FILE_FORMAT": "Formato de archivo inválido." + "INVALID_FILE_FORMAT": "Formato de archivo inválido.", + "SAME_TX_RECIPIENT": "El destinatario debe ser diferente del emisor." }, "INFO": { "POPUP_TITLE": "Información", diff --git a/www/i18n/locale-fr-FR.json b/www/i18n/locale-fr-FR.json index 347d37504734c739ce2ff4ee9d00007a8dfa8761..1ba9781ba5796ddd1e8aa0cbc1a01da7b08a2002 100644 --- a/www/i18n/locale-fr-FR.json +++ b/www/i18n/locale-fr-FR.json @@ -774,7 +774,8 @@ "COULD_NOT_ADD_EXISTING_WALLET": "Portefeuille déjà existant dans la liste.", "UNKNOWN_WALLET_ID": "Portefeuille secondaire inconnu.", "RESTORE_WALLET_LIST_FAILED": "Échec de la restauration des portefeuilles secondaires.", - "INVALID_FILE_FORMAT": "Format de fichier invalide." + "INVALID_FILE_FORMAT": "Format de fichier invalide.", + "SAME_TX_RECIPIENT": "Le destinataire doit être différent de l'émetteur." }, "INFO": { "POPUP_TITLE": "Information", diff --git a/www/i18n/locale-it-IT.json b/www/i18n/locale-it-IT.json index 7ef4120a9ad63846667643892c78ea8b05c9fc9d..4d3f3407d0b4b475b004a7a50c58d6c2ddef8ff7 100644 --- a/www/i18n/locale-it-IT.json +++ b/www/i18n/locale-it-IT.json @@ -115,8 +115,8 @@ }, "HOME": { "TITLE": "Cesium", - "MESSAGE": "Benvenuti nell'{{'COMMON.APP_NAME'|translate}} App!", - "MESSAGE_CURRENCY": "Scambiate in moneta libera. {{currency|abbreviate}}!", + "WELCOME": "Benvenuti nell'{{'COMMON.APP_NAME'|translate}} App!", + "MESSAGE": "Scambiate in moneta libera. {{currency|abbreviate}}!", "BTN_CURRENCY": "Esplorare la moneta", "BTN_ABOUT": "a proposito", "BTN_HELP": "Aiuto", @@ -737,7 +737,8 @@ "SAVE_BEFORE_LEAVE_TITLE": "Modifiche non salvate", "LOGOUT": "Sei sicuro/a di voler chiudere la sessione?", "USE_FALLBACK_NODE": "Peer <b>{{old}}</b> indisponibile o indirizzo errato.<br/><br/>Vuoi utilizzare temporanemante il <b>{{new}}</b> nodo?", - "ISSUE_524_SEND_LOG": "La transaction a été rejettée, à cause d'une anomalie connue (ticket #524) mais <b>non reproduite</b>.<br/><br/>Pour nous aider les développeurs à corriger cette erreur, <b>acceptez-vous la transmission de vos logs</b> par message ?<br/><small>(Aucune donnée confidentielle n'est envoyée)</small>." + "INVALID_FILE_FORMAT": "Formato file non valido.", + "SAME_TX_RECIPIENT": "Il destinatario deve essere diverso dall'emittente." }, "DOWNLOAD": { "POPUP_TITLE": "<b>File di cancellazione dell'identità /b>", diff --git a/www/js/config.js b/www/js/config.js index 9a1966564bc141fc9df2df09f0465af19330051f..3c95dc61bbdda9bb915d62624e22562f64ce95e0 100644 --- a/www/js/config.js +++ b/www/js/config.js @@ -93,9 +93,9 @@ angular.module("cesium.config", []) "defaultCountry": "France" } }, - "version": "1.4.8", - "build": "2019-10-28T15:15:43.927Z", + "version": "1.4.12", + "build": "2019-11-05T15:23:40.710Z", "newIssueUrl": "https://git.duniter.org/clients/cesium-grp/cesium/issues/new" }) -; \ No newline at end of file +; diff --git a/www/js/controllers/transfer-controllers.js b/www/js/controllers/transfer-controllers.js index 1be2e91852219627c5d29f6b30891f4c024731c9..61c1d16e7d200ecb913425fd69b7a0628891bda3 100644 --- a/www/js/controllers/transfer-controllers.js +++ b/www/js/controllers/transfer-controllers.js @@ -226,6 +226,7 @@ function TransferModalController($scope, $q, $translate, $timeout, $filter, $foc }; $scope.onAmountChanged = function() { + if ($scope.sending) return; // skip if sending TX var amount = $scope.formData.amount; if (amount && typeof amount === "string") { @@ -333,12 +334,12 @@ function TransferModalController($scope, $q, $translate, $timeout, $filter, $foc } }) .then(function() { - $scope.sending = false; UIUtils.loading.hide(); return $scope.closeModal(true); }) .then(function(res) { $timeout(function() { + $scope.sending = false; UIUtils.toast.show('INFO.TRANSFER_SENT'); }, 500); return res; diff --git a/www/js/services/wallet-services.js b/www/js/services/wallet-services.js index 3c36328754e075d80429bbffec8ef4d65b5cae46..97b4a431bd149038cedeb50e28a4bbb12c1d6056 100644 --- a/www/js/services/wallet-services.js +++ b/www/js/services/wallet-services.js @@ -22,11 +22,11 @@ angular.module('cesium.wallet.services', ['ngApi', 'ngFileSaver', 'cesium.bma.se STORAGE_DATA_PREFIX: 'data-', STORAGE_SECKEY: 'seckey', /* Need for compat with old currencies (test_net and sou) */ - TX_VERSION: csConfig.compatProtocol_0_80 ? 3 : BMA.constants.PROTOCOL_VERSION, - IDTY_VERSION: csConfig.compatProtocol_0_80 ? 2 : BMA.constants.PROTOCOL_VERSION, - MS_VERSION: csConfig.compatProtocol_0_80 ? 2 : BMA.constants.PROTOCOL_VERSION, - CERT_VERSION: csConfig.compatProtocol_0_80 ? 2 : BMA.constants.PROTOCOL_VERSION, - REVOKE_VERSION: csConfig.compatProtocol_0_80 ? 2 : BMA.constants.PROTOCOL_VERSION, + TX_VERSION: BMA.constants.PROTOCOL_VERSION, + IDTY_VERSION: BMA.constants.PROTOCOL_VERSION, + MS_VERSION: BMA.constants.PROTOCOL_VERSION, + CERT_VERSION: BMA.constants.PROTOCOL_VERSION, + REVOKE_VERSION: BMA.constants.PROTOCOL_VERSION, TX_MAX_INPUTS_COUNT: 40 // Allow to get a TX with less than 100 rows (=max row count in Duniter protocol) }, data = {}, @@ -1071,7 +1071,10 @@ angular.module('cesium.wallet.services', ['ngApi', 'ngFileSaver', 'cesium.bma.se var minBase = filterBase; var maxBase = filterBase; _.find(data.sources || [], function(source) { - if (!source.consumed && source.base == filterBase){ + if (!source.consumed && source.base === filterBase && + // Filter on simple SIG output condition - fix #845 + BMA.regexp.TX_OUTPUT_SIG.exec(source.conditions) + ) { sourcesAmount += powBase(source.amount, source.base); sources.push(source); } @@ -1123,6 +1126,9 @@ angular.module('cesium.wallet.services', ['ngApi', 'ngFileSaver', 'cesium.bma.se if (!isLogin()){ throw {message:'ERROR.NEED_LOGIN_FIRST'}; } + if (destPub === data.pubkey){ + throw {message:'ERROR.SAME_TX_RECIPIENT'}; + } if (!amount) { throw {message:'ERROR.AMOUNT_REQUIRED'}; } diff --git a/www/manifest.json b/www/manifest.json index 31a223f01da3048ab80682efcb8268b9932a2093..e86d42d1892253003c15cf0d7d5a339f4a898f60 100644 --- a/www/manifest.json +++ b/www/manifest.json @@ -2,7 +2,7 @@ "short_name": "Cesium", "name": "Cesium", "manifest_version": 1, - "version": "1.4.8", + "version": "1.4.12", "default_locale": "fr", "description": "Manage your Duniter Wallet on a libre currency, like Äž1", "icons": [ diff --git a/www/templates/wallet/item_tx.html b/www/templates/wallet/item_tx.html index 2e4956ed36f98e1d582d21a3f7ff0d46013d5432..5959b6d7f4f5bdad6cee62bc5a064cd1aac3a72a 100644 --- a/www/templates/wallet/item_tx.html +++ b/www/templates/wallet/item_tx.html @@ -8,7 +8,7 @@ <a class="" ui-sref="app.wot_identity({pubkey:tx.pubkey, uid:tx.uid})" ng-if="::tx.uid"> {{::tx.name||tx.uid}} </a> - <a class="gray" ui-sref="app.wot_identity({pubkey:tx.pubkey, uid:tx.uid})" ng-if="::!tx.uid"> + <a class="gray" ui-sref="app.wot_identity({pubkey:tx.pubkey, uid:tx.uid})" ng-if="::!tx.uid && tx.pubkey"> <i class="ion-key gray"></i> {{::tx.pubkey | formatPubkey}} <span ng-if="::tx.name"> - {{::tx.name | truncText:40}}</span> @@ -38,7 +38,6 @@ <!-- not locked TX --> <span ng-if="::!tx.lockedOutputs" class="badge item-note" ng-class="{'badge-calm': tx.amount > 0}"> - <!--<span class="hidden-xs" ng-if=":rebind:tx.amount>0">+</span>--> <span ng-bind-html=":rebind:tx.amount| formatAmount:{currency:$root.currency.name}"></span> </span> @@ -47,8 +46,7 @@ class="badge item-note" ng-class="{'badge-calm': tx.amount > 0}" ng-click="showLockedOutputsPopover(tx, $event)"> - <i class="icon ion-locked" ></i> - <!--<span class="hidden-xs" ng-if=":rebind:tx.amount>0">+</span>--> + <b class="ion-locked" ></b> <span ng-bind-html=":rebind:tx.amount| formatAmount:{currency:$root.currency.name}"></span> </a>