Commit d86b1bea authored by Bertrand Presles's avatar Bertrand Presles

Merge branch 'master' into feature/macos-support

parents 8e26b823 106aa7da
......@@ -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:
......
{
"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
}
<?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
......
......@@ -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
......
......@@ -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
......
......@@ -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é.
......
......@@ -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 :
......
......@@ -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"
......
......@@ -15,7 +15,7 @@ if [ "_$CESIUM_DIR" = "_" ]; then
fi
latest_version() {
echo "v1.4.8" #lastest
echo "v1.4.12" #lastest
}
api_release_url() {
......
{
"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",
......
......@@ -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 "**********************************"
......@@ -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",
......
......@@ -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",
......
......@@ -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.",
......
......@@ -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",
......
......@@ -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",
......
......@@ -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>",
......
......@@ -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
;
......@@ -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;
......
......@@ -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'};
}
......
......@@ -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": [
......
......@@ -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>
......
Markdown is supported
0%