Compare commits

..

No commits in common. "master" and "wallet/release/4.13-rc1" have entirely different histories.

177 changed files with 4567 additions and 15503 deletions

14
.vscode/launch.json vendored
View file

@ -1,14 +0,0 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Launch Program",
"program": "${workspaceFolder}/www/index.html"
}
]
}

View file

@ -8,32 +8,26 @@ module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
exec: {
get_nwjs_for_pkg: {
command: 'if [ ! -d ./cache/0.19.5-pkg/osx64/nwjs.app ]; then cd ./cache; curl https://dl.nwjs.io/v0.19.5-mas-beta/nwjs-mas-v0.19.5-osx-x64.zip --output nwjs.zip; unzip nwjs.zip; mkdir -p ./0.19.5-pkg/osx64; cp -R ./nwjs-mas-v0.19.5-osx-x64/nwjs.app ./0.19.5-pkg/osx64/; fi'
},
create_others_dist: {
command: 'sh webkitbuilds/create-others-dist.sh "<%= pkg.name %>" "<%= pkg.fullVersion %>" "<%= pkg.nameCaseNoSpace %>" "<%= pkg.title %>"'
},
create_dmg_dist: {
command: 'sh webkitbuilds/create-dmg-dist.sh "<%= pkg.name %>" "<%= pkg.fullVersion %>" "<%= pkg.nameCaseNoSpace %>" "<%= pkg.title %>"'
},
create_pkg_dist: {
command: 'sh webkitbuilds/create-pkg-dist.sh "<%= pkg.name %>" "<%= pkg.fullVersion %>" "<%= pkg.nameCaseNoSpace %>" "<%= pkg.title %>"'
},
sign_desktop_dist: {
command: 'sh webkitbuilds/sign-desktop-dist.sh "<%= pkg.name %>" "<%= pkg.fullVersion %>"'
},
appConfig: {
command: 'node ./util/buildAppConfig.js'
},
android_studio: {
command: ' open -a open -a /Applications/Android\\ Studio.app platforms/android',
},
build_android_debug: {
command: 'cordova prepare android && cordova build android --debug',
},
build_android_release: {
command: 'cordova prepare android && cordova build android --release',
},
build_ios_debug: {
command: 'cordova prepare ios && cordova build ios --debug',
options: {
maxBuffer: 3200 * 1024
}
},
build_ios_release: {
command: 'cordova prepare ios && cordova build ios --release',
options: {
maxBuffer: 1600 * 1024
}
},
chrome: {
command: 'make -C chrome-app '
externalServices: {
command: 'node ./util/buildExternalServices.js'
},
clean: {
command: 'rm -Rf bower_components node_modules'
@ -44,38 +38,8 @@ module.exports = function(grunt) {
coveralls: {
command: 'cat coverage/report-lcov/lcov.info |./node_modules/coveralls/bin/coveralls.js'
},
create_dmg_dist: {
command: 'sh webkitbuilds/create-dmg-dist.sh "<%= pkg.name %>" "<%= pkg.fullVersion %>" "<%= pkg.nameCaseNoSpace %>" "<%= pkg.title %>"'
},
create_others_dist: {
command: 'sh webkitbuilds/create-others-dist.sh "<%= pkg.name %>" "<%= pkg.fullVersion %>" "<%= pkg.nameCaseNoSpace %>" "<%= pkg.title %>"'
},
create_pkg_dist: {
command: 'sh webkitbuilds/create-pkg-dist.sh "<%= pkg.name %>" "<%= pkg.fullVersion %>" "<%= pkg.nameCaseNoSpace %>" "<%= pkg.title %>"'
},
externalServices: {
command: 'node ./util/buildExternalServices.js'
},
get_nwjs_for_pkg: {
command: 'if [ ! -d ./cache/0.19.5-pkg/osx64/nwjs.app ]; then cd ./cache; curl https://dl.nwjs.io/v0.19.5-mas-beta/nwjs-mas-v0.19.5-osx-x64.zip --output nwjs.zip; unzip nwjs.zip; mkdir -p ./0.19.5-pkg/osx64; cp -R ./nwjs-mas-v0.19.5-osx-x64/nwjs.app ./0.19.5-pkg/osx64/; fi'
},
log_android: {
command: 'adb logcat | grep chromium',
},
run_android: {
command: 'cordova run android --device',
},
run_android_emulator: {
command: 'cordova run android --emulator',
},
sign_android: {
// When the build log outputs "Built the following apk(s):", it seems to need the filename to start with "android-release".
// It looks like it simply lists all apk files starting with "android-release"
command: 'rm -f platforms/android/build/outputs/apk/android-release-signed-*.apk; jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore ../bitcoin-com-release-key.jks -signedjar platforms/android/build/outputs/apk/android-release-signed.apk platforms/android/build/outputs/apk/android-release-unsigned.apk bitcoin-com && zipalign -v 4 platforms/android/build/outputs/apk/android-release-signed.apk platforms/android/build/outputs/apk/bitcoin-com-wallet-<%= pkg.fullVersion %>-android-signed-aligned.apk',
stdin: true,
},
sign_desktop_dist: {
command: 'sh webkitbuilds/sign-desktop-dist.sh "<%= pkg.name %>" "<%= pkg.fullVersion %>"'
chrome: {
command: 'make -C chrome-app '
},
wpinit: {
command: 'make -C cordova wp-init',
@ -83,9 +47,40 @@ module.exports = function(grunt) {
wpcopy: {
command: 'make -C cordova wp-copy',
},
iosdebug: {
command: 'npm run build:ios',
},
ios: {
command: 'npm run build:ios-release',
},
xcode: {
command: 'open platforms/ios/*.xcodeproj',
}
command: 'npm run open:ios',
},
androiddebug: {
command: 'npm run build:android',
},
android: {
command: 'npm run build:android-release',
},
androidrun: {
command: 'npm run run:android && npm run log:android',
},
androidbuild: {
command: 'cd cordova/project && cordova build android --release',
},
androidsign: {
command: 'rm -f cordova/project/platforms/android/build/outputs/apk/android-release-signed-aligned.apk; jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore ../bitcoin-com-release-key.jks -signedjar cordova/project/platforms/android/build/outputs/apk/android-release-signed.apk cordova/project/platforms/android/build/outputs/apk/android-release-unsigned.apk bitcoin-com && ../android-sdk-macosx/build-tools/27.0.1/zipalign -v 4 cordova/project/platforms/android/build/outputs/apk/android-release-signed.apk cordova/project/platforms/android/build/outputs/apk/android-release-signed-aligned.apk ',
stdin: true,
},
desktopsign: {
cmd: 'gpg -u E0AE67E7 --output webkitbuilds/others/<%= pkg.title %>-linux.zip.sig --detach-sig webkitbuilds/others/<%= pkg.title %>-linux.zip ; gpg -u E0AE67E7 --output webkitbuilds/others/<%= pkg.title %>.exe.sig --detach-sig webkitbuilds/others/<%= pkg.title %>.exe'
},
desktopverify: {
cmd: 'gpg --verify webkitbuilds/<%= pkg.title %>-linux.zip.sig webkitbuilds/<%= pkg.title %>-linux.zip; gpg --verify webkitbuilds/<%= pkg.title %>.exe.sig webkitbuilds/<%= pkg.title %>.exe'
},
osxsign: {
cmd: 'gpg -u E0AE67E7 --output webkitbuilds/<%= pkg.title %>.dmg.sig --detach-sig webkitbuilds/<%= pkg.title %>.dmg'
},
},
watch: {
options: {
@ -168,7 +163,7 @@ module.exports = function(grunt) {
},
bitanalytics: {
src: [
'bitanalytics/bitanalytics.js'
'bitanalytics/bitanalytics-0.1.0.js'
],
dest: 'www/lib/bitanalytics.js'
},
@ -301,10 +296,10 @@ module.exports = function(grunt) {
},
pkg: {
options: {
appName: '<%= pkg.title %>',
appName: '<%= pkg.nameCaseNoSpace %>',
platforms: ['osx64'],
buildDir: './webkitbuilds/pkg',
version: '0.19.4',
version: '0.19.5',
macIcns: './resources/<%= pkg.name %>/mac/pkg/app.icns',
exeIco: './www/img/app/logo.ico',
macPlist: {
@ -353,49 +348,30 @@ module.exports = function(grunt) {
grunt.registerTask('wp', ['prod', 'exec:wp']);
grunt.registerTask('wp-copy', ['default', 'exec:wpcopy']);
grunt.registerTask('wp-init', ['default', 'exec:wpinit']);
grunt.registerTask('ios', ['exec:ios']);
grunt.registerTask('ios-debug', ['exec:iosdebug']);
grunt.registerTask('ios-run', ['exec:xcode']);
grunt.registerTask('cordovaclean', ['exec:cordovaclean']);
// Build all
grunt.registerTask('build-app-release', ['build-mobile-release', 'build-desktop-release']);
/**
* Mobile app
*/
// Build mobile app
grunt.registerTask('build-mobile-release', ['build-ios-release', 'build-android-release']);
// Build ios
grunt.registerTask('start-ios', ['default', 'exec:build_ios_debug', 'exec:xcode']);
grunt.registerTask('build-ios-debug', ['default', 'exec:build_ios_debug']);
grunt.registerTask('build-ios-release', ['prod', 'exec:build_ios_release']);
// Build android
grunt.registerTask('start-android', ['build-android-debug', 'exec:run_android']);
grunt.registerTask('build-android-debug', ['default', 'exec:build_android_debug']);
grunt.registerTask('start-android-emulator', ['build-android-debug', 'exec:run_android_emulator']);
grunt.registerTask('build-android-release', ['prod', 'exec:build_android_release', 'sign-android']);
grunt.registerTask('sign-android', ['exec:sign_android']);
/**
* Desktop app
*/
grunt.registerTask('android-debug', ['exec:androiddebug', 'exec:androidrun']);
grunt.registerTask('android', ['exec:android']);
grunt.registerTask('android-release', ['prod', 'exec:android', 'exec:androidsign']);
grunt.registerTask('desktopsign', ['exec:desktopsign', 'exec:desktopverify']);
// Build desktop
grunt.registerTask('build-desktop', ['build-desktop-others', 'build-desktop-osx-dmg', 'build-desktop-osx-pkg']);
grunt.registerTask('desktop-build', ['desktop-others', 'desktop-osx-dmg', 'desktop-osx-pkg']);
// Build desktop win64 & linux64
grunt.registerTask('build-desktop-others', ['prod', 'nwjs:others', 'copy:linux', 'exec:create_others_dist']);
grunt.registerTask('desktop-others', ['prod', 'nwjs:others', 'copy:linux', 'exec:create_others_dist']);
// Build desktop osx pkg
grunt.registerTask('build-desktop-osx-pkg', ['prod', 'exec:get_nwjs_for_pkg', 'nwjs:pkg', 'exec:create_pkg_dist']);
grunt.registerTask('desktop-osx-pkg', ['prod', 'exec:get_nwjs_for_pkg', 'nwjs:pkg', 'exec:create_pkg_dist']);
// Build desktop osx dmg
grunt.registerTask('build-desktop-osx-dmg', ['prod', 'nwjs:dmg', 'exec:create_dmg_dist']);
grunt.registerTask('desktop-osx-dmg', ['prod', 'nwjs:dmg', 'exec:create_dmg_dist']);
// Sign desktop
grunt.registerTask('sign-desktop', ['exec:sign_desktop_dist']);
grunt.registerTask('desktop-sign', ['exec:sign_desktop_dist']);
// Release desktop
grunt.registerTask('build-desktop-release', ['build-desktop', 'sign-desktop']);
grunt.registerTask('desktop-release', ['desktop-build', 'desktop-sign']);
};

View file

@ -1,24 +1,3 @@
This is a fork of the Bitcoin.com wallet to add additional features.
Features included:
- Zero fee transactions (only works for Bitcoin Cash). You will be asked for, if you want to send a transaction as zero fee on the confirmation page.
## Zero fee transactions:
Because most network nodes on the Bitcoin Cash network don't relay zero fee txs, you will experience some strange issues, but don't worry: for me personally the Bitcoin.com pool has included all my zero fee transactions, but please beware that the receiver probably won't see your tx before it has been confirmed and please do also keep in mind, that the transactions coming after it won't confirm or be seen before the zero fee one has been confirmed.
If you do already have a Bitcoin.com wallet, you need to create a new one to use this feature or change the wallet URL to: https://bws.freepages.dk/bws/api
## Disclaimer
Please beware this is my personal experimental project. You are more than welcome to play with it, but I don't take any responsibility of loss of funds due to errors in the code, so please make sure you made a backup before running this software.
## Builds
You can build the software yourself using the instructions below or use prebuilt binaries which can be found here (currently Windows and Linux only): https://ipfs.io/ipfs/QmR1DaS3QsDS48SzAWKUWFfmtMfJc4tgMtkSk3JFmuzewe
##
The Bitcoin.com wallet is a fork of the Copay Wallet (https://github.com/bitpay/copay).
The Bitcoin.com wallet is a secure bitcoin wallet platform for both desktop and mobile devices. It uses [Bitcore Wallet Service](https://github.com/Bitcoin-com/bitcore-wallet-service) (our fork of the [Bitpay Bitcore Wallet Service](https://github.com/bitpay/bitcore-wallet-service)) (BWS) for peer synchronization and network interfacing.
@ -134,14 +113,14 @@ npm run start:desktop
Before building the release version for a platform, run the `clean-all` command to delete any untracked files in your current working directory. (Be sure to stash any uncommited changes you've made.) This guarantees consistency across builds for the current state of this repository.
The `build:*-release` commands build the production version of the app, and bundle it with the release version of the platform being built.
The `final` commands build the production version of the app, and bundle it with the release version of the platform being built.
### Android
```sh
npm run clean-all
npm run apply:bitcoincom
npm run build:android-release
npm run final:android
```
### iOS
@ -149,7 +128,7 @@ npm run build:android-release
```sh
npm run clean-all
npm run apply:bitcoincom
npm run build:ios-release
npm run final:ios
```
### Desktop (Linux, macOS, and Windows)
@ -157,7 +136,7 @@ npm run build:ios-release
```sh
npm run clean-all
npm run apply:bitcoincom
npm run build:desktop-release
npm run final:desktop
```
## About The Bitcoin.com Wallet

View file

@ -24,9 +24,9 @@
"windowsAppId": "804636ee-b017-4cad-8719-e58ac97ffa5c",
"pushSenderId": "1036948132229",
"description": "A Secure Bitcoin Wallet",
"version": "5.1.3",
"fullVersion": "5.1-rc2",
"androidVersion": "501003",
"version": "4.13.0",
"fullVersion": "4.13-rc1",
"androidVersion": "413000",
"_extraCSS": "",
"_enabledExtensions": {
"coinbase": false,

View file

@ -268,33 +268,5 @@ div.onboarding-topic {
display: block;
float: left;
max-height: 100%;
max-width: 100%;
}
.bitpay-banner {
background: #1A3A8B;
padding: 10px;
box-shadow: 0px 5px 10px 0px #cccccc;
height: 5em;
}
.bitpay-logo {
display: block;
max-height: 100%;
width: 100%;
height: 4em;
}
.egifter-banner {
background: #1A3A8B;
padding: 10px;
box-shadow: 0px 5px 10px 0px #cccccc;
height: 5em;
text-align: center;
}
.egifter-logo {
max-height: 100%;
max-width: 100%;
height: 4em;
max-width: 100%;
}

View file

@ -72,7 +72,7 @@
<plugin name="cordova-plugin-queries-schemes" spec="~0.1.5" />
<plugin name="cordova-plugin-firebase" spec="https://github.com/arnesson/cordova-plugin-firebase.git" />
<plugin name="cordova-plugin-wkwebview-inputfocusfix" spec="https://github.com/onderceylan/cordova-plugin-wkwebview-inputfocusfix.git" />
<plugin name="cordova-plugin-media-fork" spec="~5.0.3">
<plugin name="cordova-plugin-media" spec="~5.0.2">
<variable name="KEEP_AVAUDIOSESSION_ALWAYS_ACTIVE" value="NO" />
</plugin>
<!-- Supported Platforms -->
@ -85,12 +85,6 @@
<config-file platform="ios" target="*-Info.plist" parent="UIStatusBarHidden"><true/></config-file>
<config-file platform="ios" target="*-Info.plist" parent="UIViewControllerBasedStatusBarAppearance"><false/></config-file>
<config-file target="*-Info.plist" parent="ITSAppUsesNonExemptEncryption"><false/></config-file>
<icon src="resources/*PACKAGENAME*/ios/icon/AppIcon24x24@2x.png" width="48" height="48" />
<icon src="resources/*PACKAGENAME*/ios/icon/AppIcon27.5x27.5@2x.png" width="55" height="55" />
<icon src="resources/*PACKAGENAME*/ios/icon/AppIcon44x44@2x.png" width="88" height="88" />
<icon src="resources/*PACKAGENAME*/ios/icon/AppIcon86x86@2x.png" width="172" height="172" />
<icon src="resources/*PACKAGENAME*/ios/icon/AppIcon98x98@2x.png" width="196" height="196" />
<icon src="resources/*PACKAGENAME*/ios/icon/icon-20.png" width="20" height="20" />
<icon src="resources/*PACKAGENAME*/ios/icon/icon-60@3x.png" width="180" height="180" />
<icon src="resources/*PACKAGENAME*/ios/icon/icon-60.png" width="60" height="60" />
<icon src="resources/*PACKAGENAME*/ios/icon/icon-60@2x.png" width="120" height="120" />
@ -108,7 +102,6 @@
<icon src="resources/*PACKAGENAME*/ios/icon/icon-small@3x.png" width="87" height="87" />
<icon src="resources/*PACKAGENAME*/ios/icon/icon-50.png" width="50" height="50" />
<icon src="resources/*PACKAGENAME*/ios/icon/icon-50@2x.png" width="100" height="100" />
<icon src="resources/*PACKAGENAME*/ios/icon/icon-1024.png" width="1024" height="1024" />
<splash src="resources/*PACKAGENAME*/ios/splash/Default~iphone.png" width="320" height="480"/>
<splash src="resources/*PACKAGENAME*/ios/splash/Default@2x~iphone.png" width="640" height="960"/>

View file

@ -24,9 +24,8 @@ ln -s ../resources/bitcoin.com/mac/pkg/build.cfg build.cfg
rm build_mas.py
ln -s ../resources/bitcoin.com/mac/pkg/build_mas.py build_mas.py
echo "Signing ${APP_FULLNAME}"
export CURRENT_PATH=`pwd`
export APP_PATH="pkg/${APP_FULLNAME}/osx64/${APP_FULLNAME}"
echo "Signing ${APP_NAME}"
export APP_PATH="pkg/${APP_NAME}/osx64/${APP_NAME}"
export TMP_PATH="tmp"
export DIST_PATH="dist"
@ -37,16 +36,10 @@ if [ ! -d $DIST_PATH ]; then
mkdir $DIST_PATH
fi
cd "${APP_PATH}.app/Contents/Versions"
ln -s "55.0.2883.87" "Current"
cd $CURRENT_PATH
chmod -vR 777 "${APP_PATH}.app/Contents"
python build_mas.py -C build.cfg -O "${TMP_PATH}/${APP_FULLNAME}.app" -I "${APP_PATH}.app" -P "$DIST_PATH/${APP_PACKAGE}-wallet-${APP_VERSION}-osx.pkg"
python build_mas.py -C build.cfg -O "${TMP_PATH}/${APP_NAME}.app" -I "${APP_PATH}.app" -P "$DIST_PATH/${APP_PACKAGE}-wallet-${APP_VERSION}-osx.pkg"
echo "Signing Done"
echo "Done."
exit
exit

View file

@ -87,53 +87,46 @@
"bitcoincashjs-fork": "^1.0.3"
},
"scripts": {
"apply:bitcoincom": "npm i fs-extra && cd app-template && node apply.js bitcoincom && npm i && cordova prepare && cd ../ && ./fix-asn1.sh",
"build:app-release": "grunt build-app-release",
"build:mobile-release": "grunt build-mobile-release",
"build:desktop-release": "grunt build-desktop-release",
"build:android-debug": "grunt build-android-debug",
"build:android-release": "grunt build-android-release",
"build:ios-debug": "grunt build-ios-debug",
"build:ios-release": "grunt build-ios-release",
"build:desktop": "grunt build-desktop",
"build:osx-pkg": "grunt build-desktop-osx-pkg",
"build:osx-dmg": "grunt build-desktop-osx-dmg",
"build:others": "grunt build-desktop-others",
"build:windows": "cordova prepare windows && cordova build windows -- --arch=\"ARM\"",
"build:windows-release": "cordova prepare windows && cordova build windows --release --arch=\"ARM\"",
"build:www": "grunt",
"build:www-release": "grunt prod",
"clean": "trash platforms && trash plugins && cordova prepare",
"clean-all": "git clean -dfx",
"log:android": "adb logcat | grep chromium",
"open:android": "grunt exec:android_studio",
"open:ios": "grunt exec:xcode",
"postinstall": "bower install",
"sign:android": "grunt sign-android",
"sign:desktop": "grunt sign-desktop",
"start": "npm run build:www && ionic serve --nolivereload --nogulp -s --address 0.0.0.0",
"start:chrome": "npm run build:www && ionic serve --nolivereload --nogulp -s --address 0.0.0.0 --browser \"google chrome\"",
"start:android": "grunt start-android",
"start:android-emulator": "grunt start-android",
"start:android-log": "grunt start-android && npm run log:android",
"start:ios": "grunt start-ios",
"start:ios": "npm run build:www && npm run build:ios && npm run open:ios",
"start:android": "npm run build:www && npm run build:android && npm run run:android",
"start:windows": "npm run build:www && npm run build:windows",
"start:desktop": "npm start",
"watch": "grunt watch",
"build:www": "grunt",
"build:www-release": "grunt prod",
"build:ios": "cordova prepare ios && cordova build ios --debug",
"build:android": "cordova prepare android && cordova build android --debug",
"build:windows": "cordova prepare windows && cordova build windows -- --arch=\"ARM\"",
"build:ios-release": "cordova prepare ios && cordova build ios --release",
"build:android-release": "cordova prepare android && cordova build android --release",
"build:windows-release": "cordova prepare windows && cordova build windows --release --arch=\"ARM\"",
"build:desktop-release": "grunt desktop-release",
"build:desktop": "grunt desktop-build",
"build:osx-pkg": "grunt desktop-osx-pkg",
"build:osx-dmg": "grunt desktop-osx-dmg",
"build:others": "grunt desktop-others",
"sign:desktop": "grunt desktop-sign",
"open:ios": "open platforms/ios/*.xcodeproj",
"open:android": "open -a open -a /Applications/Android\\ Studio.app platforms/android",
"final:www": "npm run build:www-release",
"final:ios": "npm run final:www && npm run build:ios-release && npm run open:ios",
"final:android": "npm run final:www && npm run build:android-release && npm run sign:android && npm run run:android-release",
"final:windows": "npm run final:www && npm run build:windows-release",
"final:desktop": "npm run final:www && npm run build:desktop-release",
"run:android": "cordova run android --device",
"run:android-release": "cordova run android --device --release",
"log:android": "adb logcat | grep chromium",
"sign:android": "rm -f platforms/android/build/outputs/apk/android-release-signed-aligned.apk; jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore ../bitcoin-com-release-key.jks -signedjar platforms/android/build/outputs/apk/android-release-signed.apk platforms/android/build/outputs/apk/android-release-unsigned.apk bitcoin-com && $ANDROID_HOME/build-tools/27.0.1/zipalign -v 4 platforms/android/build/outputs/apk/android-release-signed.apk platforms/android/build/outputs/apk/android-release-signed-aligned.apk",
"apply:copay": "npm i fs-extra && cd app-template && node apply.js copay && npm i && cordova prepare",
"apply:bitpay": "npm i fs-extra && cd app-template && node apply.js bitpay && npm i && cordova prepare",
"apply:bitcoincom": "npm i fs-extra && cd app-template && node apply.js bitcoincom && npm i && cordova prepare",
"test": "karma start test/karma.conf.js --single-run",
"clean": "trash platforms && trash plugins && cordova prepare",
"unstage-package": "git reset package.json",
"watch": "grunt watch"
"clean-all": "git clean -dfx"
},
"devDependencies": {
"cordova": "^6.3.1",
@ -148,4 +141,4 @@
"pre-commit": "^1.1.3"
},
"pre-commit": "unstage-package"
}
}

View file

@ -6256,6 +6256,7 @@ var ClickAction = /** @class */ (function (_super) {
// Add event listener to all the elements found
for (var i = 0; i < elements.length; i++) {
var element = elements[i];
console.log('init ' + this.name);
element.addEventListener('click', this.listener);
}
};
@ -6275,7 +6276,7 @@ var ClickAction = /** @class */ (function (_super) {
}(action_1.default));
exports.default = ClickAction;
},{"../action":4,"../log-event":16,"../log-event-handlers":15}],6:[function(require,module,exports){
},{"../action":4,"../log-event":15,"../log-event-handlers":14}],6:[function(require,module,exports){
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
@ -6314,7 +6315,7 @@ var BitAnalytics = /** @class */ (function () {
exports.default = BitAnalytics;
BitAnalytics.main();
},{"./action-factory":2,"./action-handlers":3,"./channels/adjust-channel":9,"./channels/mixpanel-channel":12,"./log-event":16,"./log-event-handlers":15}],7:[function(require,module,exports){
},{"./action-factory":2,"./action-handlers":3,"./channels/adjust-channel":9,"./channels/mixpanel-channel":12,"./log-event":15,"./log-event-handlers":14}],7:[function(require,module,exports){
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
@ -6412,6 +6413,7 @@ var AdjustChannel = /** @class */ (function (_super) {
_this.eventTypes = config.eventTypes;
var os = _this.adjustedOs(config.os);
_this.advertisingId = _this.getAdvertisingId(os);
console.log('Advertising ID for adjust: ' + _this.advertisingId);
// TODO: Different initialisation for Cordova.
var sessionParams = {
app_version: config.appVersion,
@ -6558,10 +6560,11 @@ var FirebaseChannel = /** @class */ (function (_super) {
var keys = Object.keys(params);
var keysLength = keys.length;
var sanitized = {};
keys.map(function (key) {
for (var i = 0; i < keysLength; i++) {
var key = keys[i];
var cleanKey = key.replace('-', '_').replace(/[\W]+/g, '');
sanitized[cleanKey] = params[key];
});
}
return sanitized;
};
return FirebaseChannel;
@ -6585,12 +6588,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
};
Object.defineProperty(exports, "__esModule", { value: true });
var channel_1 = __importDefault(require("../channel"));
var ga_1 = __importDefault(require("../external-libs/ga"));
var GoogleAnalyticsChannel = /** @class */ (function (_super) {
__extends(GoogleAnalyticsChannel, _super);
function GoogleAnalyticsChannel(name, config) {
var _this = _super.call(this, name) || this;
_this.dataLayer = null;
_this.gaInstance = null;
_this.trackingId = '';
_this.eventLabels = ['id'];
if (!config.trackingId) {
throw new Error('[BitAnalytics] Google Analytics config is missing tracking ID.');
@ -6598,12 +6602,8 @@ var GoogleAnalyticsChannel = /** @class */ (function (_super) {
if (config.eventLabels) {
_this.eventLabels = config.eventLabels;
}
_this.gaInstance = new ga_1.default({
trackID: config.trackingId,
appVersion: config.appVersion,
appName: config.appName || 'App'
});
_this.isReady = true;
_this.trackingId = config.trackingId;
_this.setUpGa();
return _this;
}
/**
@ -6612,26 +6612,49 @@ var GoogleAnalyticsChannel = /** @class */ (function (_super) {
*
*/
GoogleAnalyticsChannel.prototype.postEvent = function (name, params) {
// Default Google Analytics Events
// https://developers.google.com/analytics/devguides/collection/gtagjs/events
// Useful to convert to these, or start with these?
if (this.isReady) {
var category = name;
var action = name;
var label = name;
var value = params['value'] || '';
params.event_category = name;
for (var _i = 0, _a = this.eventLabels; _i < _a.length; _i++) {
var eventLabel = _a[_i];
if (params[eventLabel]) {
label = params[eventLabel];
params.event_label = params[eventLabel];
break;
}
}
this.gaInstance.event(category, action, label, value);
this.gtag('event', name, params);
}
};
/**
*
* Private methods
*
*/
/**
* Mimics function in the tracking snippet
*/
GoogleAnalyticsChannel.prototype.gtag = function () {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
console.log(arguments);
window.dataLayer.push(arguments);
};
GoogleAnalyticsChannel.prototype.setUpGa = function () {
// From what GA recommends to insert into page
window.dataLayer = window.dataLayer || [];
this.gtag('js', new Date());
this.gtag('config', this.trackingId);
this.isReady = true;
};
return GoogleAnalyticsChannel;
}(channel_1.default));
exports.default = GoogleAnalyticsChannel;
},{"../channel":8,"../external-libs/ga":14}],12:[function(require,module,exports){
},{"../channel":8}],12:[function(require,module,exports){
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = Object.setPrototypeOf ||
@ -6654,7 +6677,7 @@ var MixpanelChannel = /** @class */ (function (_super) {
function MixpanelChannel(name, config) {
var _this = _super.call(this, name) || this;
if (!config.token) {
throw new Error('[BitAnalytics] Config incorrect.');
throw new DOMException('[BitAnalytics] Config incorrect.');
}
_this.mixpanelInstance = mixpanel;
mixpanel.init(config.token, config.config);
@ -6723,207 +6746,6 @@ exports.default = MixpanelChannel;
},{}],14:[function(require,module,exports){
"use strict";
/*
* name: nwjs-analytics -Node-Webkit Google Analytics integration
* version: 1.0.2
* github: https://github.com/Daaru00/nwjs-analytics
*/
function GA(opt) {
this.apiVersion = opt.apiVersion || '1';
this.trackID = opt.trackID || 'UA-XXXXXXXX-X';
this.clientID = opt.clientID || null;
this.userID = opt.userID || null;
this.appName = opt.appName || 'App';
this.appVersion = opt.appVersion || '1.0.0';
this.debug = opt.debug || false;
this.performanceTracking = opt.performanceTracking || true;
this.errorTracking = opt.errorTracking || true;
this.userLanguage = opt.userLanguage || "en";
this.currency = opt.currency || "EUR";
this.lastScreenName = opt.lastScreenName || '';
}
GA.prototype.sendRequest = function (data, callback) {
var ga = this;
if (!this.clientID || this.clientID == null)
this.clientID = this.generateClientID();
if (!this.userID || this.userID == null)
this.userID = this.generateClientID();
var postData = "v=" + this.apiVersion
+ "&an=" + this.appName
+ "&av=" + this.appVersion
+ "&tid=" + this.trackID
+ "&cid=" + this.clientID
+ "&sr=" + this.getScreenResolution()
+ "&vp=" + this.getViewportSize();
Object.keys(data).forEach(function (key) {
var val = data[key];
if (typeof val != "undefined")
postData += "&" + key + "=" + val;
});
var http = new XMLHttpRequest();
var url = "https://www.google-analytics.com";
if (!this.debug)
url += "/collect";
else
url += "/debug/collect";
http.open("GET", url + "?" + postData, true);
http.onreadystatechange = function () {
if (ga.debug)
console.log(http.response);
if (http.readyState == 4 && http.status == 200) {
if (callback)
callback(true);
}
else {
if (callback)
callback(false);
}
};
http.send();
};
GA.prototype.generateClientID = function () {
var id = "";
var possibilities = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
for (var i = 0; i < 5; i++)
id += possibilities.charAt(Math.floor(Math.random() * possibilities.length));
return id;
};
GA.prototype.getScreenResolution = function () {
return screen.width + "x" + screen.height;
};
GA.prototype.getColorDept = function () {
return screen.colorDepth + "-bits";
};
GA.prototype.getUserAgent = function () {
return navigator.userAgent;
};
GA.prototype.getViewportSize = function () {
return window.screen.availWidth + "x" + window.screen.availHeight;
};
/*
* Measurement Protocol
* [https://developers.google.com/analytics/devguides/collection/protocol/v1/devguide]
*/
GA.prototype.screenView = function (screename) {
var data = {
't': 'screenview',
'cd': screename
};
this.sendRequest(data);
this.lastScreenName = screename;
};
GA.prototype.event = function (category, action, label, value) {
var data = {
't': 'event',
'ec': category,
'ea': action,
};
if (label) {
data['el'] = label;
}
if (value) {
data['ev'] = value;
}
if (this.lastScreenName) {
data['cd'] = this.lastScreenName;
}
this.sendRequest(data);
};
GA.prototype.exception = function (msg, fatal) {
var data = {
't': 'exception',
'exd': msg,
'exf': fatal || 0
};
this.sendRequest(data);
};
GA.prototype.timing = function (category, variable, time, label) {
var data = {
't': 'timing',
'utc': category,
'utv': variable,
'utt': time,
'utl': label,
};
this.sendRequest(data);
},
GA.prototype.ecommerce = {
transactionID: false,
generateTransactionID: function () {
var id = "";
var possibilities = "0123456789";
for (var i = 0; i < 5; i++)
id += possibilities.charAt(Math.floor(Math.random() * possibilities.length));
return id;
},
transaction: function (total, items) {
var t_id = "";
if (!this.ecommerce.transactionID)
t_id = this.ecommerce.generateTransactionID();
else
t_id = this.ecommerce.transactionID;
var data = {
't': 'transaction',
'ti': t_id,
'tr': total,
'cu': this.currency,
};
this.sendRequest(data);
items.forEach(function (item) {
var data = {
't': 'item',
'ti': t_id,
'in': item.name,
'ip': item.price,
'iq': item.qty,
'ic': item.id,
'cu': this.currency
};
this.sendRequest(data);
});
}
},
GA.prototype.custom = function (data) {
this.sendRequest(data);
};
module.exports = GA;
/*
* Performance Tracking
*/
/*window.addEventListener("load", function() {
if(ga.performanceTracking) {
setTimeout(function() {
var timing = window.performance.timing;
var userTime = timing.loadEventEnd - timing.navigationStart;
ga.timing("performance", "pageload", userTime);
}, 0);
}
}, false);*/
/*
* Error Reporting
*/
/*window.onerror = function (msg, url, lineNo, columnNo, error) {
var message = [
'Message: ' + msg,
'Line: ' + lineNo,
'Column: ' + columnNo,
'Error object: ' + JSON.stringify(error)
].join(' - ');
if(ga.errorTracking)
{
setTimeout(function() {
ga.exception(message.toString());
}, 0);
}
return false;
};*/
},{}],15:[function(require,module,exports){
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
@ -7035,7 +6857,7 @@ var LogEventHandlers = /** @class */ (function () {
_this.channels.push(channel);
}
catch (error) {
console.log(error.message);
console.log('[BitAnalytics] ' + error.name + ': ' + error.message);
}
});
};
@ -7043,7 +6865,7 @@ var LogEventHandlers = /** @class */ (function () {
}());
exports.default = LogEventHandlers;
},{"./channel-factory":7}],16:[function(require,module,exports){
},{"./channel-factory":7}],15:[function(require,module,exports){
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var LogEvent = /** @class */ (function () {

View file

@ -24,6 +24,6 @@
},
"resolutions": {
"angular": "1.5.3",
"ionic": "eefba1331b"
"ionic": "1b7414faba"
}
}

View file

@ -1,11 +0,0 @@
#!/bin/bash
firstLine=`awk 'NR < 2 {print}' node_modules/asn1.js-rfc5280/index.js`
if [ "$firstLine" = "try {" ]; then
echo "var asn1 = require('asn1.js');" > node_modules/asn1.js-rfc5280/index.new.js
awk 'NR > 6 {print}' node_modules/asn1.js-rfc5280/index.js >> node_modules/asn1.js-rfc5280/index.new.js
rm node_modules/asn1.js-rfc5280/index.js
mv node_modules/asn1.js-rfc5280/index.new.js node_modules/asn1.js-rfc5280/index.js
echo "node_modules/asn1.js-rfc5280/index.js fixed"
fi

View file

@ -11,7 +11,7 @@ msgstr ""
"Last-Translator: emilold\n"
"Language-Team: Catalan\n"
"Language: ca\n"
"PO-Revision-Date: 2018-09-15 05:56\n"
"PO-Revision-Date: 2018-07-04 09:26\n"
#: www/views/modals/paypro.html:34
msgid "(Trusted)"
@ -81,26 +81,6 @@ msgstr "Número de compte"
msgid "Instant transactions with low fees"
msgstr "Transaccions instantànies amb comissions baixes"
#: www/views/walletSelector.html:49
msgid "Insufficient funds"
msgstr "Fons insuficients"
#: www/views/amount.html:42
msgid "Change Currency"
msgstr "Canvia de moneda"
#: www/views/amount.html:49
msgid "Available Funds"
msgstr "Fons disponibles"
#: www/views/amount.html:59
msgid "Use All Available Funds"
msgstr "Utilitza tots els fons disponibles"
#: www/views/amount.html:99
msgid "Next"
msgstr "Següent"
#: www/views/preferencesBitpayServices.html:23
msgid "Accounts"
msgstr "Comptes"
@ -226,20 +206,6 @@ msgstr "Gairebé ja estem! Repassem-ho."
msgid "Alternative Currency"
msgstr "Moneda alternativa"
#: www/views/tab-settings.html:75
msgid "Price Display"
msgstr "Visualització del preu"
#: src/js/controllers/tab-settings.js:19
#: www/views/preferencesPriceDisplay.html:12
msgid "Fiat"
msgstr "Fiat"
#: src/js/controllers/tab-settings.js:19
#: www/views/preferencesPriceDisplay.html:15
msgid "Cryptocurrency"
msgstr "Criptomoneda"
#: src/js/controllers/buyAmazon.js:98
msgid "Amazon.com is not available at this moment. Please try back later."
msgstr "Amazon.com no està disponible en aquest moment. Torneu-ho a provar més tard."
@ -471,7 +437,6 @@ msgid "Buy &amp; Sell Bitcoin"
msgstr "Compra &amp; ven bitcoins"
#: www/views/tab-send.html:35
#: src/js/services/buyAndSellService.js:26
msgid "Buy Bitcoin"
msgstr "Compra bitcoins"
@ -520,7 +485,7 @@ msgid "Cannot Create Wallet"
msgstr "No es pot crear la cartera"
#: src/js/services/profileService.js:442
msgid "Cannot join the same wallet more than once"
msgid "Cannot join the same wallet more that once"
msgstr "No us podeu unir a la mateixa cartera més d'un cop"
#: www/views/includes/bitpayCardsCard.html:2
@ -654,14 +619,10 @@ msgstr "S'està connectant a Glidera..."
msgid "Connection reset by peer"
msgstr "Connexió reiniciada per un parell"
#: www/views/tab-send.html:85
#: www/views/tab-send.html:45
msgid "Contacts"
msgstr "Contactes"
#: www/views/tab-send.html:86
msgid "Saved frequently used addresses"
msgstr "Adreces utilitzades freqüentment desades"
#: www/views/onboarding/notifications.html:9
msgid "Continue"
msgstr "Continua"
@ -696,7 +657,6 @@ msgstr "Copayer {{$index}}"
#: src/js/controllers/copayers.js:79
#: src/js/controllers/export.js:193
#: src/js/controllers/confirm.js:41
#: www/views/includes/copyToClipboard.html:4
msgid "Copied to clipboard"
msgstr "Copiat al porta-retalls"
@ -863,7 +823,7 @@ msgstr "Crea una cartera compartida"
#: www/views/onboarding/tour.html:51
#: www/views/tab-home.html:75
#: www/views/tab-send.html:75
#: www/views/tab-send.html:36
msgid "Create bitcoin wallet"
msgstr "Crea una cartera bitcoin"
@ -1316,7 +1276,6 @@ msgstr "Amb finalitats d'auditoria"
#: www/views/modals/txp-details.html:74
#: www/views/topup.html:34
#: www/views/tx-details.html:52
#: www/views/review.html:22
msgid "From"
msgstr "Des de"
@ -1377,6 +1336,10 @@ msgid "Get news and updates from BitPay"
msgstr "Rebeu notícies i actualitzacions de BitPay"
#: www/views/onboarding/welcome.html:8
msgctxt "button"
msgid "Get started"
msgstr "Comença"
#: www/views/bitpayCard.html:49
msgid "Get started"
msgstr "Comença"
@ -2200,10 +2163,6 @@ msgstr "Pagament rebutjat"
msgid "Payment Sent"
msgstr "Pagament enviat"
#: www/views/includes/slideToAcceptSuccess.html:12
msgid "Share this transaction"
msgstr "Comparteix aquesta transacció"
#: www/views/modals/txp-details.html:32
msgid "Payment accepted, but not yet broadcasted"
msgstr "Pagament acceptat, però encara no emès"
@ -2221,7 +2180,7 @@ msgid "Payment details"
msgstr "Dades de pagament"
#: www/views/modals/paypro.html:6
msgid "Payment Request"
msgid "Payment request"
msgstr "Sol·licitud de pagament"
#: www/views/mercadoLibreCards.html:22
@ -2394,7 +2353,7 @@ msgstr "Rep"
#: www/views/customAmount.html:44
msgid "Receive in"
msgstr "Rebre en"
msgstr "Rep a"
#: www/views/includes/walletHistory.html:24
#: www/views/tx-details.html:18
@ -2574,14 +2533,6 @@ msgstr "Cerca transaccions"
msgid "Search or enter bitcoin address"
msgstr "Cerca o introdueix l'adreça bitcoin"
#: src/js/controllers/tab-send.js:28
msgid "Clipboard"
msgstr "Porta-retalls"
#: src/js/controllers/tab-send.js:29
msgid "Your Clipboard is empty"
msgstr "Teniu el porta-retalls buit"
#: www/views/modals/search.html:16
msgid "Search transactions"
msgstr "Cerca transaccions"
@ -2640,68 +2591,9 @@ msgid "Send by email"
msgstr "Envia per correu electrònic"
#: src/js/controllers/confirm.js:177
#: src/js/controllers/tab-send.js:94
msgid "Send from"
msgstr "Envia des de"
#: src/js/controllers/tab-send.js:77
msgid "Send to"
msgstr "Enviat a"
#: www/views/tab-send.html:20
msgid "Paste Clipboard"
msgstr "Enganxa des del porta-retalls"
#: www/views/tab-send.html:21
msgid "Paste Address"
msgstr "Enganxa l'adreça"
#: www/views/tab-send.html:27
msgid "Transfer between wallets"
msgstr "Transferència entre carteres"
#: www/views/tab-send.html:35
msgid "Scan QR Code"
msgstr "Escaneja el codi QR"
#: www/views/tab-send.html:46
msgid "Send Bitcoin faster!"
msgstr "Envia bitcoins més ràpid!"
#: www/views/tab-send.html:50
msgid "Save frequently used addresses and send them Bitcoin in just one tap"
msgstr "Deseu adreces utilitzades freqüentment i envieu-los bitcoins d'un sol toc"
#: www/views/tab-send.html:55
msgid "Add your first contact"
msgstr "Afegiu el primer contacte"
#: www/views/tab-send.html:65
msgid "Your Bitcoin wallet is empty"
msgstr "La vostra cartera bitcoin és buida"
#: www/views/tab-send.html:69
msgid "To get started, buy Bitcoin Cash (BCH) or Bitcoin Core (BTC), or share your address."
msgstr "Per començar, compreu Bitcoin Cash (BCH) o Bitcoin Core (BTC), o compartiu la vostra adreça."
#: www/views/tab-send.html:70
msgid "You can receive bitcoin from any wallet or service."
msgstr "Podeu rebre bitcoins des de qualsevol cartera o servei."
#: www/views/tab-send.html:72
#: www/views/shapeshift.html:23
#: www/views/tab-send.html:33
msgid "To get started, you'll need to create a bitcoin wallet and get some bitcoin."
msgstr "Per començar, heu de crear una cartera bitcoin i obtenir uns quants bitcoins."
#: www/views/tab-send.html:74
msgid "Buy Bitcoin now"
msgstr "Compra Bitcoins ara"
#: www/views/tab-send.html:76
msgid "Show my address"
msgstr "Mostra la meva adreça"
#: www/views/includes/itemSelector.html:8
msgid "Send max amount"
msgstr "Envia import màxim"
@ -2925,13 +2817,8 @@ msgid "Sweep"
msgstr "Escombratge"
#: www/views/includes/incomingDataMenu.html:89
msgctxt "List item"
msgid "Sweep paper wallet"
msgstr "Escombra la cartera de paper"
#: www/views/paperWallet.html:3
msgctxt "Page title"
msgid "Sweep Paper Wallet"
msgid "Sweep paper wallet"
msgstr "Escombra la cartera de paper"
#: src/js/services/onGoingProcess.js:33
@ -3100,14 +2987,6 @@ msgstr "Aquesta aplicació emmagatzema els vostres bitcoins amb una seguretat de
msgid "This bitcoin payment request has expired."
msgstr "Aquesta sol·licitud de pagament bitcoin ha caducat."
#: www/views/review.html:55
msgid "Payment expires:"
msgstr "El pagament venç:"
#: www/views/review.html:56
msgid "Payment request has expired"
msgstr "La sol·licitud de pagament ha vençut"
#: www/views/join.html:133
#: www/views/tab-create-personal.html:103
#: www/views/tab-create-shared.html:132
@ -3149,6 +3028,10 @@ msgstr "Per a"
msgid "To get started, buy bitcoin or share your address. You can receive bitcoin from any wallet or service."
msgstr "Per començar, compreu bitcoins o compartiu la vostra adreça. Podeu rebre bitcoins de qualsevol cartera o servei."
#: www/views/tab-send.html:33
msgid "To get started, you'll need to create a bitcoin wallet and get some bitcoin."
msgstr "Per començar, heu de crear una cartera bitcoin i obtenir uns quants bitcoins."
#: src/js/services/bitpayAccountService.js:73
msgid "To {{reason}} you must first add your BitPay account - {{email}}"
msgstr "Per {{reason}} ja heu d'haver afegit el vostre compte BitPay - {{email}}"
@ -3161,26 +3044,6 @@ msgstr "Recàrrega en curs..."
msgid "Top up {{amountStr}} to debit card ({{cardLastNumber}})"
msgstr "Recàrrega de {{amountStr}} a la targeta de dèbit ({{cardLastNumber}})"
#: www/views/shapeshift.html:30
msgid "Start ShapeShift"
msgstr "Inicia ShapeShift"
#: www/views/shapeshift.html:30
msgid "Exchange your BTC to BCH in minutes."
msgstr "Canvieu de BTC a BCH en minuts."
#: www/views/shapeshift.html:30
msgid "To start the process you need to add funds to your wallet."
msgstr "Per iniciar el procés heu d'afegir fons a la cartera."
#: www/views/shapeshift.html:30
msgid "The process is fast and you will receive the exchanged amount in your wallet."
msgstr "El procés és ràpid i rebreu l'import canviat a la vostra cartera."
#: www/views/shapeshift.html:34
msgid "This service is provided by the third-party ShapeShift, who will charge a small fee for the service. The fee will be shown before you start the transaction."
msgstr "Aquest servei el presta un tercer, ShapeShift, que cobrarà una petita comissió pel servei. Veureu la comissió abans d'iniciar la transacció."
#: www/views/buyAmazon.html:61
#: www/views/buyMercadoLibre.html:60
#: www/views/modals/wallet-balance.html:23
@ -3773,171 +3636,3 @@ msgstr "{{updatingTxHistoryProgress}} transaccions descarregades"
msgid "{{wallet.m}}-of-{{wallet.n}}"
msgstr "{{wallet.m}}-de-{{wallet.n}}"
#: src/js/services/shapeshiftService.js:8
msgid "Shapeshift"
msgstr "Shapeshift"
#: www/views/includes/community.html:3
msgid "Community"
msgstr "Comunitat"
#: src/js/services/communityService.js:40
msgid "Bitcoin Cash Reddit"
msgstr "Reddit de Bitcoin Cash"
#: src/js/services/communityService.js:47
msgid "Bitcoin.com Twitter"
msgstr "Twitter de Bitcoin.com"
#: www/views/includes/nextSteps.html:3
msgid "Explore Bitcoin.com"
msgstr "Explora Bitcoin.com"
#: src/js/services/bitcoincomService.js:21
msgid "Bitcoin Cash Games"
msgstr "Jocs de Bitcoin Cash"
#: www/views/includes/community.html:29
msgid "Share the Wallet App"
msgstr "Comparteix l'aplicació de la cartera"
#: src/js/services/bitcoincomService.js:28
msgid "News"
msgstr "Notícies"
#: src/js/services/bitcoincomService.js:35
msgid "Mining Pool"
msgstr "Xarxa minera"
#: src/js/services/bitcoincomService.js:42
msgid "Tools"
msgstr "Eines"
#: src/js/services/bitcoincomService.js:49
msgid "Bitcoin Price Charts"
msgstr "Gràfiques de preus del bitcoin"
#: src/js/services/bitcoincomService.js:56
msgid "Free Bitcoin Cash"
msgstr "Bitcoin Cash gratis"
#: www/views/tab-home.html:30
msgid "Your Bitcoin Wallets are ready!"
msgstr "Les vostres carteres bitcoin ja estan a punt!"
#: src/js/controllers/amount.js:49
msgid "Address does not contain currency information, please make sure you are sending the correct currency."
msgstr "L'adreça no conté informació sobre la moneda. Comproveu que envieu la moneda correcta."
#: www/views/review.html:4
msgid "Review Transaction"
msgstr "Reviseu la transacció"
#: src/js/controllers/review.controller.js:36
msgid "You are sending"
msgstr "Esteu enviant"
#: src/js/controllers/review.controller.js:66
msgid "You are shifting"
msgstr "Esteu canviant"
#: www/views/review.html:36
msgid "To:"
msgstr "Per a:"
#: www/views/review.html:53
msgid "Add personal note"
msgstr "Afegiu nota personal"
#: www/views/review.html:87
msgid "Suggested by merchant:"
msgstr "Suggerida pel comerciant:"
#: src/js/controllers/review.controller.js:37
msgid "Enter text here"
msgstr "Introduïu el text aquí"
#: www/views/review.html:57
msgid "Personal note:"
msgstr "Nota personal:"
#: www/views/review.html:69
msgid "Less than 1 cent"
msgstr "Menys d'1 cèntim"
#: src/js/services/incomingData.js:129
msgid "This invoice is no longer accepting payments"
msgstr "Aquesta factura ja no accepta pagaments"
#: www/views/amount.html.js:60
msgid "Send Maximum Amount"
msgstr "Envia la quantitat màxima"
#: src/js/controllers/amount.controller.js:239
msgid "Unknown error."
msgstr "Error desconegut."
#: www/views/paperWallet.html:48
msgid "No Bitcoin Cash wallet to transfer funds to found."
msgstr "No hi ha cap cartera de Bitcoin Cash per transferir els fons trobats."
#: www/views/paperWallet.html:54
msgid "No Bitcoin Cash found."
msgstr "No s'ha trobat cap Bitcoin Cash."
#: www/views/paperWallet.html:60
msgid "Bitcoin Core found:"
msgstr "S'ha trobat Bitcoin Core:"
#: www/views/paperWallet.html:98
msgid "No Bitcoin Core wallet to transfer funds to found."
msgstr "No hi ha cap cartera de Bitcoin Core per transferir els fons trobats."
#: www/views/paperWallet.html:104
msgid "No Bitcoin Core found."
msgstr "No s'ha trobat cap Bitcoin Core."
#: src/js/controllers/tab-scan.js:120
msgid "Scan Failed"
msgstr "L'escaneig ha fallat"
#: src/js/controllers/tab-scan.js:121
msgid "Data not recognised."
msgstr "No s'han reconegut les dades."
#: src/js/controllers/tab-scan.js:121
msgid "Unsupported"
msgstr "No compatible"
#: src/js/controllers/tab-scan.js:121
msgid "Testnet is not supported."
msgstr "Testnet no és compatible."
#: www/views/includes/incomingDataMenu.html:81
msgid "URL"
msgstr "URL"
#: www/views/includes/incomingDataMenu.html:90
msgid "Open in web browser"
msgstr "Obre a l'explorador web"
#: src/js/services/shapeshift.service.js.html:90
msgid "Invalid address"
msgstr "Adreça no vàlida"
#: src/js/services/shapeshift.service.js.html:90
msgid "Amount is not defined"
msgstr "No s'ha definit l'import"
#: src/js/services/shapeshift.service.js.html:90
msgid "Amount is below the minimun"
msgstr "L'import és inferior al mínim"
#: src/js/services/shapeshift.service.js.html:90
msgid "Amount is above the limit"
msgstr "L'import supera el límit"
#: src/js/services/shapeshift.service.js.html:90
msgid "Invalid response from Shapeshift"
msgstr "Resposta no vàlida de Shapeshift"

View file

@ -11,7 +11,7 @@ msgstr ""
"Last-Translator: emilold\n"
"Language-Team: Czech\n"
"Language: cs\n"
"PO-Revision-Date: 2018-09-15 05:56\n"
"PO-Revision-Date: 2018-07-04 09:26\n"
#: www/views/modals/paypro.html:34
msgid "(Trusted)"
@ -79,27 +79,7 @@ msgstr "Číslo účtu"
#: www/views/tab-home.html:61
msgid "Instant transactions with low fees"
msgstr "Okamžité transakce s nízkými poplatky"
#: www/views/walletSelector.html:49
msgid "Insufficient funds"
msgstr "Nedostatek prostředků"
#: www/views/amount.html:42
msgid "Change Currency"
msgstr "Změnit měnu"
#: www/views/amount.html:49
msgid "Available Funds"
msgstr "Dostupné prostředky"
#: www/views/amount.html:59
msgid "Use All Available Funds"
msgstr "Použít všechny dostupné prostředky"
#: www/views/amount.html:99
msgid "Next"
msgstr "Další"
msgstr "Okamžité transakce s nízkou platbou"
#: www/views/preferencesBitpayServices.html:23
msgid "Accounts"
@ -226,20 +206,6 @@ msgstr "Téměř hotovo! Podívejme se."
msgid "Alternative Currency"
msgstr "Alternativní měna"
#: www/views/tab-settings.html:75
msgid "Price Display"
msgstr "Zobrazení cen"
#: src/js/controllers/tab-settings.js:19
#: www/views/preferencesPriceDisplay.html:12
msgid "Fiat"
msgstr "Nucený oběh"
#: src/js/controllers/tab-settings.js:19
#: www/views/preferencesPriceDisplay.html:15
msgid "Cryptocurrency"
msgstr "Kryptoměna"
#: src/js/controllers/buyAmazon.js:98
msgid "Amazon.com is not available at this moment. Please try back later."
msgstr "Amazon.com není v této chvíli k dispozici. Zkuste to prosím později."
@ -471,7 +437,6 @@ msgid "Buy &amp; Sell Bitcoin"
msgstr "Koupit &amp; prodat Bitcoin"
#: www/views/tab-send.html:35
#: src/js/services/buyAndSellService.js:26
msgid "Buy Bitcoin"
msgstr "Koupit Bitcoin"
@ -520,8 +485,8 @@ msgid "Cannot Create Wallet"
msgstr "Není možné vytvořit peněženku"
#: src/js/services/profileService.js:442
msgid "Cannot join the same wallet more than once"
msgstr "Nelze se připojit vícekrát ke stejné peněžence"
msgid "Cannot join the same wallet more that once"
msgstr "Není možné několikrát sloučit stejnou peněženku"
#: www/views/includes/bitpayCardsCard.html:2
msgid "Cards"
@ -654,14 +619,10 @@ msgstr "Připojování ke Glidera..."
msgid "Connection reset by peer"
msgstr "Připojení přerušeno druhou stranou"
#: www/views/tab-send.html:85
#: www/views/tab-send.html:45
msgid "Contacts"
msgstr "Kontakty"
#: www/views/tab-send.html:86
msgid "Saved frequently used addresses"
msgstr "Uložené, často používané adresy"
#: www/views/onboarding/notifications.html:9
msgid "Continue"
msgstr "Pokračovat"
@ -696,7 +657,6 @@ msgstr "Spoluplátce {{$index}}"
#: src/js/controllers/copayers.js:79
#: src/js/controllers/export.js:193
#: src/js/controllers/confirm.js:41
#: www/views/includes/copyToClipboard.html:4
msgid "Copied to clipboard"
msgstr "Zkopírováno do schránky"
@ -863,7 +823,7 @@ msgstr "Vytvořit sdílenou peněženku"
#: www/views/onboarding/tour.html:51
#: www/views/tab-home.html:75
#: www/views/tab-send.html:75
#: www/views/tab-send.html:36
msgid "Create bitcoin wallet"
msgstr "Vytvořit Bitcoin peněženku"
@ -938,7 +898,7 @@ msgstr "Mazání peněženky..."
#: src/js/services/onGoingProcess.js:28
msgid "Deleting payment proposal"
msgstr "Mazání návrhu platby"
msgstr "Mázání návrhu platby"
#: www/views/join.html:141
#: www/views/tab-create-personal.html:111
@ -992,7 +952,7 @@ msgstr "Duplikování peněženky..."
#: www/views/addresses.html:19
msgid "Each bitcoin wallet can generate billions of addresses from your 12-word backup. A new address is automatically generated and shown each time you receive a payment."
msgstr "Každá Bitcoin peněženka může z 12-ti slov zálohovací fráze vygenerovat miliardy adres. Vždy, když přijímáte platbu, je automaticky vygenerována nová adresa."
msgstr "Každá Bitcoin peněženka může z 12-ti slov zálohovací fráze vygenerovat miliardy adres. Vždy, když přijímáté platbu, je automaticky vygenerována nová adresa."
#: src/js/services/feeService.js:13
msgid "Economy"
@ -1297,7 +1257,7 @@ msgstr "Nastavení filtru"
#: src/js/services/fingerprintService.js:43
#: src/js/services/fingerprintService.js:48
msgid "Finger Scan Failed"
msgstr "Sken otisku prstu se nezdařil"
msgstr "Scan otisku prstu se nezdařil"
#: src/js/controllers/feedback/send.js:34
#: www/views/feedback/complete.html:7
@ -1316,7 +1276,6 @@ msgstr "Pro účely auditu"
#: www/views/modals/txp-details.html:74
#: www/views/topup.html:34
#: www/views/tx-details.html:52
#: www/views/review.html:22
msgid "From"
msgstr "Od"
@ -1377,6 +1336,10 @@ msgid "Get news and updates from BitPay"
msgstr "Získávejte novinky a aktualizace z BitPay"
#: www/views/onboarding/welcome.html:8
msgctxt "button"
msgid "Get started"
msgstr "Začněte"
#: www/views/bitpayCard.html:49
msgid "Get started"
msgstr "Začněte"
@ -1547,7 +1510,7 @@ msgstr "Je-li povoleno, budou chráněny veškeré citlivé informace (privátn
#: www/views/advancedSettings.html:23
msgid "If enabled, the Recent Transactions card - a list of transactions occuring across all wallets - will appear in the Home tab."
msgstr "Je-li povoleno, zobrazí se na kartě Domů karta Nedávné transakce - seznam posledních transakcí napříč všemi peněženkami."
msgstr "Je-li povoleno, zobrazí se na kartě Domů karta Nadávné transakce - seznam posledních transakcí napříč všemi peněženkami."
#: www/views/advancedSettings.html:14
msgid "If enabled, wallets will also try to spend unconfirmed funds. This option may cause transaction delays."
@ -1667,7 +1630,7 @@ msgstr "Neplatná odvozovací cesta"
#: src/js/controllers/copayers.js:90
msgid "Invitation to share a {{appName}} Wallet"
msgstr "Pozvánka ke sdílení {{appName}} peněženky"
msgstr "Pozvání ke sdílení {{appName}} peněženky"
#: www/views/mercadoLibreCards.html:20
#: www/views/modals/mercadolibre-card-details.html:48
@ -1692,7 +1655,7 @@ msgstr "Je vhodné vyvarovat se opakovanému použití adres - chrání to jak V
#: src/js/controllers/backup.js:76
msgid "It's important that you write your backup phrase down correctly. If something happens to your wallet, you'll need this backup to recover your money. Please review your backup and try again."
msgstr "Je důležité si správně napsat zálohovací frázi. Stane-li se něco Vaší peněžence, budete tuto zálohu potřebovat ke zístupnění peněz. Zkontrolujte prosím Vaši zálohu a zkuste to znovu."
msgstr "Je důležité si správně napsat zálohovací frázi. Stane-li se něco Vaší peněžence, budete tuto zálohu potřebovat ke znovuzprístupnění peněz. Zkontrolujte prosím Vaši zálohu a zkuste to znovu."
#: www/views/join.html:151
msgid "Join"
@ -1960,7 +1923,7 @@ msgstr "Žádné peněženky k příjmu peněz"
#: www/views/cashScan.html:15
msgid "No wallets eligible for Bitcoin Cash support"
msgstr "Žádné peněženky podporující Bitcoin Cash"
msgstr "Žádné peněženky poporující Bitcoin Cash"
#: src/js/controllers/cashScan.js:58
msgid "Non BIP44 wallet"
@ -1968,7 +1931,7 @@ msgstr "Jiná než BIP44 peněženka"
#: www/views/cashScan.html:46
msgid "Non eligible BTC wallets"
msgstr "Peněženky nezpůsobilé pro BTC"
msgstr "Peněženky nezpůsobilé k BTC"
#: src/js/services/feeService.js:12
msgid "Normal"
@ -2200,10 +2163,6 @@ msgstr "Platba odmítnuta"
msgid "Payment Sent"
msgstr "Platba odeslána"
#: www/views/includes/slideToAcceptSuccess.html:12
msgid "Share this transaction"
msgstr "Sdílet tuto transakci"
#: www/views/modals/txp-details.html:32
msgid "Payment accepted, but not yet broadcasted"
msgstr "Platba přijata, ale zatím nerozeslána"
@ -2221,7 +2180,7 @@ msgid "Payment details"
msgstr "Detaily platby"
#: www/views/modals/paypro.html:6
msgid "Payment Request"
msgid "Payment request"
msgstr "Žádost o platbu"
#: www/views/mercadoLibreCards.html:22
@ -2574,14 +2533,6 @@ msgstr "Vyhledávání transakcí"
msgid "Search or enter bitcoin address"
msgstr "Vyhledat nebo zadat Bitcoin adresu"
#: src/js/controllers/tab-send.js:28
msgid "Clipboard"
msgstr "Schránka"
#: src/js/controllers/tab-send.js:29
msgid "Your Clipboard is empty"
msgstr "Vaše schránka je prázdná"
#: www/views/modals/search.html:16
msgid "Search transactions"
msgstr "Vyhledávání transakcí"
@ -2640,68 +2591,9 @@ msgid "Send by email"
msgstr "Poslat e-mailem"
#: src/js/controllers/confirm.js:177
#: src/js/controllers/tab-send.js:94
msgid "Send from"
msgstr "Odeslat z"
#: src/js/controllers/tab-send.js:77
msgid "Send to"
msgstr "Odeslat"
#: www/views/tab-send.html:20
msgid "Paste Clipboard"
msgstr "Vložit ze schránky"
#: www/views/tab-send.html:21
msgid "Paste Address"
msgstr "Vložit adresu"
#: www/views/tab-send.html:27
msgid "Transfer between wallets"
msgstr "Přenos mezi peněženkami"
#: www/views/tab-send.html:35
msgid "Scan QR Code"
msgstr "Skenovat QR kód"
#: www/views/tab-send.html:46
msgid "Send Bitcoin faster!"
msgstr "Odesílejte Bitcoin rychleji!"
#: www/views/tab-send.html:50
msgid "Save frequently used addresses and send them Bitcoin in just one tap"
msgstr "Uložte si často používané adresy a posílejte jim Bitcoin jedním kliknutím"
#: www/views/tab-send.html:55
msgid "Add your first contact"
msgstr "Přidat váš první kontakt"
#: www/views/tab-send.html:65
msgid "Your Bitcoin wallet is empty"
msgstr "Vaše Bitcoin peněženka je prázdná"
#: www/views/tab-send.html:69
msgid "To get started, buy Bitcoin Cash (BCH) or Bitcoin Core (BTC), or share your address."
msgstr "Chcete-li začít, nakupte Bitcoin Cash (BCH) nebo Bitcoin Core (BTC), nebo sdílejte svou adresu."
#: www/views/tab-send.html:70
msgid "You can receive bitcoin from any wallet or service."
msgstr "Můžete přijímat Bitcoin z jakékoliv peněženky nebo služby."
#: www/views/tab-send.html:72
#: www/views/shapeshift.html:23
#: www/views/tab-send.html:33
msgid "To get started, you'll need to create a bitcoin wallet and get some bitcoin."
msgstr "Chcete-li začít, budete muset vytvořit Bitcoin peněženku a Bitcoin získat."
#: www/views/tab-send.html:74
msgid "Buy Bitcoin now"
msgstr "Koupit Bitcoin"
#: www/views/tab-send.html:76
msgid "Show my address"
msgstr "Zobrazit mou adresu"
#: www/views/includes/itemSelector.html:8
msgid "Send max amount"
msgstr "Odeslat maximální částku"
@ -2925,13 +2817,8 @@ msgid "Sweep"
msgstr "Sweep"
#: www/views/includes/incomingDataMenu.html:89
msgctxt "List item"
msgid "Sweep paper wallet"
msgstr "Sweep papírové peněženky"
#: www/views/paperWallet.html:3
msgctxt "Page title"
msgid "Sweep Paper Wallet"
msgid "Sweep paper wallet"
msgstr "Sweep papírové peněženky"
#: src/js/services/onGoingProcess.js:33
@ -3100,14 +2987,6 @@ msgstr "Tato aplikace k držení Vašich Bitcoinů používá nejmodernější z
msgid "This bitcoin payment request has expired."
msgstr "Tato platba vypršela."
#: www/views/review.html:55
msgid "Payment expires:"
msgstr "Platba vyprší:"
#: www/views/review.html:56
msgid "Payment request has expired"
msgstr "Platnost žádosti o platbu vypršela"
#: www/views/join.html:133
#: www/views/tab-create-personal.html:103
#: www/views/tab-create-shared.html:132
@ -3149,6 +3028,10 @@ msgstr "Na"
msgid "To get started, buy bitcoin or share your address. You can receive bitcoin from any wallet or service."
msgstr "Chcete-li začít, nakupte Bitcoin nebo sdílejte svou adresu. Můžete přijímat Bitcoin z jakékoliv jiné peněženky nebo služby."
#: www/views/tab-send.html:33
msgid "To get started, you'll need to create a bitcoin wallet and get some bitcoin."
msgstr "Chcete-li začít, budete muset vytvořit Bitcoin peněženku a Bitcoin získat."
#: src/js/services/bitpayAccountService.js:73
msgid "To {{reason}} you must first add your BitPay account - {{email}}"
msgstr "Pro {{reason}} musíte nejprve přidat Váš účet BitPay - {{email}}"
@ -3161,26 +3044,6 @@ msgstr "Navyšování v průběhu..."
msgid "Top up {{amountStr}} to debit card ({{cardLastNumber}})"
msgstr "Navýšit debetní kartu ({{cardLastNumber}}) o {{amountStr}}"
#: www/views/shapeshift.html:30
msgid "Start ShapeShift"
msgstr "Spustit ShapeShift"
#: www/views/shapeshift.html:30
msgid "Exchange your BTC to BCH in minutes."
msgstr "Vyměňte BTC za BCH za několik minut."
#: www/views/shapeshift.html:30
msgid "To start the process you need to add funds to your wallet."
msgstr "Ke spuštění procesu musíte do peněženky přidat prostředky."
#: www/views/shapeshift.html:30
msgid "The process is fast and you will receive the exchanged amount in your wallet."
msgstr "Tento proces je rychlý a vyměněnou částku dostanete do peněženky."
#: www/views/shapeshift.html:34
msgid "This service is provided by the third-party ShapeShift, who will charge a small fee for the service. The fee will be shown before you start the transaction."
msgstr "Tuto službu poskytuje nezávislý poskytovatel ShapeShift, který za službu účtuje malý poplatek. Poplatek se zobrazí před spuštěním transakce."
#: www/views/buyAmazon.html:61
#: www/views/buyMercadoLibre.html:60
#: www/views/modals/wallet-balance.html:23
@ -3365,7 +3228,7 @@ msgstr "Upozornění: Soukromý klíč této peněženky není k dispozici. Expo
#: www/views/modals/paypro.html:42
msgid "WARNING: UNTRUSTED CERTIFICATE"
msgstr "Upozornění: Nedůvěryhodný certifikát"
msgstr "Upozornění: Nedůveryhodný certifikát"
#: src/js/services/onGoingProcess.js:15
msgid "Waiting for Ledger..."
@ -3613,7 +3476,7 @@ msgstr "Zálohu můžete vytvořit později v nastavení peněženky."
#: src/js/controllers/preferencesLanguage.js:12
msgid "You can make contributions by signing up on our Crowdin community translation website. Were looking forward to hearing from you!"
msgstr "Můžete přispívat přihlášením k webovým stránkám Crowdin komunity pro překlady. Těšíme se na Vaše příspěvky!"
msgstr "Můžete přispívat příhlášením k webovým stránkám Crowdin komunity pro překlady. Těšíme se na Váše příspěvky!"
#: www/views/tab-scan.html:16
msgid "You can scan bitcoin addresses, payment requests, paper wallets, and more."
@ -3773,171 +3636,3 @@ msgstr "{{updatingTxHistoryProgress}} transakcí staženo"
msgid "{{wallet.m}}-of-{{wallet.n}}"
msgstr "{{wallet.m}}-z-{{wallet.n}}"
#: src/js/services/shapeshiftService.js:8
msgid "Shapeshift"
msgstr "Shapeshift"
#: www/views/includes/community.html:3
msgid "Community"
msgstr "Komunita"
#: src/js/services/communityService.js:40
msgid "Bitcoin Cash Reddit"
msgstr "Bitcoin Cash Reddit"
#: src/js/services/communityService.js:47
msgid "Bitcoin.com Twitter"
msgstr "Bitcoin.com Twitter"
#: www/views/includes/nextSteps.html:3
msgid "Explore Bitcoin.com"
msgstr "Prohlédnout Bitcoin.com"
#: src/js/services/bitcoincomService.js:21
msgid "Bitcoin Cash Games"
msgstr "Bitcoin Cash hry"
#: www/views/includes/community.html:29
msgid "Share the Wallet App"
msgstr "Sdílet aplikaci peněženky"
#: src/js/services/bitcoincomService.js:28
msgid "News"
msgstr "Novinky"
#: src/js/services/bitcoincomService.js:35
msgid "Mining Pool"
msgstr "Těžební pool"
#: src/js/services/bitcoincomService.js:42
msgid "Tools"
msgstr "Nástroje"
#: src/js/services/bitcoincomService.js:49
msgid "Bitcoin Price Charts"
msgstr "Grafy cen Bitcoinu"
#: src/js/services/bitcoincomService.js:56
msgid "Free Bitcoin Cash"
msgstr "Bitcoin Cash zdarma"
#: www/views/tab-home.html:30
msgid "Your Bitcoin Wallets are ready!"
msgstr "Vaše Bitcoin peněženka je připravena!"
#: src/js/controllers/amount.js:49
msgid "Address does not contain currency information, please make sure you are sending the correct currency."
msgstr "Adresa neobsahuje žádné údaje o měně. Zkontrolujte, zda posíláte správnou měnu."
#: www/views/review.html:4
msgid "Review Transaction"
msgstr "Zkontrolovat transakci"
#: src/js/controllers/review.controller.js:36
msgid "You are sending"
msgstr "Posíláte"
#: src/js/controllers/review.controller.js:66
msgid "You are shifting"
msgstr "Vyměňujete"
#: www/views/review.html:36
msgid "To:"
msgstr "Příjemce:"
#: www/views/review.html:53
msgid "Add personal note"
msgstr "Přidat osobní poznámku"
#: www/views/review.html:87
msgid "Suggested by merchant:"
msgstr "Doporučeno obchodníkem:"
#: src/js/controllers/review.controller.js:37
msgid "Enter text here"
msgstr "Sem zadejte text"
#: www/views/review.html:57
msgid "Personal note:"
msgstr "Osobní poznámka:"
#: www/views/review.html:69
msgid "Less than 1 cent"
msgstr "Méně než 1 koruna"
#: src/js/services/incomingData.js:129
msgid "This invoice is no longer accepting payments"
msgstr "Tato faktura již nepřijímá platby"
#: www/views/amount.html.js:60
msgid "Send Maximum Amount"
msgstr "Odeslat maximální částku"
#: src/js/controllers/amount.controller.js:239
msgid "Unknown error."
msgstr "Neznámá chyba."
#: www/views/paperWallet.html:48
msgid "No Bitcoin Cash wallet to transfer funds to found."
msgstr "Žádná Bitcoin Cash peněženka pro transfer nalezených prostředků."
#: www/views/paperWallet.html:54
msgid "No Bitcoin Cash found."
msgstr "Žádný Bitcoin Cash nenalezen."
#: www/views/paperWallet.html:60
msgid "Bitcoin Core found:"
msgstr "Nalezen Bitcoin Core:"
#: www/views/paperWallet.html:98
msgid "No Bitcoin Core wallet to transfer funds to found."
msgstr "Žádná Bitcoin Core peněženka pro transfer nalezených prostředků."
#: www/views/paperWallet.html:104
msgid "No Bitcoin Core found."
msgstr "Žádný Bitcoin Core nenalezen."
#: src/js/controllers/tab-scan.js:120
msgid "Scan Failed"
msgstr "Sken selhal"
#: src/js/controllers/tab-scan.js:121
msgid "Data not recognised."
msgstr "Data nebyla rozpoznána."
#: src/js/controllers/tab-scan.js:121
msgid "Unsupported"
msgstr "Nepodporováno"
#: src/js/controllers/tab-scan.js:121
msgid "Testnet is not supported."
msgstr "Testnet není podporován."
#: www/views/includes/incomingDataMenu.html:81
msgid "URL"
msgstr "URL"
#: www/views/includes/incomingDataMenu.html:90
msgid "Open in web browser"
msgstr "Otevřít ve webovém prohlížeči"
#: src/js/services/shapeshift.service.js.html:90
msgid "Invalid address"
msgstr "Neplatná adresa"
#: src/js/services/shapeshift.service.js.html:90
msgid "Amount is not defined"
msgstr "Částka nedefinována"
#: src/js/services/shapeshift.service.js.html:90
msgid "Amount is below the minimun"
msgstr "Nižší než minimální částka"
#: src/js/services/shapeshift.service.js.html:90
msgid "Amount is above the limit"
msgstr "Nadlimitní částka"
#: src/js/services/shapeshift.service.js.html:90
msgid "Invalid response from Shapeshift"
msgstr "Neplatná odpověď z Shapeshift"

File diff suppressed because it is too large Load diff

View file

@ -11,7 +11,7 @@ msgstr ""
"Last-Translator: emilold\n"
"Language-Team: Spanish\n"
"Language: es\n"
"PO-Revision-Date: 2018-09-15 05:56\n"
"PO-Revision-Date: 2018-07-04 09:27\n"
#: www/views/modals/paypro.html:34
msgid "(Trusted)"
@ -81,26 +81,6 @@ msgstr "Número de cuenta"
msgid "Instant transactions with low fees"
msgstr "Transacciones instantáneas con comisiones bajas"
#: www/views/walletSelector.html:49
msgid "Insufficient funds"
msgstr "Sin fondos suficientes"
#: www/views/amount.html:42
msgid "Change Currency"
msgstr "Cambiar moneda"
#: www/views/amount.html:49
msgid "Available Funds"
msgstr "Fondos disponibles"
#: www/views/amount.html:59
msgid "Use All Available Funds"
msgstr "Usar todos los fondos"
#: www/views/amount.html:99
msgid "Next"
msgstr "Siguiente"
#: www/views/preferencesBitpayServices.html:23
msgid "Accounts"
msgstr "Cuentas"
@ -226,20 +206,6 @@ msgstr "¡Casi listo! Vamos a revisar."
msgid "Alternative Currency"
msgstr "Moneda Alternativa"
#: www/views/tab-settings.html:75
msgid "Price Display"
msgstr "Muestra de precio"
#: src/js/controllers/tab-settings.js:19
#: www/views/preferencesPriceDisplay.html:12
msgid "Fiat"
msgstr "Fiat"
#: src/js/controllers/tab-settings.js:19
#: www/views/preferencesPriceDisplay.html:15
msgid "Cryptocurrency"
msgstr "Criptomoneda"
#: src/js/controllers/buyAmazon.js:98
msgid "Amazon.com is not available at this moment. Please try back later."
msgstr "Amazon.com no está disponible en este momento. Inténtalo de nuevo más tarde."
@ -471,7 +437,6 @@ msgid "Buy &amp; Sell Bitcoin"
msgstr "Comprar &amp; Vender Bitcoin"
#: www/views/tab-send.html:35
#: src/js/services/buyAndSellService.js:26
msgid "Buy Bitcoin"
msgstr "Comprar Bitcoin"
@ -520,7 +485,7 @@ msgid "Cannot Create Wallet"
msgstr "No se pudo crear la billetera"
#: src/js/services/profileService.js:442
msgid "Cannot join the same wallet more than once"
msgid "Cannot join the same wallet more that once"
msgstr "No puede unirse a la misma billetera más de una vez"
#: www/views/includes/bitpayCardsCard.html:2
@ -654,14 +619,10 @@ msgstr "Conectando a Glidera..."
msgid "Connection reset by peer"
msgstr "Conexión re establecida"
#: www/views/tab-send.html:85
#: www/views/tab-send.html:45
msgid "Contacts"
msgstr "Contactos"
#: www/views/tab-send.html:86
msgid "Saved frequently used addresses"
msgstr "Direcciones frecuentes guardadas"
#: www/views/onboarding/notifications.html:9
msgid "Continue"
msgstr "Continuar"
@ -696,7 +657,6 @@ msgstr "Co-pagador {{$index}}"
#: src/js/controllers/copayers.js:79
#: src/js/controllers/export.js:193
#: src/js/controllers/confirm.js:41
#: www/views/includes/copyToClipboard.html:4
msgid "Copied to clipboard"
msgstr "Copiado al portapapeles"
@ -863,7 +823,7 @@ msgstr "Crear billetera compartida"
#: www/views/onboarding/tour.html:51
#: www/views/tab-home.html:75
#: www/views/tab-send.html:75
#: www/views/tab-send.html:36
msgid "Create bitcoin wallet"
msgstr "Crear billetera"
@ -1316,7 +1276,6 @@ msgstr "Para propósitos de auditoría"
#: www/views/modals/txp-details.html:74
#: www/views/topup.html:34
#: www/views/tx-details.html:52
#: www/views/review.html:22
msgid "From"
msgstr "Desde"
@ -1377,6 +1336,10 @@ msgid "Get news and updates from BitPay"
msgstr "Recibir noticias y actualizaciones de BitPay"
#: www/views/onboarding/welcome.html:8
msgctxt "button"
msgid "Get started"
msgstr "Comenzar"
#: www/views/bitpayCard.html:49
msgid "Get started"
msgstr "Empezar"
@ -2200,10 +2163,6 @@ msgstr "Pago Rechazado"
msgid "Payment Sent"
msgstr "Pago Enviado"
#: www/views/includes/slideToAcceptSuccess.html:12
msgid "Share this transaction"
msgstr "Comparte esta transacción"
#: www/views/modals/txp-details.html:32
msgid "Payment accepted, but not yet broadcasted"
msgstr "Pago aceptado, pero aún no fue enviado"
@ -2221,8 +2180,8 @@ msgid "Payment details"
msgstr "Detalles del pago"
#: www/views/modals/paypro.html:6
msgid "Payment Request"
msgstr "Solicitar pago"
msgid "Payment request"
msgstr "Solicitud de pago"
#: www/views/mercadoLibreCards.html:22
#: www/views/modals/mercadolibre-card-details.html:39
@ -2574,14 +2533,6 @@ msgstr "Buscar transacciones"
msgid "Search or enter bitcoin address"
msgstr "Buscar o introducir dirección bitcoin"
#: src/js/controllers/tab-send.js:28
msgid "Clipboard"
msgstr "Portapapeles"
#: src/js/controllers/tab-send.js:29
msgid "Your Clipboard is empty"
msgstr "Portapapeles vacío"
#: www/views/modals/search.html:16
msgid "Search transactions"
msgstr "Buscar transacciones"
@ -2640,68 +2591,9 @@ msgid "Send by email"
msgstr "Enviar por correo electrónico"
#: src/js/controllers/confirm.js:177
#: src/js/controllers/tab-send.js:94
msgid "Send from"
msgstr "Enviar desde"
#: src/js/controllers/tab-send.js:77
msgid "Send to"
msgstr "Enviar a"
#: www/views/tab-send.html:20
msgid "Paste Clipboard"
msgstr "Pegar portapapeles"
#: www/views/tab-send.html:21
msgid "Paste Address"
msgstr "Pegar dirección"
#: www/views/tab-send.html:27
msgid "Transfer between wallets"
msgstr "Transferir entre billeteras"
#: www/views/tab-send.html:35
msgid "Scan QR Code"
msgstr "Escanear código QR"
#: www/views/tab-send.html:46
msgid "Send Bitcoin faster!"
msgstr "¡Envía Bitcoin más rápido!"
#: www/views/tab-send.html:50
msgid "Save frequently used addresses and send them Bitcoin in just one tap"
msgstr "Guardar las direcciones que usas frecuentemente y envía Bitcoin en un click"
#: www/views/tab-send.html:55
msgid "Add your first contact"
msgstr "Añade tu primer contacto"
#: www/views/tab-send.html:65
msgid "Your Bitcoin wallet is empty"
msgstr "Tu billetera Bitcoin está vacía"
#: www/views/tab-send.html:69
msgid "To get started, buy Bitcoin Cash (BCH) or Bitcoin Core (BTC), or share your address."
msgstr "Para empezar, compra Bitcoin Cash (BCH) o Bitcoin Core (BTC), o comparte tu dirección."
#: www/views/tab-send.html:70
msgid "You can receive bitcoin from any wallet or service."
msgstr "Puedes recibir bitcoin desde cualquier billetera o servicio."
#: www/views/tab-send.html:72
#: www/views/shapeshift.html:23
#: www/views/tab-send.html:33
msgid "To get started, you'll need to create a bitcoin wallet and get some bitcoin."
msgstr "Para empezar, necesitarás crear una billetera y obtener bitcoins."
#: www/views/tab-send.html:74
msgid "Buy Bitcoin now"
msgstr "Comprar Bitcoin ahora"
#: www/views/tab-send.html:76
msgid "Show my address"
msgstr "Ver mi dirección"
#: www/views/includes/itemSelector.html:8
msgid "Send max amount"
msgstr "Enviar la máxima cantidad"
@ -2925,14 +2817,9 @@ msgid "Sweep"
msgstr "Importar"
#: www/views/includes/incomingDataMenu.html:89
msgctxt "List item"
msgid "Sweep paper wallet"
msgstr "Importar billetera de papel"
#: www/views/paperWallet.html:3
msgctxt "Page title"
msgid "Sweep Paper Wallet"
msgstr "Importar billetera de papel"
msgid "Sweep paper wallet"
msgstr "Importar billetera en papel"
#: src/js/services/onGoingProcess.js:33
msgid "Sweeping Wallet..."
@ -3100,14 +2987,6 @@ msgstr "Esta aplicación almacena tus bitcoins con seguridad avanzada."
msgid "This bitcoin payment request has expired."
msgstr "Esta solicitud de pago ha caducado."
#: www/views/review.html:55
msgid "Payment expires:"
msgstr "El pago expira en:"
#: www/views/review.html:56
msgid "Payment request has expired"
msgstr "El pago ha expirado"
#: www/views/join.html:133
#: www/views/tab-create-personal.html:103
#: www/views/tab-create-shared.html:132
@ -3149,6 +3028,10 @@ msgstr "Para"
msgid "To get started, buy bitcoin or share your address. You can receive bitcoin from any wallet or service."
msgstr "Para empezar, compra bitcoin o comparte tu dirección. Puedes recibir bitcoin desde cualquier billetera o servicio."
#: www/views/tab-send.html:33
msgid "To get started, you'll need to create a bitcoin wallet and get some bitcoin."
msgstr "Para empezar, necesitarás crear una billetera y obtener bitcoins."
#: src/js/services/bitpayAccountService.js:73
msgid "To {{reason}} you must first add your BitPay account - {{email}}"
msgstr "Para {{reason}} primero debes agregar tu cuenta de BitPay - {{email}}"
@ -3161,26 +3044,6 @@ msgstr "Recarda en progreso..."
msgid "Top up {{amountStr}} to debit card ({{cardLastNumber}})"
msgstr "Recargar {{amountStr}} a la tarjeta de débito ({{cardLastNumber}})"
#: www/views/shapeshift.html:30
msgid "Start ShapeShift"
msgstr "Empezar ShapeShift"
#: www/views/shapeshift.html:30
msgid "Exchange your BTC to BCH in minutes."
msgstr "Intercambia tus BTC a BCH en minutos."
#: www/views/shapeshift.html:30
msgid "To start the process you need to add funds to your wallet."
msgstr "Para iniciar el cambio necesitas añadir fondos a tu billetera."
#: www/views/shapeshift.html:30
msgid "The process is fast and you will receive the exchanged amount in your wallet."
msgstr "El proceso es rápido y recibirás la cantidad intercambiada en tu cartera."
#: www/views/shapeshift.html:34
msgid "This service is provided by the third-party ShapeShift, who will charge a small fee for the service. The fee will be shown before you start the transaction."
msgstr "Este servicio es proporcionado por el tercero ShapeShift, quien cobrará una pequeña tarifa por el servicio. La tarifa se mostrará antes de empezar la transacción."
#: www/views/buyAmazon.html:61
#: www/views/buyMercadoLibre.html:60
#: www/views/modals/wallet-balance.html:23
@ -3773,171 +3636,3 @@ msgstr "{{updatingTxHistoryProgress}} transacciones descargadas"
msgid "{{wallet.m}}-of-{{wallet.n}}"
msgstr "{{wallet.m}}-de-{{wallet.n}}"
#: src/js/services/shapeshiftService.js:8
msgid "Shapeshift"
msgstr "Shapeshift - Cambia BTC a BCH"
#: www/views/includes/community.html:3
msgid "Community"
msgstr "Comunidad"
#: src/js/services/communityService.js:40
msgid "Bitcoin Cash Reddit"
msgstr "Reddit de Bitcoin Cash"
#: src/js/services/communityService.js:47
msgid "Bitcoin.com Twitter"
msgstr "Twitter de Bitcoin.com"
#: www/views/includes/nextSteps.html:3
msgid "Explore Bitcoin.com"
msgstr "Explora Bitcoin.com"
#: src/js/services/bitcoincomService.js:21
msgid "Bitcoin Cash Games"
msgstr "Juegos de Bitcoin Cash"
#: www/views/includes/community.html:29
msgid "Share the Wallet App"
msgstr "Comparte esta app"
#: src/js/services/bitcoincomService.js:28
msgid "News"
msgstr "Noticias"
#: src/js/services/bitcoincomService.js:35
msgid "Mining Pool"
msgstr "Minería en la nube"
#: src/js/services/bitcoincomService.js:42
msgid "Tools"
msgstr "Herramientas"
#: src/js/services/bitcoincomService.js:49
msgid "Bitcoin Price Charts"
msgstr "Gráfica de precios Bitcoin"
#: src/js/services/bitcoincomService.js:56
msgid "Free Bitcoin Cash"
msgstr "Bitcoin Cash gratis"
#: www/views/tab-home.html:30
msgid "Your Bitcoin Wallets are ready!"
msgstr "¡Tus billeteras Bitcoin están listas!"
#: src/js/controllers/amount.js:49
msgid "Address does not contain currency information, please make sure you are sending the correct currency."
msgstr "La dirección no contiene información sobre la criptomoneda. Por favor asegúrese de estar enviando la criptomoneda correcta."
#: www/views/review.html:4
msgid "Review Transaction"
msgstr "Revisar transacción"
#: src/js/controllers/review.controller.js:36
msgid "You are sending"
msgstr "Estás enviando"
#: src/js/controllers/review.controller.js:66
msgid "You are shifting"
msgstr "Estás cambiando"
#: www/views/review.html:36
msgid "To:"
msgstr "Para:"
#: www/views/review.html:53
msgid "Add personal note"
msgstr "Añadir nota personal"
#: www/views/review.html:87
msgid "Suggested by merchant:"
msgstr "Sugerido por el comerciante:"
#: src/js/controllers/review.controller.js:37
msgid "Enter text here"
msgstr "Introduce el texto aquí"
#: www/views/review.html:57
msgid "Personal note:"
msgstr "Nota personal:"
#: www/views/review.html:69
msgid "Less than 1 cent"
msgstr "Menos de 1 centavo"
#: src/js/services/incomingData.js:129
msgid "This invoice is no longer accepting payments"
msgstr "Esta factura ya no está aceptando pagos"
#: www/views/amount.html.js:60
msgid "Send Maximum Amount"
msgstr "Enviar cantidad máxima"
#: src/js/controllers/amount.controller.js:239
msgid "Unknown error."
msgstr "Error desconocido."
#: www/views/paperWallet.html:48
msgid "No Bitcoin Cash wallet to transfer funds to found."
msgstr "No se encontró billetera BCH para transferir estos fondos."
#: www/views/paperWallet.html:54
msgid "No Bitcoin Cash found."
msgstr "No se encontró Bitcoin Cash."
#: www/views/paperWallet.html:60
msgid "Bitcoin Core found:"
msgstr "Bitcoin Core encontrado:"
#: www/views/paperWallet.html:98
msgid "No Bitcoin Core wallet to transfer funds to found."
msgstr "No se encontró billetera BTC para transferir estos fondos."
#: www/views/paperWallet.html:104
msgid "No Bitcoin Core found."
msgstr "No se encontró Bitcoin Core."
#: src/js/controllers/tab-scan.js:120
msgid "Scan Failed"
msgstr "Falló el escaneado"
#: src/js/controllers/tab-scan.js:121
msgid "Data not recognised."
msgstr "Datos no reconocidos."
#: src/js/controllers/tab-scan.js:121
msgid "Unsupported"
msgstr "No compatible"
#: src/js/controllers/tab-scan.js:121
msgid "Testnet is not supported."
msgstr "Testnet no es compatible."
#: www/views/includes/incomingDataMenu.html:81
msgid "URL"
msgstr "URL"
#: www/views/includes/incomingDataMenu.html:90
msgid "Open in web browser"
msgstr "Abrir en navegador web"
#: src/js/services/shapeshift.service.js.html:90
msgid "Invalid address"
msgstr "Dirección inválida"
#: src/js/services/shapeshift.service.js.html:90
msgid "Amount is not defined"
msgstr "Cantidad no definida"
#: src/js/services/shapeshift.service.js.html:90
msgid "Amount is below the minimun"
msgstr "Cantidad por debajo del mínimo"
#: src/js/services/shapeshift.service.js.html:90
msgid "Amount is above the limit"
msgstr "Cantidad por encima del límite"
#: src/js/services/shapeshift.service.js.html:90
msgid "Invalid response from Shapeshift"
msgstr "Respuesta inválida de Shapeshift"

View file

@ -11,7 +11,7 @@ msgstr ""
"Last-Translator: emilold\n"
"Language-Team: Persian\n"
"Language: fa\n"
"PO-Revision-Date: 2018-09-15 05:56\n"
"PO-Revision-Date: 2018-07-04 09:27\n"
#: www/views/modals/paypro.html:34
msgid "(Trusted)"
@ -81,26 +81,6 @@ msgstr "شماره حساب"
msgid "Instant transactions with low fees"
msgstr "معاملات فوری با پرداخت کم"
#: www/views/walletSelector.html:49
msgid "Insufficient funds"
msgstr "موجودی ناکافی"
#: www/views/amount.html:42
msgid "Change Currency"
msgstr "تغییر ارز"
#: www/views/amount.html:49
msgid "Available Funds"
msgstr "موجودی قابل استفاده"
#: www/views/amount.html:59
msgid "Use All Available Funds"
msgstr "استفاده از تمام موجودی در دسترس"
#: www/views/amount.html:99
msgid "Next"
msgstr "بعدی"
#: www/views/preferencesBitpayServices.html:23
msgid "Accounts"
msgstr "حساب ها"
@ -226,20 +206,6 @@ msgstr "تقریبا به پایان رسیدیم! بیا مروری کنیم."
msgid "Alternative Currency"
msgstr "ارز دوم"
#: www/views/tab-settings.html:75
msgid "Price Display"
msgstr "نمایش قیمت"
#: src/js/controllers/tab-settings.js:19
#: www/views/preferencesPriceDisplay.html:12
msgid "Fiat"
msgstr "پول اعتباری"
#: src/js/controllers/tab-settings.js:19
#: www/views/preferencesPriceDisplay.html:15
msgid "Cryptocurrency"
msgstr "ارز رمزنگاری شده"
#: src/js/controllers/buyAmazon.js:98
msgid "Amazon.com is not available at this moment. Please try back later."
msgstr "Amazon.com در حال حاضر در دسترس نمی باشد، خواهشمند است در زمان دیگری امتحان کنید."
@ -471,7 +437,6 @@ msgid "Buy &amp; Sell Bitcoin"
msgstr "خرید &amp; فروش بیتکوین"
#: www/views/tab-send.html:35
#: src/js/services/buyAndSellService.js:26
msgid "Buy Bitcoin"
msgstr "خرید بیتکوین"
@ -520,7 +485,7 @@ msgid "Cannot Create Wallet"
msgstr "قادر به ایجاد کیف پول نیست"
#: src/js/services/profileService.js:442
msgid "Cannot join the same wallet more than once"
msgid "Cannot join the same wallet more that once"
msgstr "امکان بیش از یک بار پیوستن به یک کیف پول نیست"
#: www/views/includes/bitpayCardsCard.html:2
@ -654,14 +619,10 @@ msgstr "در حال اتصال به Glidera..."
msgid "Connection reset by peer"
msgstr "ریست اتصال توسط همکار"
#: www/views/tab-send.html:85
#: www/views/tab-send.html:45
msgid "Contacts"
msgstr "تماسها"
#: www/views/tab-send.html:86
msgid "Saved frequently used addresses"
msgstr "آدرس های ذخیره شده که اغلب مورد استفاده قرار گرفته اند"
#: www/views/onboarding/notifications.html:9
msgid "Continue"
msgstr "ادامه"
@ -696,7 +657,6 @@ msgstr "Copayer {{$index}}"
#: src/js/controllers/copayers.js:79
#: src/js/controllers/export.js:193
#: src/js/controllers/confirm.js:41
#: www/views/includes/copyToClipboard.html:4
msgid "Copied to clipboard"
msgstr "در کلیپ بورد کپی شد"
@ -863,7 +823,7 @@ msgstr "ایجاد کیف پول مشترک"
#: www/views/onboarding/tour.html:51
#: www/views/tab-home.html:75
#: www/views/tab-send.html:75
#: www/views/tab-send.html:36
msgid "Create bitcoin wallet"
msgstr "ایجاد کیف پول بیتکوین"
@ -1316,7 +1276,6 @@ msgstr "برای اهداف حسابرسی"
#: www/views/modals/txp-details.html:74
#: www/views/topup.html:34
#: www/views/tx-details.html:52
#: www/views/review.html:22
msgid "From"
msgstr "از"
@ -1377,6 +1336,10 @@ msgid "Get news and updates from BitPay"
msgstr "دریافت اخبار و به روز رسانی از BitPay"
#: www/views/onboarding/welcome.html:8
msgctxt "button"
msgid "Get started"
msgstr "شروع کنید"
#: www/views/bitpayCard.html:49
msgid "Get started"
msgstr "شروع کنید"
@ -2200,10 +2163,6 @@ msgstr "پرداخت رد شد"
msgid "Payment Sent"
msgstr "پرداخت ارسال شد"
#: www/views/includes/slideToAcceptSuccess.html:12
msgid "Share this transaction"
msgstr "به اشتراک گذاشتن این معامله"
#: www/views/modals/txp-details.html:32
msgid "Payment accepted, but not yet broadcasted"
msgstr "پرداخت پذیرفته شده اما هنوز پخش نشده"
@ -2221,7 +2180,7 @@ msgid "Payment details"
msgstr "جزئیات پرداخت"
#: www/views/modals/paypro.html:6
msgid "Payment Request"
msgid "Payment request"
msgstr "درخواست پرداخت"
#: www/views/mercadoLibreCards.html:22
@ -2574,14 +2533,6 @@ msgstr "جستجوی تراکنش ها"
msgid "Search or enter bitcoin address"
msgstr "جستجو و یا وارد کردن آدرس بیتکوین"
#: src/js/controllers/tab-send.js:28
msgid "Clipboard"
msgstr "کلیپ بورد"
#: src/js/controllers/tab-send.js:29
msgid "Your Clipboard is empty"
msgstr "کلیپ بورد شما خالی است"
#: www/views/modals/search.html:16
msgid "Search transactions"
msgstr "جستجوی تراکنش ها"
@ -2640,68 +2591,9 @@ msgid "Send by email"
msgstr "ارسال توسط ایمیل"
#: src/js/controllers/confirm.js:177
#: src/js/controllers/tab-send.js:94
msgid "Send from"
msgstr "ارسال از"
#: src/js/controllers/tab-send.js:77
msgid "Send to"
msgstr "ارسال به"
#: www/views/tab-send.html:20
msgid "Paste Clipboard"
msgstr "جای گذاری کلیپ برد"
#: www/views/tab-send.html:21
msgid "Paste Address"
msgstr "جای گذاری آدرس"
#: www/views/tab-send.html:27
msgid "Transfer between wallets"
msgstr "انتقال بین کیف پول ها"
#: www/views/tab-send.html:35
msgid "Scan QR Code"
msgstr "اسکن کد QR"
#: www/views/tab-send.html:46
msgid "Send Bitcoin faster!"
msgstr "ارسال سریع تر بیت کوین!"
#: www/views/tab-send.html:50
msgid "Save frequently used addresses and send them Bitcoin in just one tap"
msgstr "ذخیره آدرس های اغلب استفاده شده و ارسال بیت کوین به آنها تنها با یک ضربه"
#: www/views/tab-send.html:55
msgid "Add your first contact"
msgstr "اولین تماس خود اضافه کنید"
#: www/views/tab-send.html:65
msgid "Your Bitcoin wallet is empty"
msgstr "کیف پول بیت کوین شما خالی است"
#: www/views/tab-send.html:69
msgid "To get started, buy Bitcoin Cash (BCH) or Bitcoin Core (BTC), or share your address."
msgstr "برای شروع، Bitcoin Cash (BCH) یا Bitcoin Core (BTC) بخرید و یا آدرس خود را به اشتراک بگذارید."
#: www/views/tab-send.html:70
msgid "You can receive bitcoin from any wallet or service."
msgstr "شما می توانید از هر کیف پول و یا خدمات بیت کوین دریافت کنید."
#: www/views/tab-send.html:72
#: www/views/shapeshift.html:23
#: www/views/tab-send.html:33
msgid "To get started, you'll need to create a bitcoin wallet and get some bitcoin."
msgstr "برای شروع، شما نیاز دارید که یک کیف پول ایجاد کنید و مقداری بیتکوین تهیه کنید."
#: www/views/tab-send.html:74
msgid "Buy Bitcoin now"
msgstr "خرید بیت کوین همین الان"
#: www/views/tab-send.html:76
msgid "Show my address"
msgstr "نمایش آدرس من"
#: www/views/includes/itemSelector.html:8
msgid "Send max amount"
msgstr "ارسال حداکثر مقدار"
@ -2925,14 +2817,9 @@ msgid "Sweep"
msgstr "وارد کردن و تغییر آدرس به جدید(sweep)"
#: www/views/includes/incomingDataMenu.html:89
msgctxt "List item"
msgid "Sweep paper wallet"
msgstr "جاروب کردن کیف پول کاغذی"
#: www/views/paperWallet.html:3
msgctxt "Page title"
msgid "Sweep Paper Wallet"
msgstr "جاروب کردن کیف پول کاغذی"
msgid "Sweep paper wallet"
msgstr "وارد کردن والت کاغذی و تغییر آدرس به جدید(sweep)"
#: src/js/services/onGoingProcess.js:33
msgid "Sweeping Wallet..."
@ -3100,14 +2987,6 @@ msgstr "این نرم افزار بیتکوین های شما را با بالا
msgid "This bitcoin payment request has expired."
msgstr "این درخواست پرداخت بیتکوین منقضی شده است."
#: www/views/review.html:55
msgid "Payment expires:"
msgstr "زمان انقضای پرداخت:"
#: www/views/review.html:56
msgid "Payment request has expired"
msgstr "درخواست پرداخت منقضی شده است"
#: www/views/join.html:133
#: www/views/tab-create-personal.html:103
#: www/views/tab-create-shared.html:132
@ -3149,6 +3028,10 @@ msgstr "به"
msgid "To get started, buy bitcoin or share your address. You can receive bitcoin from any wallet or service."
msgstr "برای شروع، بیتکوین بخرید و یا آدرس خود را به اشتراک بگذارید. شما می توانید از هر کیف پول یا سرویسی بیتکوین دریافت کنید."
#: www/views/tab-send.html:33
msgid "To get started, you'll need to create a bitcoin wallet and get some bitcoin."
msgstr "برای شروع، شما نیاز دارید که یک کیف پول ایجاد کنید و مقداری بیتکوین تهیه کنید."
#: src/js/services/bitpayAccountService.js:73
msgid "To {{reason}} you must first add your BitPay account - {{email}}"
msgstr "برای انجام {{reason}} شما ابتدا باید حساب - {{email}} BitPay خود را اضافه کنید"
@ -3161,26 +3044,6 @@ msgstr "در حال پردازش انتقال به صورت Top Up..."
msgid "Top up {{amountStr}} to debit card ({{cardLastNumber}})"
msgstr "در حال انتقال {{amountStr}} به صورت Top Up به کارت اعتباری {{cardLastNumber}}"
#: www/views/shapeshift.html:30
msgid "Start ShapeShift"
msgstr "راه اندازی ShapeShift"
#: www/views/shapeshift.html:30
msgid "Exchange your BTC to BCH in minutes."
msgstr "تبدیل BTC به BCH خود طرف چند دقیقه."
#: www/views/shapeshift.html:30
msgid "To start the process you need to add funds to your wallet."
msgstr "برای شروع فرایند باید به موجودی کیف پول خود اضافه کنید."
#: www/views/shapeshift.html:30
msgid "The process is fast and you will receive the exchanged amount in your wallet."
msgstr "فرایند سریع است و شما مقدار ارز تبدیل شده را در کیف پول خود دریافت خواهید کرد."
#: www/views/shapeshift.html:34
msgid "This service is provided by the third-party ShapeShift, who will charge a small fee for the service. The fee will be shown before you start the transaction."
msgstr "این سرویس توسط همکار ما ShapeShift به عنوان یک طرف سوم انجام می شود و هزینه ای اندک برای آن دریافت می کند. قبل از شروع تراکنش هزینه نشان داده می شود."
#: www/views/buyAmazon.html:61
#: www/views/buyMercadoLibre.html:60
#: www/views/modals/wallet-balance.html:23
@ -3773,171 +3636,3 @@ msgstr "{{updatingTxHistoryProgress}} تراکنش دانلود شد"
msgid "{{wallet.m}}-of-{{wallet.n}}"
msgstr "{{wallet.m}} از {{wallet.n}}"
#: src/js/services/shapeshiftService.js:8
msgid "Shapeshift"
msgstr "Shapeshift"
#: www/views/includes/community.html:3
msgid "Community"
msgstr "جامعه"
#: src/js/services/communityService.js:40
msgid "Bitcoin Cash Reddit"
msgstr "Bitcoin Cash Reddit"
#: src/js/services/communityService.js:47
msgid "Bitcoin.com Twitter"
msgstr "توییتر Bitcoin.com"
#: www/views/includes/nextSteps.html:3
msgid "Explore Bitcoin.com"
msgstr "کاوش Bitcoin.com"
#: src/js/services/bitcoincomService.js:21
msgid "Bitcoin Cash Games"
msgstr "Bitcoin Cash Games"
#: www/views/includes/community.html:29
msgid "Share the Wallet App"
msgstr "اشتراک گذاری نرم افزار کیف پول"
#: src/js/services/bitcoincomService.js:28
msgid "News"
msgstr "اخبار"
#: src/js/services/bitcoincomService.js:35
msgid "Mining Pool"
msgstr "استخر استخراج"
#: src/js/services/bitcoincomService.js:42
msgid "Tools"
msgstr "ابزارها"
#: src/js/services/bitcoincomService.js:49
msgid "Bitcoin Price Charts"
msgstr "نمودارهای قیمت بیت کوین"
#: src/js/services/bitcoincomService.js:56
msgid "Free Bitcoin Cash"
msgstr "رایگان Bitcoin Cash"
#: www/views/tab-home.html:30
msgid "Your Bitcoin Wallets are ready!"
msgstr "کیف پول بیت کوین شما آماده است!"
#: src/js/controllers/amount.js:49
msgid "Address does not contain currency information, please make sure you are sending the correct currency."
msgstr "آدرس شامل اطلاعات ارز نیست. از ارسال ارز صحیح اطمینان حاصل کنید."
#: www/views/review.html:4
msgid "Review Transaction"
msgstr "بررسی تراکنش"
#: src/js/controllers/review.controller.js:36
msgid "You are sending"
msgstr "مبلغ ارسالی به وسیله شما"
#: src/js/controllers/review.controller.js:66
msgid "You are shifting"
msgstr "مبلغ تبدیل شده"
#: www/views/review.html:36
msgid "To:"
msgstr "به:"
#: www/views/review.html:53
msgid "Add personal note"
msgstr "اضافه کردن یادداشت شخصی"
#: www/views/review.html:87
msgid "Suggested by merchant:"
msgstr "پیشنهاد شده توسط تاجر:"
#: src/js/controllers/review.controller.js:37
msgid "Enter text here"
msgstr "متن را اینجا وارد کنید"
#: www/views/review.html:57
msgid "Personal note:"
msgstr "یادداشت شخصی:"
#: www/views/review.html:69
msgid "Less than 1 cent"
msgstr "کمتر از 1 سنت"
#: src/js/services/incomingData.js:129
msgid "This invoice is no longer accepting payments"
msgstr "این صورت حساب دیگر پرداخت ها را نمی پذیرد"
#: www/views/amount.html.js:60
msgid "Send Maximum Amount"
msgstr "ارسال حداکثر مقدار"
#: src/js/controllers/amount.controller.js:239
msgid "Unknown error."
msgstr "خطای ناشناخته."
#: www/views/paperWallet.html:48
msgid "No Bitcoin Cash wallet to transfer funds to found."
msgstr "هیچ کیف پولی از نوع Bitcoin Cash برای انتقال وجه یافت نشد."
#: www/views/paperWallet.html:54
msgid "No Bitcoin Cash found."
msgstr "Bitcoin Cash یافت نشد."
#: www/views/paperWallet.html:60
msgid "Bitcoin Core found:"
msgstr "Bitcoin Core یافت شده:"
#: www/views/paperWallet.html:98
msgid "No Bitcoin Core wallet to transfer funds to found."
msgstr "هیچ کیف پولی از نوع Bitcoin Core برای انتقال وجه یافت نشد."
#: www/views/paperWallet.html:104
msgid "No Bitcoin Core found."
msgstr "Bitcoin Core یافت نشد."
#: src/js/controllers/tab-scan.js:120
msgid "Scan Failed"
msgstr "اسکن انجام نشد"
#: src/js/controllers/tab-scan.js:121
msgid "Data not recognised."
msgstr "داده ها شناسایی نشد."
#: src/js/controllers/tab-scan.js:121
msgid "Unsupported"
msgstr "پشتیبانی نشده"
#: src/js/controllers/tab-scan.js:121
msgid "Testnet is not supported."
msgstr "Testnet پشتیبانی نمی شود."
#: www/views/includes/incomingDataMenu.html:81
msgid "URL"
msgstr "آدرس"
#: www/views/includes/incomingDataMenu.html:90
msgid "Open in web browser"
msgstr "باز کردن در مرورگر"
#: src/js/services/shapeshift.service.js.html:90
msgid "Invalid address"
msgstr "آدرس نامعتبر"
#: src/js/services/shapeshift.service.js.html:90
msgid "Amount is not defined"
msgstr "مبلغ تعریف نشده است"
#: src/js/services/shapeshift.service.js.html:90
msgid "Amount is below the minimun"
msgstr "مقدار زیر مقدار حداقل است"
#: src/js/services/shapeshift.service.js.html:90
msgid "Amount is above the limit"
msgstr "مقدار بالاتر از حد است"
#: src/js/services/shapeshift.service.js.html:90
msgid "Invalid response from Shapeshift"
msgstr "پاسخ نامعتبر از Shapeshift"

View file

@ -11,7 +11,7 @@ msgstr ""
"Last-Translator: emilold\n"
"Language-Team: French\n"
"Language: fr\n"
"PO-Revision-Date: 2018-09-15 05:56\n"
"PO-Revision-Date: 2018-07-04 09:26\n"
#: www/views/modals/paypro.html:34
msgid "(Trusted)"
@ -79,27 +79,7 @@ msgstr "Numéro de compte"
#: www/views/tab-home.html:61
msgid "Instant transactions with low fees"
msgstr "Instant transactions with low fees"
#: www/views/walletSelector.html:49
msgid "Insufficient funds"
msgstr "Fonds insuffisants"
#: www/views/amount.html:42
msgid "Change Currency"
msgstr "Changer de devise"
#: www/views/amount.html:49
msgid "Available Funds"
msgstr "Fonds disponibles"
#: www/views/amount.html:59
msgid "Use All Available Funds"
msgstr "Utiliser tous les fonds disponibles"
#: www/views/amount.html:99
msgid "Next"
msgstr "Suivant"
msgstr "Transactions instantanées à bas frais"
#: www/views/preferencesBitpayServices.html:23
msgid "Accounts"
@ -226,20 +206,6 @@ msgstr "C'est presque terminé ! Vérifions."
msgid "Alternative Currency"
msgstr "Devise alternative"
#: www/views/tab-settings.html:75
msgid "Price Display"
msgstr "Affichage des prix"
#: src/js/controllers/tab-settings.js:19
#: www/views/preferencesPriceDisplay.html:12
msgid "Fiat"
msgstr "Fiat"
#: src/js/controllers/tab-settings.js:19
#: www/views/preferencesPriceDisplay.html:15
msgid "Cryptocurrency"
msgstr "Cryptocurrency"
#: src/js/controllers/buyAmazon.js:98
msgid "Amazon.com is not available at this moment. Please try back later."
msgstr "Amazon.com nest pas disponible pour le moment. Veuillez réessayer plus tard."
@ -471,7 +437,6 @@ msgid "Buy &amp; Sell Bitcoin"
msgstr "Acheter &amp; vendre des bitcoins"
#: www/views/tab-send.html:35
#: src/js/services/buyAndSellService.js:26
msgid "Buy Bitcoin"
msgstr "Acheter des bitcoins"
@ -520,8 +485,8 @@ msgid "Cannot Create Wallet"
msgstr "Impossible de créer le portefeuille"
#: src/js/services/profileService.js:442
msgid "Cannot join the same wallet more than once"
msgstr "Impossible de joindre le même portefeuille plus d'une fois"
msgid "Cannot join the same wallet more that once"
msgstr "Impossible de rejoindre le même portefeuille plus d'une fois"
#: www/views/includes/bitpayCardsCard.html:2
msgid "Cards"
@ -654,14 +619,10 @@ msgstr "Connexion à Glidera..."
msgid "Connection reset by peer"
msgstr "Connexion réinitialisée par un pair"
#: www/views/tab-send.html:85
#: www/views/tab-send.html:45
msgid "Contacts"
msgstr "Contacts"
#: www/views/tab-send.html:86
msgid "Saved frequently used addresses"
msgstr "Adresses fréquemment utilisées enregistrées"
#: www/views/onboarding/notifications.html:9
msgid "Continue"
msgstr "Continuer"
@ -696,7 +657,6 @@ msgstr "Copayeur {{$index}}"
#: src/js/controllers/copayers.js:79
#: src/js/controllers/export.js:193
#: src/js/controllers/confirm.js:41
#: www/views/includes/copyToClipboard.html:4
msgid "Copied to clipboard"
msgstr "Copié(e) dans le presse-papier"
@ -863,7 +823,7 @@ msgstr "Créer un portefeuille partagé"
#: www/views/onboarding/tour.html:51
#: www/views/tab-home.html:75
#: www/views/tab-send.html:75
#: www/views/tab-send.html:36
msgid "Create bitcoin wallet"
msgstr "Créer un portefeuille bitcoin"
@ -1033,7 +993,7 @@ msgstr "Autoriser les notifications"
#: www/views/preferencesNotifications.html:33
msgid "Enable sound"
msgstr "Malayu"
msgstr "Activer le son"
#: www/views/tab-scan.html:18
msgid "Enable the camera to get started."
@ -1316,7 +1276,6 @@ msgstr "À des fins de vérification"
#: www/views/modals/txp-details.html:74
#: www/views/topup.html:34
#: www/views/tx-details.html:52
#: www/views/review.html:22
msgid "From"
msgstr "De"
@ -1377,6 +1336,10 @@ msgid "Get news and updates from BitPay"
msgstr "Obtenir les actualités et mises à jour de BitPay"
#: www/views/onboarding/welcome.html:8
msgctxt "button"
msgid "Get started"
msgstr "Commencer"
#: www/views/bitpayCard.html:49
msgid "Get started"
msgstr "Commencez"
@ -2200,10 +2163,6 @@ msgstr "Paiement rejeté"
msgid "Payment Sent"
msgstr "Paiement envoyé"
#: www/views/includes/slideToAcceptSuccess.html:12
msgid "Share this transaction"
msgstr "Partager cette transaction"
#: www/views/modals/txp-details.html:32
msgid "Payment accepted, but not yet broadcasted"
msgstr "Paiement accepté, mais pas encore diffusé"
@ -2221,7 +2180,7 @@ msgid "Payment details"
msgstr "Détails du paiement"
#: www/views/modals/paypro.html:6
msgid "Payment Request"
msgid "Payment request"
msgstr "Demande de paiement"
#: www/views/mercadoLibreCards.html:22
@ -2574,14 +2533,6 @@ msgstr "Rechercher des transactions"
msgid "Search or enter bitcoin address"
msgstr "Recherchez ou saisissez une adresse bitcoin"
#: src/js/controllers/tab-send.js:28
msgid "Clipboard"
msgstr "Presse-papiers"
#: src/js/controllers/tab-send.js:29
msgid "Your Clipboard is empty"
msgstr "Votre presse-papiers est vide"
#: www/views/modals/search.html:16
msgid "Search transactions"
msgstr "Rechercher des transactions"
@ -2640,68 +2591,9 @@ msgid "Send by email"
msgstr "Envoyer par e-mail"
#: src/js/controllers/confirm.js:177
#: src/js/controllers/tab-send.js:94
msgid "Send from"
msgstr "Envoyer à partir de"
#: src/js/controllers/tab-send.js:77
msgid "Send to"
msgstr "Envoyer à"
#: www/views/tab-send.html:20
msgid "Paste Clipboard"
msgstr "Coller le contenu du presse-papiers"
#: www/views/tab-send.html:21
msgid "Paste Address"
msgstr "Coller l'adresse"
#: www/views/tab-send.html:27
msgid "Transfer between wallets"
msgstr "Transfert entre les portefeuilles"
#: www/views/tab-send.html:35
msgid "Scan QR Code"
msgstr "Numérisez le code QR"
#: www/views/tab-send.html:46
msgid "Send Bitcoin faster!"
msgstr "Envoyez des Bitcoin plus vite !"
#: www/views/tab-send.html:50
msgid "Save frequently used addresses and send them Bitcoin in just one tap"
msgstr "Enregistrez les adresses fréquemment utilisées et envoyez-leurs des Bitcoins en un seul geste"
#: www/views/tab-send.html:55
msgid "Add your first contact"
msgstr "Ajoutez votre premier contact"
#: www/views/tab-send.html:65
msgid "Your Bitcoin wallet is empty"
msgstr "Votre portefeuille Bitcoin est vide"
#: www/views/tab-send.html:69
msgid "To get started, buy Bitcoin Cash (BCH) or Bitcoin Core (BTC), or share your address."
msgstr "Pour commencer, achetez des Bitcoins Cash (BCH) ou des Bitcoins Core (BTC), ou partagez votre adresse."
#: www/views/tab-send.html:70
msgid "You can receive bitcoin from any wallet or service."
msgstr "Vous pouvez recevoir des Bitcoins de n'importe quel portefeuille ou service."
#: www/views/tab-send.html:72
#: www/views/shapeshift.html:23
#: www/views/tab-send.html:33
msgid "To get started, you'll need to create a bitcoin wallet and get some bitcoin."
msgstr "Pour commencer, vous aurez besoin de créer un portefeuille bitcoin et d'obtenir quelques bitcoins."
#: www/views/tab-send.html:74
msgid "Buy Bitcoin now"
msgstr "Acheter des Bitcoins maintenant"
#: www/views/tab-send.html:76
msgid "Show my address"
msgstr "Afficher mon adresse"
#: www/views/includes/itemSelector.html:8
msgid "Send max amount"
msgstr "Envoyer le montant maximal"
@ -2925,14 +2817,9 @@ msgid "Sweep"
msgstr "Balayer"
#: www/views/includes/incomingDataMenu.html:89
msgctxt "List item"
msgid "Sweep paper wallet"
msgstr "Balayer un portefeuille papier"
#: www/views/paperWallet.html:3
msgctxt "Page title"
msgid "Sweep Paper Wallet"
msgstr "Balayer un portefeuille papier"
msgid "Sweep paper wallet"
msgstr "Balayer un portefeuille de papier"
#: src/js/services/onGoingProcess.js:33
msgid "Sweeping Wallet..."
@ -3100,14 +2987,6 @@ msgstr "Cette appli conserve vos bitcoins avec une sécurité de pointe."
msgid "This bitcoin payment request has expired."
msgstr "Cette demande de paiement bitcoin a expiré."
#: www/views/review.html:55
msgid "Payment expires:"
msgstr "Expiration du paiement:"
#: www/views/review.html:56
msgid "Payment request has expired"
msgstr "La demande de paiement a expiré"
#: www/views/join.html:133
#: www/views/tab-create-personal.html:103
#: www/views/tab-create-shared.html:132
@ -3149,6 +3028,10 @@ msgstr "À"
msgid "To get started, buy bitcoin or share your address. You can receive bitcoin from any wallet or service."
msgstr "Pour commencer, achetez des bitcoins ou partagez votre adresse. Vous pouvez recevoir des bitcoins de n'importe quel portefeuille ou service."
#: www/views/tab-send.html:33
msgid "To get started, you'll need to create a bitcoin wallet and get some bitcoin."
msgstr "Pour commencer, vous aurez besoin de créer un portefeuille bitcoin et d'obtenir quelques bitcoins."
#: src/js/services/bitpayAccountService.js:73
msgid "To {{reason}} you must first add your BitPay account - {{email}}"
msgstr "Pour {{reason}} vous devez d'abord ajouter votre compte BitPay - {{email}}"
@ -3161,26 +3044,6 @@ msgstr "Rechargement en cours..."
msgid "Top up {{amountStr}} to debit card ({{cardLastNumber}})"
msgstr "Rechargement de {{amountStr}} vers la carte de débit ({{cardLastNumber}})"
#: www/views/shapeshift.html:30
msgid "Start ShapeShift"
msgstr "Démarrer ShapeShift"
#: www/views/shapeshift.html:30
msgid "Exchange your BTC to BCH in minutes."
msgstr "Changez vos BTC en BCH en quelques minutes."
#: www/views/shapeshift.html:30
msgid "To start the process you need to add funds to your wallet."
msgstr "Pour démarrer, vous devez ajouter des fonds à votre portefeuille."
#: www/views/shapeshift.html:30
msgid "The process is fast and you will receive the exchanged amount in your wallet."
msgstr "Le processus est rapide et vous recevrez le montant changé dans votre portefeuille."
#: www/views/shapeshift.html:34
msgid "This service is provided by the third-party ShapeShift, who will charge a small fee for the service. The fee will be shown before you start the transaction."
msgstr "Ce service est fourni par le tiers ShapeShift, qui facturera une somme modique pour le service. Le montant sera affiché avant de démarrer la transaction."
#: www/views/buyAmazon.html:61
#: www/views/buyMercadoLibre.html:60
#: www/views/modals/wallet-balance.html:23
@ -3773,171 +3636,3 @@ msgstr "{{updatingTxHistoryProgress}} transactions téléchargées"
msgid "{{wallet.m}}-of-{{wallet.n}}"
msgstr "{{wallet.m}}-sur-{{wallet.n}}"
#: src/js/services/shapeshiftService.js:8
msgid "Shapeshift"
msgstr "Shapeshift"
#: www/views/includes/community.html:3
msgid "Community"
msgstr "Communauté"
#: src/js/services/communityService.js:40
msgid "Bitcoin Cash Reddit"
msgstr "Reddit Bitcoin Cash"
#: src/js/services/communityService.js:47
msgid "Bitcoin.com Twitter"
msgstr "Twitter Bitcoin.com"
#: www/views/includes/nextSteps.html:3
msgid "Explore Bitcoin.com"
msgstr "Explorez Bitcoin.com"
#: src/js/services/bitcoincomService.js:21
msgid "Bitcoin Cash Games"
msgstr "Jeux Bitcoin Cash"
#: www/views/includes/community.html:29
msgid "Share the Wallet App"
msgstr "Partager lapplication Wallet"
#: src/js/services/bitcoincomService.js:28
msgid "News"
msgstr "Nouvelles"
#: src/js/services/bitcoincomService.js:35
msgid "Mining Pool"
msgstr "Coopératives de mineurs"
#: src/js/services/bitcoincomService.js:42
msgid "Tools"
msgstr "Outils"
#: src/js/services/bitcoincomService.js:49
msgid "Bitcoin Price Charts"
msgstr "Graphiques du prix du Bitcoin"
#: src/js/services/bitcoincomService.js:56
msgid "Free Bitcoin Cash"
msgstr "Bitcoin Cash Gratuit"
#: www/views/tab-home.html:30
msgid "Your Bitcoin Wallets are ready!"
msgstr "Vos portefeuilles bitcoin sont prêts !"
#: src/js/controllers/amount.js:49
msgid "Address does not contain currency information, please make sure you are sending the correct currency."
msgstr "L'adresse ne contient pas dinformations de devise, assurez-vous que vous envoyez la bonne devise."
#: www/views/review.html:4
msgid "Review Transaction"
msgstr "Vérifier la transaction"
#: src/js/controllers/review.controller.js:36
msgid "You are sending"
msgstr "Vous envoyez"
#: src/js/controllers/review.controller.js:66
msgid "You are shifting"
msgstr "Vous changez"
#: www/views/review.html:36
msgid "To:"
msgstr "À :"
#: www/views/review.html:53
msgid "Add personal note"
msgstr "Ajouter une note personnelle"
#: www/views/review.html:87
msgid "Suggested by merchant:"
msgstr "Suggéré par le marchand :"
#: src/js/controllers/review.controller.js:37
msgid "Enter text here"
msgstr "Entrez le texte ici"
#: www/views/review.html:57
msgid "Personal note:"
msgstr "Note personnelle :"
#: www/views/review.html:69
msgid "Less than 1 cent"
msgstr "Moins de 1 centime"
#: src/js/services/incomingData.js:129
msgid "This invoice is no longer accepting payments"
msgstr "Cette facture naccepte plus les paiements"
#: www/views/amount.html.js:60
msgid "Send Maximum Amount"
msgstr "Envoi du montant maximal"
#: src/js/controllers/amount.controller.js:239
msgid "Unknown error."
msgstr "Erreur inconnue."
#: www/views/paperWallet.html:48
msgid "No Bitcoin Cash wallet to transfer funds to found."
msgstr "Aucun portefeuille Bitcoin Cash auquel transférer des fonds trouvé."
#: www/views/paperWallet.html:54
msgid "No Bitcoin Cash found."
msgstr "Pas de Bitcoin Cash trouvé."
#: www/views/paperWallet.html:60
msgid "Bitcoin Core found:"
msgstr "Bitcoin Core trouvé :"
#: www/views/paperWallet.html:98
msgid "No Bitcoin Core wallet to transfer funds to found."
msgstr "Aucun portefeuille Bitcoin Core auquel transférer des fonds trouvé."
#: www/views/paperWallet.html:104
msgid "No Bitcoin Core found."
msgstr "Pas de Bitcoin Core trouvé."
#: src/js/controllers/tab-scan.js:120
msgid "Scan Failed"
msgstr "Échec de l'analyse"
#: src/js/controllers/tab-scan.js:121
msgid "Data not recognised."
msgstr "Données non reconnues."
#: src/js/controllers/tab-scan.js:121
msgid "Unsupported"
msgstr "Non pris en charge"
#: src/js/controllers/tab-scan.js:121
msgid "Testnet is not supported."
msgstr "Testnet nest pas pris en charge."
#: www/views/includes/incomingDataMenu.html:81
msgid "URL"
msgstr "URL"
#: www/views/includes/incomingDataMenu.html:90
msgid "Open in web browser"
msgstr "Ouvrir dans le navigateur web"
#: src/js/services/shapeshift.service.js.html:90
msgid "Invalid address"
msgstr "Adresse invalide"
#: src/js/services/shapeshift.service.js.html:90
msgid "Amount is not defined"
msgstr "Le montant nest pas défini"
#: src/js/services/shapeshift.service.js.html:90
msgid "Amount is below the minimun"
msgstr "Le montant est inférieur au minimum"
#: src/js/services/shapeshift.service.js.html:90
msgid "Amount is above the limit"
msgstr "Le montant est supérieur à la limite"
#: src/js/services/shapeshift.service.js.html:90
msgid "Invalid response from Shapeshift"
msgstr "Réponse de Shapeshift invalide"

View file

@ -11,7 +11,7 @@ msgstr ""
"Last-Translator: emilold\n"
"Language-Team: Italian\n"
"Language: it\n"
"PO-Revision-Date: 2018-09-15 05:56\n"
"PO-Revision-Date: 2018-07-04 09:27\n"
#: www/views/modals/paypro.html:34
msgid "(Trusted)"
@ -81,26 +81,6 @@ msgstr "Numero del Conto"
msgid "Instant transactions with low fees"
msgstr "Transazioni istantanee con commissioni basse"
#: www/views/walletSelector.html:49
msgid "Insufficient funds"
msgstr "Fondi insufficienti"
#: www/views/amount.html:42
msgid "Change Currency"
msgstr "Cambia valuta"
#: www/views/amount.html:49
msgid "Available Funds"
msgstr "Fondi disponibili"
#: www/views/amount.html:59
msgid "Use All Available Funds"
msgstr "Usa tutti i fondi disponibili"
#: www/views/amount.html:99
msgid "Next"
msgstr "Avanti"
#: www/views/preferencesBitpayServices.html:23
msgid "Accounts"
msgstr "Account"
@ -226,20 +206,6 @@ msgstr "Quasi finito! Ripassiamo."
msgid "Alternative Currency"
msgstr "Valuta alternativa"
#: www/views/tab-settings.html:75
msgid "Price Display"
msgstr "Visualizzazione prezzi"
#: src/js/controllers/tab-settings.js:19
#: www/views/preferencesPriceDisplay.html:12
msgid "Fiat"
msgstr "Fiat"
#: src/js/controllers/tab-settings.js:19
#: www/views/preferencesPriceDisplay.html:15
msgid "Cryptocurrency"
msgstr "Criptovaluta"
#: src/js/controllers/buyAmazon.js:98
msgid "Amazon.com is not available at this moment. Please try back later."
msgstr "Ia tabella dei guadagni di Amazon.com non è disponibile al momento. Per favore riprova piu tardi."
@ -471,7 +437,6 @@ msgid "Buy &amp; Sell Bitcoin"
msgstr "Comprare &amp; Vendere Bitcoin"
#: www/views/tab-send.html:35
#: src/js/services/buyAndSellService.js:26
msgid "Buy Bitcoin"
msgstr "Acquista Bitcoin"
@ -520,7 +485,7 @@ msgid "Cannot Create Wallet"
msgstr "Impossibile creare portafoglio"
#: src/js/services/profileService.js:442
msgid "Cannot join the same wallet more than once"
msgid "Cannot join the same wallet more that once"
msgstr "Non è possibile aggiungere un portafoglio più di una volta"
#: www/views/includes/bitpayCardsCard.html:2
@ -654,14 +619,10 @@ msgstr "Connessione a Glidera..."
msgid "Connection reset by peer"
msgstr "Connessione ripristinata dall'utente"
#: www/views/tab-send.html:85
#: www/views/tab-send.html:45
msgid "Contacts"
msgstr "Contatti"
#: www/views/tab-send.html:86
msgid "Saved frequently used addresses"
msgstr "Indirizzi più utilizzati salvati"
#: www/views/onboarding/notifications.html:9
msgid "Continue"
msgstr "Continua"
@ -696,7 +657,6 @@ msgstr "Pagatore {{$index}}"
#: src/js/controllers/copayers.js:79
#: src/js/controllers/export.js:193
#: src/js/controllers/confirm.js:41
#: www/views/includes/copyToClipboard.html:4
msgid "Copied to clipboard"
msgstr "Copiato negli appunti"
@ -863,7 +823,7 @@ msgstr "Creare portafoglio condiviso"
#: www/views/onboarding/tour.html:51
#: www/views/tab-home.html:75
#: www/views/tab-send.html:75
#: www/views/tab-send.html:36
msgid "Create bitcoin wallet"
msgstr "Creare portafoglio bitcoin"
@ -1316,7 +1276,6 @@ msgstr "Per finalità di controllo"
#: www/views/modals/txp-details.html:74
#: www/views/topup.html:34
#: www/views/tx-details.html:52
#: www/views/review.html:22
msgid "From"
msgstr "Da"
@ -1377,6 +1336,10 @@ msgid "Get news and updates from BitPay"
msgstr "Ricevi notizie e aggiornamenti da BitPay"
#: www/views/onboarding/welcome.html:8
msgctxt "button"
msgid "Get started"
msgstr "Per iniziare"
#: www/views/bitpayCard.html:49
msgid "Get started"
msgstr "Inizia"
@ -2200,10 +2163,6 @@ msgstr "Pagamento Rifiutato"
msgid "Payment Sent"
msgstr "Pagamento Inviato"
#: www/views/includes/slideToAcceptSuccess.html:12
msgid "Share this transaction"
msgstr "Condividi questa transazione"
#: www/views/modals/txp-details.html:32
msgid "Payment accepted, but not yet broadcasted"
msgstr "Pagamento accettato, ma non ancora inviata alla rete"
@ -2221,7 +2180,7 @@ msgid "Payment details"
msgstr "Dettagli pagamento"
#: www/views/modals/paypro.html:6
msgid "Payment Request"
msgid "Payment request"
msgstr "Richiesta di pagamento"
#: www/views/mercadoLibreCards.html:22
@ -2574,14 +2533,6 @@ msgstr "Cerca Transazioni"
msgid "Search or enter bitcoin address"
msgstr "Cerca o inserisci indirizzo bitcoin"
#: src/js/controllers/tab-send.js:28
msgid "Clipboard"
msgstr "Appunti"
#: src/js/controllers/tab-send.js:29
msgid "Your Clipboard is empty"
msgstr "Gli appunti sono vuoti"
#: www/views/modals/search.html:16
msgid "Search transactions"
msgstr "Ricerca transazioni"
@ -2640,68 +2591,9 @@ msgid "Send by email"
msgstr "Invia via email"
#: src/js/controllers/confirm.js:177
#: src/js/controllers/tab-send.js:94
msgid "Send from"
msgstr "Inviata Da"
#: src/js/controllers/tab-send.js:77
msgid "Send to"
msgstr "Invia a"
#: www/views/tab-send.html:20
msgid "Paste Clipboard"
msgstr "Incolla appunti"
#: www/views/tab-send.html:21
msgid "Paste Address"
msgstr "Incolla indirizzo"
#: www/views/tab-send.html:27
msgid "Transfer between wallets"
msgstr "Trasferisci tra portafogli"
#: www/views/tab-send.html:35
msgid "Scan QR Code"
msgstr "Scansiona codice QR"
#: www/views/tab-send.html:46
msgid "Send Bitcoin faster!"
msgstr "Invia Bitcoin più velocemente!"
#: www/views/tab-send.html:50
msgid "Save frequently used addresses and send them Bitcoin in just one tap"
msgstr "Salva gli indirizzi più utilizzati e invia Bitcoin con un solo tocco"
#: www/views/tab-send.html:55
msgid "Add your first contact"
msgstr "Aggiungi il tuo primo contatto"
#: www/views/tab-send.html:65
msgid "Your Bitcoin wallet is empty"
msgstr "Il tuo portafoglio Bitcoin è vuoto"
#: www/views/tab-send.html:69
msgid "To get started, buy Bitcoin Cash (BCH) or Bitcoin Core (BTC), or share your address."
msgstr "Per iniziare, acquista Bitcoin Cash (BCH) o Bitcoin Core (BTC), oppure condividi il tuo indirizzo."
#: www/views/tab-send.html:70
msgid "You can receive bitcoin from any wallet or service."
msgstr "Puoi ricevere Bitcoin da qualsiasi portafoglio o servizio."
#: www/views/tab-send.html:72
#: www/views/shapeshift.html:23
#: www/views/tab-send.html:33
msgid "To get started, you'll need to create a bitcoin wallet and get some bitcoin."
msgstr "Per iniziare, è necessario che tu crei un portafoglio bitcoin e ottenerne qualcuno."
#: www/views/tab-send.html:74
msgid "Buy Bitcoin now"
msgstr "Acquista subito Bitcoin"
#: www/views/tab-send.html:76
msgid "Show my address"
msgstr "Visualizza il mio indirizzo"
#: www/views/includes/itemSelector.html:8
msgid "Send max amount"
msgstr "Inviare l'importo massimo"
@ -2925,13 +2817,8 @@ msgid "Sweep"
msgstr "Spazzola"
#: www/views/includes/incomingDataMenu.html:89
msgctxt "List item"
msgid "Sweep paper wallet"
msgstr "Spazzare il portafoglio di carta"
#: www/views/paperWallet.html:3
msgctxt "Page title"
msgid "Sweep Paper Wallet"
msgid "Sweep paper wallet"
msgstr "Spazzare il portafoglio di carta"
#: src/js/services/onGoingProcess.js:33
@ -3100,14 +2987,6 @@ msgstr "Questa app memorizza i tuoi bitcoin con sicurezza all'avanguardia."
msgid "This bitcoin payment request has expired."
msgstr "Questa richiesta di pagamento in bitcoin è scaduta."
#: www/views/review.html:55
msgid "Payment expires:"
msgstr "Scadenza del pagamento:"
#: www/views/review.html:56
msgid "Payment request has expired"
msgstr "La richiesta di pagamento è scaduta"
#: www/views/join.html:133
#: www/views/tab-create-personal.html:103
#: www/views/tab-create-shared.html:132
@ -3149,6 +3028,10 @@ msgstr "A"
msgid "To get started, buy bitcoin or share your address. You can receive bitcoin from any wallet or service."
msgstr "Per iniziare, acquista bitcoin o condividi il tuo indirizzo. È possibile ricevere bitcoin da qualsiasi servizio o portafoglio."
#: www/views/tab-send.html:33
msgid "To get started, you'll need to create a bitcoin wallet and get some bitcoin."
msgstr "Per iniziare, è necessario che tu crei un portafoglio bitcoin e ottenerne qualcuno."
#: src/js/services/bitpayAccountService.js:73
msgid "To {{reason}} you must first add your BitPay account - {{email}}"
msgstr "Per {{reason}} è necessario innanzitutto aggiungere il tuo account BitPay - {{email}}"
@ -3161,26 +3044,6 @@ msgstr "Ricarica in corso..."
msgid "Top up {{amountStr}} to debit card ({{cardLastNumber}})"
msgstr "Ricaricare di {{amountStr}} sulla carta di debito ({{cardLastNumber}})"
#: www/views/shapeshift.html:30
msgid "Start ShapeShift"
msgstr "Avvia ShapeShift"
#: www/views/shapeshift.html:30
msgid "Exchange your BTC to BCH in minutes."
msgstr "Cambia i tuoi BTC in BCH in pochi minuti."
#: www/views/shapeshift.html:30
msgid "To start the process you need to add funds to your wallet."
msgstr "Per avviare il processo devi aggiungere fondi al tuo portafoglio."
#: www/views/shapeshift.html:30
msgid "The process is fast and you will receive the exchanged amount in your wallet."
msgstr "Il processo è veloce e riceverai l'importo cambiato nel tuo portafoglio."
#: www/views/shapeshift.html:34
msgid "This service is provided by the third-party ShapeShift, who will charge a small fee for the service. The fee will be shown before you start the transaction."
msgstr "Questo servizio è fornito dalla terza parte ShapeShift, che addebiterà una piccola commissione per lo stesso. La commissione sarà mostrata prima di iniziare la transazione."
#: www/views/buyAmazon.html:61
#: www/views/buyMercadoLibre.html:60
#: www/views/modals/wallet-balance.html:23
@ -3773,171 +3636,3 @@ msgstr "{{updatingTxHistoryProgress}} transazioni scaricate"
msgid "{{wallet.m}}-of-{{wallet.n}}"
msgstr "{{wallet.m}}-di-{{wallet.n}}"
#: src/js/services/shapeshiftService.js:8
msgid "Shapeshift"
msgstr "Shapeshift"
#: www/views/includes/community.html:3
msgid "Community"
msgstr "Community"
#: src/js/services/communityService.js:40
msgid "Bitcoin Cash Reddit"
msgstr "Bitcoin Cash su Reddit"
#: src/js/services/communityService.js:47
msgid "Bitcoin.com Twitter"
msgstr "Bitcoin.com su Twitter"
#: www/views/includes/nextSteps.html:3
msgid "Explore Bitcoin.com"
msgstr "Esplora Bitcoin.com"
#: src/js/services/bitcoincomService.js:21
msgid "Bitcoin Cash Games"
msgstr "Giochi Bitcoin Cash"
#: www/views/includes/community.html:29
msgid "Share the Wallet App"
msgstr "Condividere l'app Portafoglio"
#: src/js/services/bitcoincomService.js:28
msgid "News"
msgstr "News"
#: src/js/services/bitcoincomService.js:35
msgid "Mining Pool"
msgstr "Mining Pool"
#: src/js/services/bitcoincomService.js:42
msgid "Tools"
msgstr "Strumenti"
#: src/js/services/bitcoincomService.js:49
msgid "Bitcoin Price Charts"
msgstr "Tabella prezzi Bitcoin"
#: src/js/services/bitcoincomService.js:56
msgid "Free Bitcoin Cash"
msgstr "Bitcoin Cash gratis"
#: www/views/tab-home.html:30
msgid "Your Bitcoin Wallets are ready!"
msgstr "I tuoi portafogli Bitcoin sono pronti!"
#: src/js/controllers/amount.js:49
msgid "Address does not contain currency information, please make sure you are sending the correct currency."
msgstr "L'indirizzo non contiene informazioni sulla valuta. Verifica di inviare la valuta corretta."
#: www/views/review.html:4
msgid "Review Transaction"
msgstr "Rivedi transazione"
#: src/js/controllers/review.controller.js:36
msgid "You are sending"
msgstr "Stai inviando"
#: src/js/controllers/review.controller.js:66
msgid "You are shifting"
msgstr "Stai spostando"
#: www/views/review.html:36
msgid "To:"
msgstr "A:"
#: www/views/review.html:53
msgid "Add personal note"
msgstr "Aggiungi nota personale"
#: www/views/review.html:87
msgid "Suggested by merchant:"
msgstr "Suggerito dal commerciante:"
#: src/js/controllers/review.controller.js:37
msgid "Enter text here"
msgstr "Inserisci il testo qui"
#: www/views/review.html:57
msgid "Personal note:"
msgstr "Nota personale:"
#: www/views/review.html:69
msgid "Less than 1 cent"
msgstr "Meno di 1 centesimo"
#: src/js/services/incomingData.js:129
msgid "This invoice is no longer accepting payments"
msgstr "Questa fattura non accetta più pagamenti"
#: www/views/amount.html.js:60
msgid "Send Maximum Amount"
msgstr "Inviare importo massimo"
#: src/js/controllers/amount.controller.js:239
msgid "Unknown error."
msgstr "Errore sconosciuto."
#: www/views/paperWallet.html:48
msgid "No Bitcoin Cash wallet to transfer funds to found."
msgstr "Nessun portafoglio Bitcoin Cash trovato per il trasferimento di fondi."
#: www/views/paperWallet.html:54
msgid "No Bitcoin Cash found."
msgstr "Nessun Bitcoin Cash trovato."
#: www/views/paperWallet.html:60
msgid "Bitcoin Core found:"
msgstr "Bitcoin Core trovato:"
#: www/views/paperWallet.html:98
msgid "No Bitcoin Core wallet to transfer funds to found."
msgstr "Nessun portafoglio Bitcoin Core trovato per il trasferimento di fondi."
#: www/views/paperWallet.html:104
msgid "No Bitcoin Core found."
msgstr "Nessun Bitcoin Core trovato."
#: src/js/controllers/tab-scan.js:120
msgid "Scan Failed"
msgstr "Scansione non riuscita"
#: src/js/controllers/tab-scan.js:121
msgid "Data not recognised."
msgstr "Dati non riconosciuti."
#: src/js/controllers/tab-scan.js:121
msgid "Unsupported"
msgstr "Non supportato"
#: src/js/controllers/tab-scan.js:121
msgid "Testnet is not supported."
msgstr "Testnet non supportato."
#: www/views/includes/incomingDataMenu.html:81
msgid "URL"
msgstr "URL"
#: www/views/includes/incomingDataMenu.html:90
msgid "Open in web browser"
msgstr "Aprire nel browser web"
#: src/js/services/shapeshift.service.js.html:90
msgid "Invalid address"
msgstr "Indirizzo non valido"
#: src/js/services/shapeshift.service.js.html:90
msgid "Amount is not defined"
msgstr "Importo non definito"
#: src/js/services/shapeshift.service.js.html:90
msgid "Amount is below the minimun"
msgstr "Importo inferiore al minimo"
#: src/js/services/shapeshift.service.js.html:90
msgid "Amount is above the limit"
msgstr "Importo sopra il limite"
#: src/js/services/shapeshift.service.js.html:90
msgid "Invalid response from Shapeshift"
msgstr "Risposta non valida da Shapeshift"

View file

@ -11,7 +11,7 @@ msgstr ""
"Last-Translator: emilold\n"
"Language-Team: Japanese\n"
"Language: ja\n"
"PO-Revision-Date: 2018-09-15 05:56\n"
"PO-Revision-Date: 2018-07-04 09:27\n"
#: www/views/modals/paypro.html:34
msgid "(Trusted)"
@ -81,26 +81,6 @@ msgstr "ポケット番号"
msgid "Instant transactions with low fees"
msgstr "僅かな手数料で即時決済"
#: www/views/walletSelector.html:49
msgid "Insufficient funds"
msgstr "残高不足"
#: www/views/amount.html:42
msgid "Change Currency"
msgstr "通貨を変更"
#: www/views/amount.html:49
msgid "Available Funds"
msgstr "利用可能な残高"
#: www/views/amount.html:59
msgid "Use All Available Funds"
msgstr "利用可能な資金をすべて使用"
#: www/views/amount.html:99
msgid "Next"
msgstr "次"
#: www/views/preferencesBitpayServices.html:23
msgid "Accounts"
msgstr "アカウント一覧"
@ -226,20 +206,6 @@ msgstr "ほぼ完了!確認してみましょう。"
msgid "Alternative Currency"
msgstr "表示通貨"
#: www/views/tab-settings.html:75
msgid "Price Display"
msgstr "価格表示"
#: src/js/controllers/tab-settings.js:19
#: www/views/preferencesPriceDisplay.html:12
msgid "Fiat"
msgstr "法定通貨"
#: src/js/controllers/tab-settings.js:19
#: www/views/preferencesPriceDisplay.html:15
msgid "Cryptocurrency"
msgstr "仮想通貨"
#: src/js/controllers/buyAmazon.js:98
msgid "Amazon.com is not available at this moment. Please try back later."
msgstr "Amazon.com は現在ご利用できません、また後でお試しください"
@ -440,7 +406,7 @@ msgstr "ビットコインは世界で<br>最も安全な仮想通貨。"
#: www/views/preferencesFee.html:11
msgid "Bitcoin transactions include a fee collected by miners on the network."
msgstr "ビットコインの取引はネットワークの安全を守る「採掘者」と呼ばれる達に送る手数料が含まれます。"
msgstr "ビットコインの取引はネットワークの安全を守る「採掘者」と呼ばれる達に送る手数料が含まれます。"
#: www/views/buyAmazon.html:108
msgid "Bought {{amountUnitStr}}"
@ -473,7 +439,6 @@ msgid "Buy &amp; Sell Bitcoin"
msgstr "ビットコインの購入&amp;売却"
#: www/views/tab-send.html:35
#: src/js/services/buyAndSellService.js:26
msgid "Buy Bitcoin"
msgstr "ビットコインを購入"
@ -522,8 +487,8 @@ msgid "Cannot Create Wallet"
msgstr "ウォレットを作成できません。"
#: src/js/services/profileService.js:442
msgid "Cannot join the same wallet more than once"
msgstr "同じ端末で同じウォレットに複数回参加することできません。"
msgid "Cannot join the same wallet more that once"
msgstr "同じ端末で同じウォレットに複数回参加することできません。"
#: www/views/includes/bitpayCardsCard.html:2
msgid "Cards"
@ -656,14 +621,10 @@ msgstr "Glidera に接続中…"
msgid "Connection reset by peer"
msgstr "接続がピアによってリセットされました"
#: www/views/tab-send.html:85
#: www/views/tab-send.html:45
msgid "Contacts"
msgstr "連絡先"
#: www/views/tab-send.html:86
msgid "Saved frequently used addresses"
msgstr "よく使う保存済みのアドレス"
#: www/views/onboarding/notifications.html:9
msgid "Continue"
msgstr "続ける"
@ -698,7 +659,6 @@ msgstr "ウォレット参加者 {{$index}}"
#: src/js/controllers/copayers.js:79
#: src/js/controllers/export.js:193
#: src/js/controllers/confirm.js:41
#: www/views/includes/copyToClipboard.html:4
msgid "Copied to clipboard"
msgstr "クリップボードにコピーしました"
@ -865,7 +825,7 @@ msgstr "共有ウォレットを作成"
#: www/views/onboarding/tour.html:51
#: www/views/tab-home.html:75
#: www/views/tab-send.html:75
#: www/views/tab-send.html:36
msgid "Create bitcoin wallet"
msgstr "ビットコインウォレット作成"
@ -1035,7 +995,7 @@ msgstr "プッシュ通知を有効化"
#: www/views/preferencesNotifications.html:33
msgid "Enable sound"
msgstr "サウンドを有効にする"
msgstr "を有効にする"
#: www/views/tab-scan.html:18
msgid "Enable the camera to get started."
@ -1318,7 +1278,6 @@ msgstr "監査用機能"
#: www/views/modals/txp-details.html:74
#: www/views/topup.html:34
#: www/views/tx-details.html:52
#: www/views/review.html:22
msgid "From"
msgstr "送信者"
@ -1379,13 +1338,17 @@ msgid "Get news and updates from BitPay"
msgstr "BitPay からのニュースや更新情報を受け取ります。"
#: www/views/onboarding/welcome.html:8
msgctxt "button"
msgid "Get started"
msgstr "始めよう"
#: www/views/bitpayCard.html:49
msgid "Get started"
msgstr "始めよう"
#: www/views/addressbook.html:20
msgid "Get started by adding your first one."
msgstr "連絡先を追加しましょう。"
msgstr "初めての連絡先を追加しましょう。"
#: src/js/services/onGoingProcess.js:23
msgid "Getting fee levels..."
@ -1910,7 +1873,7 @@ msgstr "バックアップは非常に重要です!"
#: www/views/addressbook.html:19
msgid "No contacts yet"
msgstr "連絡先はありません"
msgstr "連絡先が無い"
#: www/views/preferencesLogs.html:16
msgid "No entries for this log level"
@ -2043,7 +2006,7 @@ msgstr "今一度周りの環境をよく見てみましょう。隠しカメラ
#: src/js/services/popupService.js:72
#: www/views/modals/chooseFeeLevel.html:6
msgid "OK"
msgstr "OK"
msgstr "わかりました"
#: www/views/modals/tx-status.html:12
#: www/views/modals/tx-status.html:24
@ -2202,10 +2165,6 @@ msgstr "送金が却下されました"
msgid "Payment Sent"
msgstr "送金が完了しました"
#: www/views/includes/slideToAcceptSuccess.html:12
msgid "Share this transaction"
msgstr "このトランザクションを共有"
#: www/views/modals/txp-details.html:32
msgid "Payment accepted, but not yet broadcasted"
msgstr "取引が承認されましたが、まだ送信していません。"
@ -2223,8 +2182,8 @@ msgid "Payment details"
msgstr "支払いの詳細"
#: www/views/modals/paypro.html:6
msgid "Payment Request"
msgstr "支払いを要求する"
msgid "Payment request"
msgstr "支払い請求"
#: www/views/mercadoLibreCards.html:22
#: www/views/modals/mercadolibre-card-details.html:39
@ -2576,14 +2535,6 @@ msgstr "取引を検索"
msgid "Search or enter bitcoin address"
msgstr "連絡先検索かビットコインアドレスを指定"
#: src/js/controllers/tab-send.js:28
msgid "Clipboard"
msgstr "クリップボード"
#: src/js/controllers/tab-send.js:29
msgid "Your Clipboard is empty"
msgstr "クリップボードは空です"
#: www/views/modals/search.html:16
msgid "Search transactions"
msgstr "取引を検索"
@ -2642,68 +2593,9 @@ msgid "Send by email"
msgstr "メールで送信"
#: src/js/controllers/confirm.js:177
#: src/js/controllers/tab-send.js:94
msgid "Send from"
msgstr "ここから送金"
#: src/js/controllers/tab-send.js:77
msgid "Send to"
msgstr "送金先:"
#: www/views/tab-send.html:20
msgid "Paste Clipboard"
msgstr "クリップボードからペースト"
#: www/views/tab-send.html:21
msgid "Paste Address"
msgstr "アドレスをペースト"
#: www/views/tab-send.html:27
msgid "Transfer between wallets"
msgstr "ウォレット間送金"
#: www/views/tab-send.html:35
msgid "Scan QR Code"
msgstr "QRコードを読み取る"
#: www/views/tab-send.html:46
msgid "Send Bitcoin faster!"
msgstr "ビットコイン送金をより高速に!"
#: www/views/tab-send.html:50
msgid "Save frequently used addresses and send them Bitcoin in just one tap"
msgstr "よく使うアドレスを保存すればワンタップでビットコインを送金できます"
#: www/views/tab-send.html:55
msgid "Add your first contact"
msgstr "最初の連絡先を追加"
#: www/views/tab-send.html:65
msgid "Your Bitcoin wallet is empty"
msgstr "ビットコインウォレットが空です"
#: www/views/tab-send.html:69
msgid "To get started, buy Bitcoin Cash (BCH) or Bitcoin Core (BTC), or share your address."
msgstr "始めるには、Bitcoin Cash (BCH) または Bitcoin Core (BTC) を購入するか、あなたのアドレスを共有してください。"
#: www/views/tab-send.html:70
msgid "You can receive bitcoin from any wallet or service."
msgstr "どのウォレットやサービスからでもビットコインを受け取ることができます。"
#: www/views/tab-send.html:72
#: www/views/shapeshift.html:23
#: www/views/tab-send.html:33
msgid "To get started, you'll need to create a bitcoin wallet and get some bitcoin."
msgstr "はじめに、ビットコインウォレットを作成し、ビットコインを入手する必要があります。"
#: www/views/tab-send.html:74
msgid "Buy Bitcoin now"
msgstr "今すぐビットコインを購入"
#: www/views/tab-send.html:76
msgid "Show my address"
msgstr "自分のアドレスを表示"
#: www/views/includes/itemSelector.html:8
msgid "Send max amount"
msgstr "全残高を送金"
@ -2929,13 +2821,8 @@ msgid "Sweep"
msgstr "全残高インポート"
#: www/views/includes/incomingDataMenu.html:89
msgctxt "List item"
msgid "Sweep paper wallet"
msgstr "ペーパーウォレットの全残高インポート"
#: www/views/paperWallet.html:3
msgctxt "Page title"
msgid "Sweep Paper Wallet"
msgid "Sweep paper wallet"
msgstr "ペーパーウォレットの全残高インポート"
#: src/js/services/onGoingProcess.js:33
@ -3106,14 +2993,6 @@ msgstr "このアプリは、最先端のセキュリティであなたのビッ
msgid "This bitcoin payment request has expired."
msgstr "ビットコインペイメントの請求期限が切れています。"
#: www/views/review.html:55
msgid "Payment expires:"
msgstr "支払い請求の有効期限:"
#: www/views/review.html:56
msgid "Payment request has expired"
msgstr "支払い要求の期限が切れています"
#: www/views/join.html:133
#: www/views/tab-create-personal.html:103
#: www/views/tab-create-shared.html:132
@ -3155,6 +3034,10 @@ msgstr "宛先"
msgid "To get started, buy bitcoin or share your address. You can receive bitcoin from any wallet or service."
msgstr "はじめるには、ビットコインを購入したり、アドレスを他の人に共有したりしましょう。どのビットコインウォレットやサービスから受け取れます。"
#: www/views/tab-send.html:33
msgid "To get started, you'll need to create a bitcoin wallet and get some bitcoin."
msgstr "はじめに、ビットコインウォレットを作成し、ビットコインを入手する必要があります。"
#: src/js/services/bitpayAccountService.js:73
msgid "To {{reason}} you must first add your BitPay account - {{email}}"
msgstr "{{reason}}その前にBitPayアカウントを追加する必要があります - {{email}}"
@ -3167,26 +3050,6 @@ msgstr "残高補充処理中..."
msgid "Top up {{amountStr}} to debit card ({{cardLastNumber}})"
msgstr "デビットカード ({{cardLastNumber}}) に {{amountStr}} の入金を行う"
#: www/views/shapeshift.html:30
msgid "Start ShapeShift"
msgstr "ShapeShiftを開始"
#: www/views/shapeshift.html:30
msgid "Exchange your BTC to BCH in minutes."
msgstr "数分でBTCをBCHに変換できます。"
#: www/views/shapeshift.html:30
msgid "To start the process you need to add funds to your wallet."
msgstr "処理を開始するには、資金をウォレットに追加する必要があります。"
#: www/views/shapeshift.html:30
msgid "The process is fast and you will receive the exchanged amount in your wallet."
msgstr "処理は高速で、交換した金額がウォレットに届きます。"
#: www/views/shapeshift.html:34
msgid "This service is provided by the third-party ShapeShift, who will charge a small fee for the service. The fee will be shown before you start the transaction."
msgstr "このサービスは、少額のサービス手数料を請求する第三者組織である ShapeShift によって提供されています。手数料は取引を開始する前に表示されます。"
#: www/views/buyAmazon.html:61
#: www/views/buyMercadoLibre.html:60
#: www/views/modals/wallet-balance.html:23
@ -3587,7 +3450,7 @@ msgstr "送金発生時のメール通知はどのメールアドレスで受け
#: www/views/addresses.html:19
msgid "Why?"
msgstr "なぜですか"
msgstr "なぜ?"
#: www/views/feedback/rateApp.html:10
msgid "Would you be willing to rate {{appName}} in the app store?"
@ -3779,171 +3642,3 @@ msgstr "{{updatingTxHistoryProgress}} 個の取引ダウンロード済み"
msgid "{{wallet.m}}-of-{{wallet.n}}"
msgstr "{{wallet.m}} の{{wallet.n}}"
#: src/js/services/shapeshiftService.js:8
msgid "Shapeshift"
msgstr "Shapeshift"
#: www/views/includes/community.html:3
msgid "Community"
msgstr "コミュニティ"
#: src/js/services/communityService.js:40
msgid "Bitcoin Cash Reddit"
msgstr "Bitcoin Cash Reddit"
#: src/js/services/communityService.js:47
msgid "Bitcoin.com Twitter"
msgstr "Bitcoin.com Twitter"
#: www/views/includes/nextSteps.html:3
msgid "Explore Bitcoin.com"
msgstr "Bitcoin.com を参照"
#: src/js/services/bitcoincomService.js:21
msgid "Bitcoin Cash Games"
msgstr "Bitcoin Cash ゲーム"
#: www/views/includes/community.html:29
msgid "Share the Wallet App"
msgstr "ウォレットアプリを共有"
#: src/js/services/bitcoincomService.js:28
msgid "News"
msgstr "ニュース"
#: src/js/services/bitcoincomService.js:35
msgid "Mining Pool"
msgstr "マイニングプール"
#: src/js/services/bitcoincomService.js:42
msgid "Tools"
msgstr "ツール"
#: src/js/services/bitcoincomService.js:49
msgid "Bitcoin Price Charts"
msgstr "ビットコインの価格チャート"
#: src/js/services/bitcoincomService.js:56
msgid "Free Bitcoin Cash"
msgstr "無料 Bitcoin Cash"
#: www/views/tab-home.html:30
msgid "Your Bitcoin Wallets are ready!"
msgstr "ビットコインウォレットが完成しました!"
#: src/js/controllers/amount.js:49
msgid "Address does not contain currency information, please make sure you are sending the correct currency."
msgstr "アドレスに通貨情報が含まれていません。正しい通貨を送金していることを確認してください。"
#: www/views/review.html:4
msgid "Review Transaction"
msgstr "トランザクションの確認"
#: src/js/controllers/review.controller.js:36
msgid "You are sending"
msgstr "送金中: "
#: src/js/controllers/review.controller.js:66
msgid "You are shifting"
msgstr "取引中: "
#: www/views/review.html:36
msgid "To:"
msgstr "宛先:"
#: www/views/review.html:53
msgid "Add personal note"
msgstr "個人用メモを追加"
#: www/views/review.html:87
msgid "Suggested by merchant:"
msgstr "お店からのおすすめ:"
#: src/js/controllers/review.controller.js:37
msgid "Enter text here"
msgstr "ここにテキストを入力してください"
#: www/views/review.html:57
msgid "Personal note:"
msgstr "個人用メモ:"
#: www/views/review.html:69
msgid "Less than 1 cent"
msgstr "1セント以下"
#: src/js/services/incomingData.js:129
msgid "This invoice is no longer accepting payments"
msgstr "この請求書はもう支払を受け付けていません"
#: www/views/amount.html.js:60
msgid "Send Maximum Amount"
msgstr "全残高を送金"
#: src/js/controllers/amount.controller.js:239
msgid "Unknown error."
msgstr "不明なエラーです。"
#: www/views/paperWallet.html:48
msgid "No Bitcoin Cash wallet to transfer funds to found."
msgstr "資金を送金できるビットコインキャッシュウォレットが見つかりません。"
#: www/views/paperWallet.html:54
msgid "No Bitcoin Cash found."
msgstr "ビットコインキャッシュが見つかりません。"
#: www/views/paperWallet.html:60
msgid "Bitcoin Core found:"
msgstr "ビットコインが見つかりました:"
#: www/views/paperWallet.html:98
msgid "No Bitcoin Core wallet to transfer funds to found."
msgstr "資金を送金できるビットコインウォレットが見つかりません。"
#: www/views/paperWallet.html:104
msgid "No Bitcoin Core found."
msgstr "ビットコインが見つかりません。"
#: src/js/controllers/tab-scan.js:120
msgid "Scan Failed"
msgstr "スキャンできませんでした"
#: src/js/controllers/tab-scan.js:121
msgid "Data not recognised."
msgstr "データが認識されていません。"
#: src/js/controllers/tab-scan.js:121
msgid "Unsupported"
msgstr "未対応"
#: src/js/controllers/tab-scan.js:121
msgid "Testnet is not supported."
msgstr "Testnet には対応していません。"
#: www/views/includes/incomingDataMenu.html:81
msgid "URL"
msgstr "URL"
#: www/views/includes/incomingDataMenu.html:90
msgid "Open in web browser"
msgstr "ウェブブラウザで開く"
#: src/js/services/shapeshift.service.js.html:90
msgid "Invalid address"
msgstr "無効なアドレス"
#: src/js/services/shapeshift.service.js.html:90
msgid "Amount is not defined"
msgstr "金額が定義されていません"
#: src/js/services/shapeshift.service.js.html:90
msgid "Amount is below the minimun"
msgstr "金額が最少額を下回っています"
#: src/js/services/shapeshift.service.js.html:90
msgid "Amount is above the limit"
msgstr "金額が上限を超えています"
#: src/js/services/shapeshift.service.js.html:90
msgid "Invalid response from Shapeshift"
msgstr "Shapeshift から無効な応答がありました"

View file

@ -11,7 +11,7 @@ msgstr ""
"Last-Translator: emilold\n"
"Language-Team: Korean\n"
"Language: ko\n"
"PO-Revision-Date: 2018-09-15 05:56\n"
"PO-Revision-Date: 2018-07-04 09:27\n"
#: www/views/modals/paypro.html:34
msgid "(Trusted)"
@ -81,26 +81,6 @@ msgstr "계정 번호"
msgid "Instant transactions with low fees"
msgstr "낮은 수수료로 빠른 송금을"
#: www/views/walletSelector.html:49
msgid "Insufficient funds"
msgstr "펀드 부족"
#: www/views/amount.html:42
msgid "Change Currency"
msgstr "통화 변경"
#: www/views/amount.html:49
msgid "Available Funds"
msgstr "보유 펀드"
#: www/views/amount.html:59
msgid "Use All Available Funds"
msgstr "전체 펀드 사용"
#: www/views/amount.html:99
msgid "Next"
msgstr "다음"
#: www/views/preferencesBitpayServices.html:23
msgid "Accounts"
msgstr "계정들"
@ -226,20 +206,6 @@ msgstr "거의 끝났습니다! 복습해보도록 하겠습니다."
msgid "Alternative Currency"
msgstr "알트 코인"
#: www/views/tab-settings.html:75
msgid "Price Display"
msgstr "가격 표시"
#: src/js/controllers/tab-settings.js:19
#: www/views/preferencesPriceDisplay.html:12
msgid "Fiat"
msgstr "법정 화폐"
#: src/js/controllers/tab-settings.js:19
#: www/views/preferencesPriceDisplay.html:15
msgid "Cryptocurrency"
msgstr "가상 화폐"
#: src/js/controllers/buyAmazon.js:98
msgid "Amazon.com is not available at this moment. Please try back later."
msgstr "아마존에 접속할 수 없습니다. 다시 시도해주세요."
@ -471,7 +437,6 @@ msgid "Buy &amp; Sell Bitcoin"
msgstr "비트코인 구매 &amp; 판매"
#: www/views/tab-send.html:35
#: src/js/services/buyAndSellService.js:26
msgid "Buy Bitcoin"
msgstr "비트코인 구매"
@ -520,7 +485,7 @@ msgid "Cannot Create Wallet"
msgstr "지갑을 생성할 수 없습니다"
#: src/js/services/profileService.js:442
msgid "Cannot join the same wallet more than once"
msgid "Cannot join the same wallet more that once"
msgstr "같은 지갑에 한 번 이상 접속할 수 없습니다"
#: www/views/includes/bitpayCardsCard.html:2
@ -654,14 +619,10 @@ msgstr "Glidera에 연결 중..."
msgid "Connection reset by peer"
msgstr "연결 실패"
#: www/views/tab-send.html:85
#: www/views/tab-send.html:45
msgid "Contacts"
msgstr "연락처"
#: www/views/tab-send.html:86
msgid "Saved frequently used addresses"
msgstr "자주 사용하는 저장된 주소"
#: www/views/onboarding/notifications.html:9
msgid "Continue"
msgstr "계속하기"
@ -696,7 +657,6 @@ msgstr "공동지불인 {{$index}}"
#: src/js/controllers/copayers.js:79
#: src/js/controllers/export.js:193
#: src/js/controllers/confirm.js:41
#: www/views/includes/copyToClipboard.html:4
msgid "Copied to clipboard"
msgstr "클립보드에 복사 완료"
@ -863,7 +823,7 @@ msgstr "공유 지갑 만들기"
#: www/views/onboarding/tour.html:51
#: www/views/tab-home.html:75
#: www/views/tab-send.html:75
#: www/views/tab-send.html:36
msgid "Create bitcoin wallet"
msgstr "비트코인 지갑 만들기"
@ -1316,7 +1276,6 @@ msgstr "계좌 검토 용도"
#: www/views/modals/txp-details.html:74
#: www/views/topup.html:34
#: www/views/tx-details.html:52
#: www/views/review.html:22
msgid "From"
msgstr "출처"
@ -1377,6 +1336,10 @@ msgid "Get news and updates from BitPay"
msgstr "BitPay에서 최신 소식을 받아보세요"
#: www/views/onboarding/welcome.html:8
msgctxt "button"
msgid "Get started"
msgstr "시작하기"
#: www/views/bitpayCard.html:49
msgid "Get started"
msgstr "시작하기"
@ -2200,10 +2163,6 @@ msgstr "송금 거부"
msgid "Payment Sent"
msgstr "송금 완료"
#: www/views/includes/slideToAcceptSuccess.html:12
msgid "Share this transaction"
msgstr "거래 공유"
#: www/views/modals/txp-details.html:32
msgid "Payment accepted, but not yet broadcasted"
msgstr "송금을 수락했으나 아직 브로드캐스트되지 않았습니다"
@ -2221,7 +2180,7 @@ msgid "Payment details"
msgstr "결제 디테일"
#: www/views/modals/paypro.html:6
msgid "Payment Request"
msgid "Payment request"
msgstr "결제 요구"
#: www/views/mercadoLibreCards.html:22
@ -2574,14 +2533,6 @@ msgstr "거래 기록 검색하기"
msgid "Search or enter bitcoin address"
msgstr "비트코인 주소를 찾거나 작성"
#: src/js/controllers/tab-send.js:28
msgid "Clipboard"
msgstr "클립보드"
#: src/js/controllers/tab-send.js:29
msgid "Your Clipboard is empty"
msgstr "클립보드가 비어 있습니다"
#: www/views/modals/search.html:16
msgid "Search transactions"
msgstr "거래 기록 검색"
@ -2640,68 +2591,9 @@ msgid "Send by email"
msgstr "이메일로 보내기"
#: src/js/controllers/confirm.js:177
#: src/js/controllers/tab-send.js:94
msgid "Send from"
msgstr "출처"
#: src/js/controllers/tab-send.js:77
msgid "Send to"
msgstr "보내기"
#: www/views/tab-send.html:20
msgid "Paste Clipboard"
msgstr "클립보드 붙여넣기"
#: www/views/tab-send.html:21
msgid "Paste Address"
msgstr "주소 붙여넣기"
#: www/views/tab-send.html:27
msgid "Transfer between wallets"
msgstr "지갑 간 전송"
#: www/views/tab-send.html:35
msgid "Scan QR Code"
msgstr "QR 코드 스캔"
#: www/views/tab-send.html:46
msgid "Send Bitcoin faster!"
msgstr "비트코인 속성 전송!"
#: www/views/tab-send.html:50
msgid "Save frequently used addresses and send them Bitcoin in just one tap"
msgstr "자주 사용하는 주소를 저장하고 한 번의 탭으로 저장된 주소에 비트코인 전송"
#: www/views/tab-send.html:55
msgid "Add your first contact"
msgstr "첫 번째 연락처 추가"
#: www/views/tab-send.html:65
msgid "Your Bitcoin wallet is empty"
msgstr "비트코인 지갑이 비어 있습니다"
#: www/views/tab-send.html:69
msgid "To get started, buy Bitcoin Cash (BCH) or Bitcoin Core (BTC), or share your address."
msgstr "시작하려면 비트코인 캐시(BCH) 또는 비트코인 코어(BTC)를 구매하거나 주소를 공유합니다."
#: www/views/tab-send.html:70
msgid "You can receive bitcoin from any wallet or service."
msgstr "지갑 또는 서비스에서 비트코인을 받을 수 있습니다."
#: www/views/tab-send.html:72
#: www/views/shapeshift.html:23
#: www/views/tab-send.html:33
msgid "To get started, you'll need to create a bitcoin wallet and get some bitcoin."
msgstr "시작하시기 위해선 비트코인 지갑을 생성하시거나 비트코인을 구매하세요."
#: www/views/tab-send.html:74
msgid "Buy Bitcoin now"
msgstr "지금 비트코인 구매"
#: www/views/tab-send.html:76
msgid "Show my address"
msgstr "내 주소 보기"
#: www/views/includes/itemSelector.html:8
msgid "Send max amount"
msgstr "최대 수량 보내기"
@ -2925,13 +2817,8 @@ msgid "Sweep"
msgstr "스윕하기"
#: www/views/includes/incomingDataMenu.html:89
msgctxt "List item"
msgid "Sweep paper wallet"
msgstr "종이 지갑 스윕하기"
#: www/views/paperWallet.html:3
msgctxt "Page title"
msgid "Sweep Paper Wallet"
msgid "Sweep paper wallet"
msgstr "종이 지갑 스윕하기"
#: src/js/services/onGoingProcess.js:33
@ -3100,14 +2987,6 @@ msgstr "이 앱은 귀하의 비트코인을 최첨단 보안 서비스로 보
msgid "This bitcoin payment request has expired."
msgstr "비트코인 결제 요구가 만료되었습니다."
#: www/views/review.html:55
msgid "Payment expires:"
msgstr "송금 만료:"
#: www/views/review.html:56
msgid "Payment request has expired"
msgstr "결제 요청 만료"
#: www/views/join.html:133
#: www/views/tab-create-personal.html:103
#: www/views/tab-create-shared.html:132
@ -3149,6 +3028,10 @@ msgstr "보내는 대상"
msgid "To get started, buy bitcoin or share your address. You can receive bitcoin from any wallet or service."
msgstr "시작하시려면 비트코인을 구매하시거나 주소를 등록해주세요. 어디에서든 비트코인을 받을 수 있습니다."
#: www/views/tab-send.html:33
msgid "To get started, you'll need to create a bitcoin wallet and get some bitcoin."
msgstr "시작하시기 위해선 비트코인 지갑을 생성하시거나 비트코인을 구매하세요."
#: src/js/services/bitpayAccountService.js:73
msgid "To {{reason}} you must first add your BitPay account - {{email}}"
msgstr "{{reason}}하기 위해선 BitPay 계정 - {{email}}을 먼저 추가하셔야 합니다."
@ -3161,26 +3044,6 @@ msgstr "추가 지불(Top up) 진행 중..."
msgid "Top up {{amountStr}} to debit card ({{cardLastNumber}})"
msgstr "체크 카드 ({{cardLastNumber}})에 {{amountStr}} 추가 지불(Top up)하기"
#: www/views/shapeshift.html:30
msgid "Start ShapeShift"
msgstr "ShapeShift 시작"
#: www/views/shapeshift.html:30
msgid "Exchange your BTC to BCH in minutes."
msgstr "BTC를 몇 분 내에 BCH로 교환"
#: www/views/shapeshift.html:30
msgid "To start the process you need to add funds to your wallet."
msgstr "과정을 시작하려면 월릿에 펀드를 적립해야 합니다."
#: www/views/shapeshift.html:30
msgid "The process is fast and you will receive the exchanged amount in your wallet."
msgstr "과정은 빠르며 월릿에 교환 금액이 전송됩니다."
#: www/views/shapeshift.html:34
msgid "This service is provided by the third-party ShapeShift, who will charge a small fee for the service. The fee will be shown before you start the transaction."
msgstr "제3자 회사 Shapeshift는 소액의 수수료를 받고 서비스를 제공합니다. 수수료 금액은 거래 시작 전에 표시됩니다."
#: www/views/buyAmazon.html:61
#: www/views/buyMercadoLibre.html:60
#: www/views/modals/wallet-balance.html:23
@ -3773,171 +3636,3 @@ msgstr "{{updatingTxHistoryProgress}} 거래 내역 다운로드 완료"
msgid "{{wallet.m}}-of-{{wallet.n}}"
msgstr "{{wallet.n}}의 {{wallet.m}}"
#: src/js/services/shapeshiftService.js:8
msgid "Shapeshift"
msgstr "Shapeshift"
#: www/views/includes/community.html:3
msgid "Community"
msgstr "커뮤니티"
#: src/js/services/communityService.js:40
msgid "Bitcoin Cash Reddit"
msgstr "BCH Reddit"
#: src/js/services/communityService.js:47
msgid "Bitcoin.com Twitter"
msgstr "Bitcoin.com 트위터"
#: www/views/includes/nextSteps.html:3
msgid "Explore Bitcoin.com"
msgstr "Bitcoin.com 탐색"
#: src/js/services/bitcoincomService.js:21
msgid "Bitcoin Cash Games"
msgstr "BCH 게임"
#: www/views/includes/community.html:29
msgid "Share the Wallet App"
msgstr "지갑 응용 프로그램 공유"
#: src/js/services/bitcoincomService.js:28
msgid "News"
msgstr "소식"
#: src/js/services/bitcoincomService.js:35
msgid "Mining Pool"
msgstr "채굴 풀"
#: src/js/services/bitcoincomService.js:42
msgid "Tools"
msgstr "도구"
#: src/js/services/bitcoincomService.js:49
msgid "Bitcoin Price Charts"
msgstr "비트코인 가격 차트"
#: src/js/services/bitcoincomService.js:56
msgid "Free Bitcoin Cash"
msgstr "무료 BCH"
#: www/views/tab-home.html:30
msgid "Your Bitcoin Wallets are ready!"
msgstr "비트코인 지갑이 완료되었습니다!"
#: src/js/controllers/amount.js:49
msgid "Address does not contain currency information, please make sure you are sending the correct currency."
msgstr "주소는 통화 정보를 포함하지 않으므로, 전송 금액을 확인해야 합니다."
#: www/views/review.html:4
msgid "Review Transaction"
msgstr "거래 확인"
#: src/js/controllers/review.controller.js:36
msgid "You are sending"
msgstr "전송"
#: src/js/controllers/review.controller.js:66
msgid "You are shifting"
msgstr "전환"
#: www/views/review.html:36
msgid "To:"
msgstr "대상:"
#: www/views/review.html:53
msgid "Add personal note"
msgstr "개인 메모 작성"
#: www/views/review.html:87
msgid "Suggested by merchant:"
msgstr "회사/업소 제안:"
#: src/js/controllers/review.controller.js:37
msgid "Enter text here"
msgstr "텍스트 입력"
#: www/views/review.html:57
msgid "Personal note:"
msgstr "개인 메모:"
#: www/views/review.html:69
msgid "Less than 1 cent"
msgstr "1센트 미만"
#: src/js/services/incomingData.js:129
msgid "This invoice is no longer accepting payments"
msgstr "이 청구서는 더 이상 결제를 수락하지 않습니다"
#: www/views/amount.html.js:60
msgid "Send Maximum Amount"
msgstr "최대 수량 보내는 중"
#: src/js/controllers/amount.controller.js:239
msgid "Unknown error."
msgstr "알 수 없는 오류가 발생 했습니다."
#: www/views/paperWallet.html:48
msgid "No Bitcoin Cash wallet to transfer funds to found."
msgstr "자금 찾을 없습니다 Bitcoin Cash 현금 지갑."
#: www/views/paperWallet.html:54
msgid "No Bitcoin Cash found."
msgstr "찾을 수 없습니다 Bitcoin Cash 현금."
#: www/views/paperWallet.html:60
msgid "Bitcoin Core found:"
msgstr "Bitcoin Core 코어 발견:"
#: www/views/paperWallet.html:98
msgid "No Bitcoin Core wallet to transfer funds to found."
msgstr "자금 찾을 없습니다 Bitcoin Core 현금 지갑."
#: www/views/paperWallet.html:104
msgid "No Bitcoin Core found."
msgstr "찾을 수 없습니다 Bitcoin Core 현금."
#: src/js/controllers/tab-scan.js:120
msgid "Scan Failed"
msgstr "검색 실패"
#: src/js/controllers/tab-scan.js:121
msgid "Data not recognised."
msgstr "데이터 인식 되지입니다."
#: src/js/controllers/tab-scan.js:121
msgid "Unsupported"
msgstr "지원 되지 않는"
#: src/js/controllers/tab-scan.js:121
msgid "Testnet is not supported."
msgstr "Testnet는 지원 되지 않습니다."
#: www/views/includes/incomingDataMenu.html:81
msgid "URL"
msgstr "URL"
#: www/views/includes/incomingDataMenu.html:90
msgid "Open in web browser"
msgstr "웹 브라우저에서 열기"
#: src/js/services/shapeshift.service.js.html:90
msgid "Invalid address"
msgstr "주소 오류"
#: src/js/services/shapeshift.service.js.html:90
msgid "Amount is not defined"
msgstr "금액은 정의 되지 않은"
#: src/js/services/shapeshift.service.js.html:90
msgid "Amount is below the minimun"
msgstr "Minimun 아래 금액은"
#: src/js/services/shapeshift.service.js.html:90
msgid "Amount is above the limit"
msgstr "제한 위에 금액은"
#: src/js/services/shapeshift.service.js.html:90
msgid "Invalid response from Shapeshift"
msgstr "변신에서 잘못 된 응답"

File diff suppressed because it is too large Load diff

View file

@ -11,7 +11,7 @@ msgstr ""
"Last-Translator: emilold\n"
"Language-Team: Polish\n"
"Language: pl\n"
"PO-Revision-Date: 2018-09-15 05:56\n"
"PO-Revision-Date: 2018-07-04 03:58\n"
#: www/views/modals/paypro.html:34
msgid "(Trusted)"
@ -79,27 +79,7 @@ msgstr "Numer konta"
#: www/views/tab-home.html:61
msgid "Instant transactions with low fees"
msgstr "Natychmiastowe transakcje z niskimi prowizjami"
#: www/views/walletSelector.html:49
msgid "Insufficient funds"
msgstr "Niewystarczające środki"
#: www/views/amount.html:42
msgid "Change Currency"
msgstr "Zmień walutę"
#: www/views/amount.html:49
msgid "Available Funds"
msgstr "Dostępne środki"
#: www/views/amount.html:59
msgid "Use All Available Funds"
msgstr "Użyj wszystkich dostępnych środków"
#: www/views/amount.html:99
msgid "Next"
msgstr "Dalej"
msgstr ""
#: www/views/preferencesBitpayServices.html:23
msgid "Accounts"
@ -226,20 +206,6 @@ msgstr "Prawie gotowe! Dokonajmy przeglądu."
msgid "Alternative Currency"
msgstr "Alternatywna waluta"
#: www/views/tab-settings.html:75
msgid "Price Display"
msgstr "Wyświetlanie ceny"
#: src/js/controllers/tab-settings.js:19
#: www/views/preferencesPriceDisplay.html:12
msgid "Fiat"
msgstr "Fiat"
#: src/js/controllers/tab-settings.js:19
#: www/views/preferencesPriceDisplay.html:15
msgid "Cryptocurrency"
msgstr "Kryptowaluta"
#: src/js/controllers/buyAmazon.js:98
msgid "Amazon.com is not available at this moment. Please try back later."
msgstr "Amazon.com jest aktualnie niedostępny. Spróbuj później."
@ -397,12 +363,12 @@ msgstr "Adres bitcoin"
#: www/views/cashScan.html:4
msgid "Bitcoin Cash (BCH) Balances"
msgstr "Salda Bitcoin Cash (BCH)"
msgstr ""
#: www/views/preferencesCash.html:3
#: www/views/tab-settings.html:47
msgid "Bitcoin Cash Support"
msgstr "Wsparcie Bitcoin Cash"
msgstr ""
#: www/views/tab-home.html:98
#: www/views/tab-settings.html:115
@ -418,7 +384,7 @@ msgstr "Polityka prowizji sieci bitcoin"
#: www/views/tab-home.html:83
#: www/views/tab-settings.html:107
msgid "Bitcoin Core Wallets"
msgstr "Portfele Bitcoin Core"
msgstr ""
#: src/js/services/incomingData.js:151
msgid "Bitcoin cash Payment"
@ -471,7 +437,6 @@ msgid "Buy &amp; Sell Bitcoin"
msgstr "Kup &amp; sprzedaj bitcoiny"
#: www/views/tab-send.html:35
#: src/js/services/buyAndSellService.js:26
msgid "Buy Bitcoin"
msgstr "Kup bitcoiny"
@ -520,7 +485,7 @@ msgid "Cannot Create Wallet"
msgstr "Nie można utworzyć portfela"
#: src/js/services/profileService.js:442
msgid "Cannot join the same wallet more than once"
msgid "Cannot join the same wallet more that once"
msgstr "Nie można dołączyć tego samego portfela więcej niż raz"
#: www/views/includes/bitpayCardsCard.html:2
@ -654,14 +619,10 @@ msgstr "Łączenie z Gildera..."
msgid "Connection reset by peer"
msgstr "Połączenie zostało zresetowane"
#: www/views/tab-send.html:85
#: www/views/tab-send.html:45
msgid "Contacts"
msgstr "Kontakty"
#: www/views/tab-send.html:86
msgid "Saved frequently used addresses"
msgstr "Zapisane często używane adresy"
#: www/views/onboarding/notifications.html:9
msgid "Continue"
msgstr "Dalej"
@ -696,7 +657,6 @@ msgstr "Współwłaściciele {{$index}}"
#: src/js/controllers/copayers.js:79
#: src/js/controllers/export.js:193
#: src/js/controllers/confirm.js:41
#: www/views/includes/copyToClipboard.html:4
msgid "Copied to clipboard"
msgstr "Skopiowano do schowka"
@ -863,7 +823,7 @@ msgstr "Utwórz współdzielony portfel"
#: www/views/onboarding/tour.html:51
#: www/views/tab-home.html:75
#: www/views/tab-send.html:75
#: www/views/tab-send.html:36
msgid "Create bitcoin wallet"
msgstr "Utwórz portfel bitcoin"
@ -1017,7 +977,7 @@ msgstr "Puste adresy osiągnęły limit. Nowe adresy nie mogą być generowane."
#: www/views/preferencesCash.html:17
msgid "Enable Bitcoin Cash wallet creation and operation within the App."
msgstr "Włącz tworzenie i obsługę portfela Bitcoin Cash w aplikacji."
msgstr ""
#: www/views/tab-scan.html:19
msgid "Enable camera access in your device settings to get started."
@ -1033,7 +993,7 @@ msgstr "Włącz powiadomienia"
#: www/views/preferencesNotifications.html:33
msgid "Enable sound"
msgstr "Włącz dźwięk"
msgstr ""
#: www/views/tab-scan.html:18
msgid "Enable the camera to get started."
@ -1041,7 +1001,7 @@ msgstr "Włącz kamerę aby rozpocząć."
#: www/views/tab-settings.html:49
msgid "Enabled"
msgstr "Włączono"
msgstr ""
#: src/js/services/walletService.js:1047
#: src/js/services/walletService.js:1062
@ -1316,7 +1276,6 @@ msgstr "Do celów audytu"
#: www/views/modals/txp-details.html:74
#: www/views/topup.html:34
#: www/views/tx-details.html:52
#: www/views/review.html:22
msgid "From"
msgstr "Z"
@ -1377,6 +1336,10 @@ msgid "Get news and updates from BitPay"
msgstr "Otrzymywanie wiadomości i aktualizacji z BitPay"
#: www/views/onboarding/welcome.html:8
msgctxt "button"
msgid "Get started"
msgstr "Pierwsze kroki"
#: www/views/bitpayCard.html:49
msgid "Get started"
msgstr "Zacznij"
@ -1623,7 +1586,7 @@ msgstr "Nieprawidłowy adres"
#: src/js/controllers/confirm.js:306
#: src/js/services/bwcError.js:44
msgid "Insufficient confirmed funds"
msgstr "Niewystarczające potwierdzone środki"
msgstr ""
#: src/js/controllers/topup.js:165
#: src/js/controllers/topup.js:177
@ -1968,7 +1931,7 @@ msgstr "Nie BIP44 portfel"
#: www/views/cashScan.html:46
msgid "Non eligible BTC wallets"
msgstr "Niewspierane portfele BTC"
msgstr ""
#: src/js/services/feeService.js:12
msgid "Normal"
@ -2041,7 +2004,7 @@ msgstr "Nadszedł czas, aby sprawdzić swoje otoczenie. Czy jesteś w pobliżu o
#: src/js/services/popupService.js:72
#: www/views/modals/chooseFeeLevel.html:6
msgid "OK"
msgstr "OK"
msgstr ""
#: www/views/modals/tx-status.html:12
#: www/views/modals/tx-status.html:24
@ -2060,7 +2023,7 @@ msgstr "O nie!"
#: src/js/controllers/buyMercadoLibre.js:306
msgid "Ok"
msgstr "Ok"
msgstr ""
#: www/views/tab-home.html:39
msgid "On this screen you can see all your wallets, accounts, and assets."
@ -2090,7 +2053,7 @@ msgstr "Otwórz projekt GitHub"
#: src/js/controllers/bitpayCard.js:123
#: src/js/controllers/tx-details.js:192
msgid "Open Explorer"
msgstr "Otwórz Explorer"
msgstr ""
#: www/views/tab-scan.html:22
msgid "Open Settings"
@ -2106,7 +2069,7 @@ msgstr "Otwórz stronę internetową"
#: src/js/controllers/preferencesCash.js:32
msgid "Open bitcoincash.org?"
msgstr "Otworzyć bitcoincash.org?"
msgstr ""
#: src/js/controllers/cashScan.js:18
msgid "Open the recovery tool."
@ -2200,10 +2163,6 @@ msgstr "Wypłata odrzucona"
msgid "Payment Sent"
msgstr "Płatność wysłana"
#: www/views/includes/slideToAcceptSuccess.html:12
msgid "Share this transaction"
msgstr "Udostępnij tę transakcję"
#: www/views/modals/txp-details.html:32
msgid "Payment accepted, but not yet broadcasted"
msgstr "Wypłata zaakceptowana, ale jeszcze nie nadana"
@ -2221,7 +2180,7 @@ msgid "Payment details"
msgstr "Szczegóły wypłaty"
#: www/views/modals/paypro.html:6
msgid "Payment Request"
msgid "Payment request"
msgstr "Wniosek o płatność"
#: www/views/mercadoLibreCards.html:22
@ -2281,7 +2240,7 @@ msgstr "Proszę wybrać plik kopii zapasowej"
#: www/views/bitpayCard.html:81
msgid "Pre-Auth Holds"
msgstr "Wstrzymanie przedautoryzacyjne"
msgstr ""
#: www/views/tab-settings.html:40
msgid "Preferences"
@ -2394,7 +2353,7 @@ msgstr "Otrzymaj"
#: www/views/customAmount.html:44
msgid "Receive in"
msgstr "Otrzymaj w"
msgstr ""
#: www/views/includes/walletHistory.html:24
#: www/views/tx-details.html:18
@ -2552,7 +2511,7 @@ msgstr "Proszę zeskanować linie papilarne"
#: www/views/preferencesCash.html:23
msgid "Scan your wallets for Bitcoin Cash"
msgstr "Skanuj portfele w poszukiwaniu Bitcoin Cash"
msgstr ""
#: src/js/services/onGoingProcess.js:30
msgid "Scanning Wallet funds..."
@ -2574,14 +2533,6 @@ msgstr "Szukaj transakcji"
msgid "Search or enter bitcoin address"
msgstr "Wyszukaj lub wpisz adres bitcoin"
#: src/js/controllers/tab-send.js:28
msgid "Clipboard"
msgstr "Schowek"
#: src/js/controllers/tab-send.js:29
msgid "Your Clipboard is empty"
msgstr "Schowek jest pusty"
#: www/views/modals/search.html:16
msgid "Search transactions"
msgstr "Szukaj transakcji"
@ -2640,68 +2591,9 @@ msgid "Send by email"
msgstr "Wyślij przez e-mail"
#: src/js/controllers/confirm.js:177
#: src/js/controllers/tab-send.js:94
msgid "Send from"
msgstr "Wyślij z"
#: src/js/controllers/tab-send.js:77
msgid "Send to"
msgstr "Wyślij do"
#: www/views/tab-send.html:20
msgid "Paste Clipboard"
msgstr "Wklej ze schowka"
#: www/views/tab-send.html:21
msgid "Paste Address"
msgstr "Wklej adres"
#: www/views/tab-send.html:27
msgid "Transfer between wallets"
msgstr "Transfer między portfelami"
#: www/views/tab-send.html:35
msgid "Scan QR Code"
msgstr "Zeskanuj kod QR"
#: www/views/tab-send.html:46
msgid "Send Bitcoin faster!"
msgstr "Przesyłaj Bitcoiny szybciej!"
#: www/views/tab-send.html:50
msgid "Save frequently used addresses and send them Bitcoin in just one tap"
msgstr "Zapisz często używane adresy i wyślij im Bitcoin za pomocą jednego dotknięcia"
#: www/views/tab-send.html:55
msgid "Add your first contact"
msgstr "Dodaj swój pierwszy kontakt"
#: www/views/tab-send.html:65
msgid "Your Bitcoin wallet is empty"
msgstr "Twój portfel jest pusty"
#: www/views/tab-send.html:69
msgid "To get started, buy Bitcoin Cash (BCH) or Bitcoin Core (BTC), or share your address."
msgstr "Aby zacząć, kup Bitcoin Cash (BCH) lub Bitcoin Core (BTC), albo udostępnij swój adres."
#: www/views/tab-send.html:70
msgid "You can receive bitcoin from any wallet or service."
msgstr "Bitcoiny można odbierać z dowolnego portfela lub usługi."
#: www/views/tab-send.html:72
#: www/views/shapeshift.html:23
#: www/views/tab-send.html:33
msgid "To get started, you'll need to create a bitcoin wallet and get some bitcoin."
msgstr "Aby rozpocząć należy utworzyć portfel i dostać trochę bitcoinów."
#: www/views/tab-send.html:74
msgid "Buy Bitcoin now"
msgstr "Kup Bitcoin teraz"
#: www/views/tab-send.html:76
msgid "Show my address"
msgstr "Pokaż mój adres"
#: www/views/includes/itemSelector.html:8
msgid "Send max amount"
msgstr "Wyślij całą kwotę"
@ -2872,7 +2764,7 @@ msgstr "Przesuń, aby wysłać"
#: www/views/cashScan.html:56
msgid "Some of your wallets are not eligible for Bitcoin Cash support. You can try to access BCH funds from these wallets using the"
msgstr "Niektóre z twoich portfeli nie kwalifikują się do wsparcia Bitcoin Cash. Dostęp do środków BCH z tych portfeli można spróbować uzyskać, korzystając z"
msgstr ""
#: src/js/controllers/create.js:88
#: src/js/controllers/join.js:71
@ -2893,7 +2785,7 @@ msgstr "Wymagane hasło wypłat"
#: www/views/walletDetails.html:173
msgid "Spending this balance will need significant Bitcoin network fees"
msgstr "Wydanie tego salda będzie wymagało znacznych opłat sieciowych Bitcoin"
msgstr ""
#: www/views/tab-send.html:28
msgid "Start sending bitcoin"
@ -2918,20 +2810,15 @@ msgstr "Super Ekonomiczna"
#: www/views/preferencesCash.html:11
msgid "Support Bitcoin Cash"
msgstr "Wsparcie Bitcoin Cash"
msgstr ""
#: www/views/paperWallet.html:7
msgid "Sweep"
msgstr "Opróżnij"
#: www/views/includes/incomingDataMenu.html:89
msgctxt "List item"
msgid "Sweep paper wallet"
msgstr "Wyczyść papierowy portfel"
#: www/views/paperWallet.html:3
msgctxt "Page title"
msgid "Sweep Paper Wallet"
msgid "Sweep paper wallet"
msgstr "Wyczyść papierowy portfel"
#: src/js/services/onGoingProcess.js:33
@ -2973,7 +2860,7 @@ msgstr "Warunki użytkowania"
#: www/views/tab-create-personal.html:118
#: www/views/tab-import-phrase.html:68
msgid "Testnet"
msgstr "Testnet"
msgstr ""
#: www/views/includes/incomingDataMenu.html:61
msgid "Text"
@ -3100,14 +2987,6 @@ msgstr "Ta aplikacja przechowuje Twoje bitcoiny z zaawansowanymi zabezpieczeniam
msgid "This bitcoin payment request has expired."
msgstr "Ten wniosek płatności wygasł."
#: www/views/review.html:55
msgid "Payment expires:"
msgstr "Płatność wygasa:"
#: www/views/review.html:56
msgid "Payment request has expired"
msgstr "Wniosek o płatność wygasł"
#: www/views/join.html:133
#: www/views/tab-create-personal.html:103
#: www/views/tab-create-shared.html:132
@ -3120,7 +2999,7 @@ msgstr "Ta kluczowa fraza został utworzona przy użyciu hasła. Aby odzyskać p
#: www/views/tx-details.html:91
msgid "This transaction amount is too small compared to current Bitcoin network fees. Spending these funds will need a Bitcoin network fee cost comparable to the funds itself."
msgstr "Ta kwota transakcji jest zbyt mała w porównaniu z obecnymi opłatami sieci Bitcoin. Wydanie tych środków będzie wymagało opłaty sieciowej Bitcoin, która jest porównywalna do kosztów samych funduszy."
msgstr ""
#: www/views/tx-details.html:87
msgid "This transaction could take a long time to confirm or could be dropped due to the low fees set by the sender"
@ -3149,37 +3028,21 @@ msgstr "Do"
msgid "To get started, buy bitcoin or share your address. You can receive bitcoin from any wallet or service."
msgstr "Aby zacząć, kup bitcoiny lub udostępnij swój adres. Możesz otrzymać bitcoiny z dowolnego portfela lub usługi."
#: www/views/tab-send.html:33
msgid "To get started, you'll need to create a bitcoin wallet and get some bitcoin."
msgstr "Aby rozpocząć należy utworzyć portfel i dostać trochę bitcoinów."
#: src/js/services/bitpayAccountService.js:73
msgid "To {{reason}} you must first add your BitPay account - {{email}}"
msgstr "Aby móc wykonać czynność {{reason}}, musisz przedtem dodać swoje konto BitPay {{email}}"
msgstr ""
#: src/js/services/onGoingProcess.js:48
msgid "Top up in progress..."
msgstr "Doładowanie w trakcie..."
msgstr ""
#: src/js/controllers/topup.js:206
msgid "Top up {{amountStr}} to debit card ({{cardLastNumber}})"
msgstr "Doładuj o {{amountStr}} kartę debetową ({{cardLastNumber}})"
#: www/views/shapeshift.html:30
msgid "Start ShapeShift"
msgstr "Rozpocznij ShapeShift"
#: www/views/shapeshift.html:30
msgid "Exchange your BTC to BCH in minutes."
msgstr "Wymień BTC na BCH w ciągu paru chwil."
#: www/views/shapeshift.html:30
msgid "To start the process you need to add funds to your wallet."
msgstr "Aby zacząć, dodaj środki do portfela."
#: www/views/shapeshift.html:30
msgid "The process is fast and you will receive the exchanged amount in your wallet."
msgstr "Proces jest szybki, a użytkownik otrzyma wymienione środki do portfela."
#: www/views/shapeshift.html:34
msgid "This service is provided by the third-party ShapeShift, who will charge a small fee for the service. The fee will be shown before you start the transaction."
msgstr "Ta usługa jest świadczona przez podmiot zewnętrzny ShapeShift, który naliczy za nią niewielką opłatę. Będzie ona widoczna przed rozpoczęciem transakcji."
msgstr ""
#: www/views/buyAmazon.html:61
#: www/views/buyMercadoLibre.html:60
@ -3198,7 +3061,7 @@ msgstr "Liczba współwłaścicieli portfela"
#: www/views/addresses.html:81
msgid "Total wallet inputs"
msgstr "Dane wejściowe portfela łącznie"
msgstr ""
#: src/js/services/fingerprintService.js:63
#: src/js/services/fingerprintService.js:68
@ -3337,7 +3200,7 @@ msgstr "Zobacz zasady użytkowania"
#: src/js/controllers/bitpayCard.js:122
#: src/js/controllers/tx-details.js:191
msgid "View Transaction on Explorer.Bitcoin.com"
msgstr "Zobacz transakcję na Explorer.Bitcoin.com"
msgstr ""
#: src/js/controllers/tab-home.js:148
msgid "View Update"
@ -3349,7 +3212,7 @@ msgstr "Zobacz na blockchainie"
#: www/views/mercadoLibre.html:26
msgid "Visit mercadolivre.com.br &rarr;"
msgstr "Odwiedź mercadolivre.com.br &rarr;"
msgstr ""
#: www/views/walletDetails.html:182
msgid "WARNING: Key derivation is not working on this device/wallet. Actions cannot be performed on this wallet."
@ -3411,7 +3274,7 @@ msgstr "Informacje o portfelu"
#: www/views/addresses.html:76
msgid "Wallet Inputs"
msgstr "Dane wejściowe portfela"
msgstr ""
#: www/views/join.html:26
msgid "Wallet Invitation"
@ -3465,7 +3328,7 @@ msgstr "Portfel już istnieje"
#: src/js/services/profileService.js:516
msgid "Wallet already in {{appName}}"
msgstr "Portfel już w aplikacji {{appName}}"
msgstr ""
#: www/views/includes/walletActivity.html:6
msgid "Wallet created"
@ -3645,7 +3508,7 @@ msgstr "Nie należy ustawiać opłatę wyższą niż {{maxFeeRecommended}} satos
#: www/views/modals/bitpay-card-confirmation.html:5
msgid "You will need to log back for fill in your BitPay Card."
msgstr "Musisz zalogować się ponownie, aby wypełnić swoją kartę BitPay."
msgstr ""
#: www/views/preferencesNotifications.html:34
msgid "You'll receive email notifications about payments sent and received from your wallets."
@ -3717,7 +3580,7 @@ msgstr "[Balans ukryty]"
#: www/views/walletDetails.html:141
#: www/views/walletDetails.html:61
msgid "[Scanning Funds]"
msgstr "[Skanowanie środków]"
msgstr ""
#: src/js/controllers/bitpayCardIntro.js:11
msgid "add your BitPay Visa card(s)"
@ -3749,7 +3612,7 @@ msgstr "{{amountStr}} dla karty upominkowej Amazon.com"
#: src/js/controllers/buyMercadoLibre.js:237
msgid "{{amountStr}} for Mercado Livre Brazil Gift Card"
msgstr "{{amountStr}} na karcie podarunkowej Mercado Livre Brazil"
msgstr ""
#: www/views/preferencesBwsUrl.html:21
msgid "{{appName}} depends on Bitcore Wallet Service (BWS) for blockchain information, networking and Copayer synchronization. The default configuration points to https://bws.bitpay.com (BitPay's public BWS instance)."
@ -3761,7 +3624,7 @@ msgstr "{{fee}} zostanie potrącone jako prowizja sieci bitcoin."
#: www/views/confirm.html:85
msgid "{{tx.txp[wallet.id].feeRatePerStr}} of the sending amount"
msgstr "{{tx.txp[wallet.id].feeRatePerStr}} wysyłanej kwoty"
msgstr ""
#: www/views/walletDetails.html:218
msgid "{{updatingTxHistoryProgress}} transactions downloaded"
@ -3773,171 +3636,3 @@ msgstr "{{updatingTxHistoryProgress}} transakcje pobrane"
msgid "{{wallet.m}}-of-{{wallet.n}}"
msgstr "{{wallet.m}}-z-{{wallet.n}}"
#: src/js/services/shapeshiftService.js:8
msgid "Shapeshift"
msgstr "Shapeshift"
#: www/views/includes/community.html:3
msgid "Community"
msgstr "Społeczność"
#: src/js/services/communityService.js:40
msgid "Bitcoin Cash Reddit"
msgstr "Reddit Bitcoin Cash"
#: src/js/services/communityService.js:47
msgid "Bitcoin.com Twitter"
msgstr "Twitter Bitcoin.com"
#: www/views/includes/nextSteps.html:3
msgid "Explore Bitcoin.com"
msgstr "Poznaj Bitcoin.com"
#: src/js/services/bitcoincomService.js:21
msgid "Bitcoin Cash Games"
msgstr "Gry Bitcoin Cash"
#: www/views/includes/community.html:29
msgid "Share the Wallet App"
msgstr "Udostępnij aplikację Portfel"
#: src/js/services/bitcoincomService.js:28
msgid "News"
msgstr "Aktualności"
#: src/js/services/bitcoincomService.js:35
msgid "Mining Pool"
msgstr "Pula kopalni"
#: src/js/services/bitcoincomService.js:42
msgid "Tools"
msgstr "Narzędzia"
#: src/js/services/bitcoincomService.js:49
msgid "Bitcoin Price Charts"
msgstr "Wykresy kursu Bitcoin"
#: src/js/services/bitcoincomService.js:56
msgid "Free Bitcoin Cash"
msgstr "Darmowa Bitcoin Cash"
#: www/views/tab-home.html:30
msgid "Your Bitcoin Wallets are ready!"
msgstr "Twoje portfele Bitcoin są gotowe!"
#: src/js/controllers/amount.js:49
msgid "Address does not contain currency information, please make sure you are sending the correct currency."
msgstr "Adres nie zawiera informacji o walucie; upewnij się, że przesyłasz odpowiednią walutę."
#: www/views/review.html:4
msgid "Review Transaction"
msgstr "Potwierdzenie transakcji"
#: src/js/controllers/review.controller.js:36
msgid "You are sending"
msgstr "Przesyłasz"
#: src/js/controllers/review.controller.js:66
msgid "You are shifting"
msgstr "Przelewasz"
#: www/views/review.html:36
msgid "To:"
msgstr "Do:"
#: www/views/review.html:53
msgid "Add personal note"
msgstr "Dodaj notatkę osobistą"
#: www/views/review.html:87
msgid "Suggested by merchant:"
msgstr "Sugestia handlowca:"
#: src/js/controllers/review.controller.js:37
msgid "Enter text here"
msgstr "Wprowadź tekst tutaj"
#: www/views/review.html:57
msgid "Personal note:"
msgstr "Notatka osobista:"
#: www/views/review.html:69
msgid "Less than 1 cent"
msgstr "Mniej niż 1 cent"
#: src/js/services/incomingData.js:129
msgid "This invoice is no longer accepting payments"
msgstr "Nie można już opłacić tej faktury"
#: www/views/amount.html.js:60
msgid "Send Maximum Amount"
msgstr "Wyślij maksymalną kwotę"
#: src/js/controllers/amount.controller.js:239
msgid "Unknown error."
msgstr "Nieznany błąd."
#: www/views/paperWallet.html:48
msgid "No Bitcoin Cash wallet to transfer funds to found."
msgstr "Nie znaleziono portfela Bitcoin Cash do przekazania środków."
#: www/views/paperWallet.html:54
msgid "No Bitcoin Cash found."
msgstr "Nie znaleziono Bitcoin Cash."
#: www/views/paperWallet.html:60
msgid "Bitcoin Core found:"
msgstr "Znaleziono Bitcoin Core:"
#: www/views/paperWallet.html:98
msgid "No Bitcoin Core wallet to transfer funds to found."
msgstr "Nie znaleziono portfela Bitcoin Core do przekazania środków."
#: www/views/paperWallet.html:104
msgid "No Bitcoin Core found."
msgstr "Nie znaleziono Bitcoin Core."
#: src/js/controllers/tab-scan.js:120
msgid "Scan Failed"
msgstr "Skanowanie nie powiodło się"
#: src/js/controllers/tab-scan.js:121
msgid "Data not recognised."
msgstr "Nie rozpoznano danych."
#: src/js/controllers/tab-scan.js:121
msgid "Unsupported"
msgstr "Nieobsługiwane"
#: src/js/controllers/tab-scan.js:121
msgid "Testnet is not supported."
msgstr "Sieć testowa nie jest obsługiwana."
#: www/views/includes/incomingDataMenu.html:81
msgid "URL"
msgstr "Adres URL"
#: www/views/includes/incomingDataMenu.html:90
msgid "Open in web browser"
msgstr "Otwórz w przeglądarce internetowej"
#: src/js/services/shapeshift.service.js.html:90
msgid "Invalid address"
msgstr "Nieprawidłowy adres"
#: src/js/services/shapeshift.service.js.html:90
msgid "Amount is not defined"
msgstr "Kwota nie jest określona"
#: src/js/services/shapeshift.service.js.html:90
msgid "Amount is below the minimun"
msgstr "Kwota niższa od minimalnej"
#: src/js/services/shapeshift.service.js.html:90
msgid "Amount is above the limit"
msgstr "Kwota przekracza limit"
#: src/js/services/shapeshift.service.js.html:90
msgid "Invalid response from Shapeshift"
msgstr "Nieprawidłowa odpowiedź z Shapeshift"

View file

@ -11,7 +11,7 @@ msgstr ""
"Last-Translator: emilold\n"
"Language-Team: Portuguese, Brazilian\n"
"Language: pt\n"
"PO-Revision-Date: 2018-09-15 05:56\n"
"PO-Revision-Date: 2018-07-04 09:27\n"
#: www/views/modals/paypro.html:34
msgid "(Trusted)"
@ -81,26 +81,6 @@ msgstr "Número de conta"
msgid "Instant transactions with low fees"
msgstr "Transações instantâneas com taxas baixas"
#: www/views/walletSelector.html:49
msgid "Insufficient funds"
msgstr "Fundos insuficientes"
#: www/views/amount.html:42
msgid "Change Currency"
msgstr "Alterar moeda"
#: www/views/amount.html:49
msgid "Available Funds"
msgstr "Fundos disponíveis"
#: www/views/amount.html:59
msgid "Use All Available Funds"
msgstr "Usar todos os fundos disponíveis"
#: www/views/amount.html:99
msgid "Next"
msgstr "Próximo"
#: www/views/preferencesBitpayServices.html:23
msgid "Accounts"
msgstr "Contas"
@ -226,20 +206,6 @@ msgstr "Quase pronto! Vamos rever."
msgid "Alternative Currency"
msgstr "Moeda Alternativa"
#: www/views/tab-settings.html:75
msgid "Price Display"
msgstr "Exibição de preço"
#: src/js/controllers/tab-settings.js:19
#: www/views/preferencesPriceDisplay.html:12
msgid "Fiat"
msgstr "Fiat"
#: src/js/controllers/tab-settings.js:19
#: www/views/preferencesPriceDisplay.html:15
msgid "Cryptocurrency"
msgstr "Criptomoeda"
#: src/js/controllers/buyAmazon.js:98
msgid "Amazon.com is not available at this moment. Please try back later."
msgstr "Amazon.com não está disponível neste momento. Por favor, tente mais tarde."
@ -471,7 +437,6 @@ msgid "Buy &amp; Sell Bitcoin"
msgstr "Comprar &amp; Vender Bitcoin"
#: www/views/tab-send.html:35
#: src/js/services/buyAndSellService.js:26
msgid "Buy Bitcoin"
msgstr "Comprar Bitcoin"
@ -520,8 +485,8 @@ msgid "Cannot Create Wallet"
msgstr "Não é possível criar a carteira"
#: src/js/services/profileService.js:442
msgid "Cannot join the same wallet more than once"
msgstr "Não pode juntar-se à mesma carteira mais que uma vez"
msgid "Cannot join the same wallet more that once"
msgstr "Não pode juntar-se a mesma carteira mais que uma vez"
#: www/views/includes/bitpayCardsCard.html:2
msgid "Cards"
@ -654,14 +619,10 @@ msgstr "A conectar ao Glidera..."
msgid "Connection reset by peer"
msgstr "Ligação redefinida pelo mesmo nível"
#: www/views/tab-send.html:85
#: www/views/tab-send.html:45
msgid "Contacts"
msgstr "Contactos"
#: www/views/tab-send.html:86
msgid "Saved frequently used addresses"
msgstr "Salvou os endereços usados com frequência"
#: www/views/onboarding/notifications.html:9
msgid "Continue"
msgstr "Continuar"
@ -696,7 +657,6 @@ msgstr "Copayer {{$index}}"
#: src/js/controllers/copayers.js:79
#: src/js/controllers/export.js:193
#: src/js/controllers/confirm.js:41
#: www/views/includes/copyToClipboard.html:4
msgid "Copied to clipboard"
msgstr "Copiado para a área de transferência"
@ -863,7 +823,7 @@ msgstr "Criar carteira partilhada"
#: www/views/onboarding/tour.html:51
#: www/views/tab-home.html:75
#: www/views/tab-send.html:75
#: www/views/tab-send.html:36
msgid "Create bitcoin wallet"
msgstr "Criar carteira bitcoin"
@ -1316,7 +1276,6 @@ msgstr "Para fins de auditoria"
#: www/views/modals/txp-details.html:74
#: www/views/topup.html:34
#: www/views/tx-details.html:52
#: www/views/review.html:22
msgid "From"
msgstr "De"
@ -1377,6 +1336,10 @@ msgid "Get news and updates from BitPay"
msgstr "Receba notícias e atualizações da BitPay"
#: www/views/onboarding/welcome.html:8
msgctxt "button"
msgid "Get started"
msgstr "Começar"
#: www/views/bitpayCard.html:49
msgid "Get started"
msgstr "Começar"
@ -1623,7 +1586,7 @@ msgstr "Endereço de rede incorreto"
#: src/js/controllers/confirm.js:306
#: src/js/services/bwcError.js:44
msgid "Insufficient confirmed funds"
msgstr "Insuficiência de fundos confirmada"
msgstr "Insuficiência de fundos confirmados"
#: src/js/controllers/topup.js:165
#: src/js/controllers/topup.js:177
@ -2090,7 +2053,7 @@ msgstr "Abrir Projeto no GitHub"
#: src/js/controllers/bitpayCard.js:123
#: src/js/controllers/tx-details.js:192
msgid "Open Explorer"
msgstr "Abrir o Explorer"
msgstr "Abra o Explorer"
#: www/views/tab-scan.html:22
msgid "Open Settings"
@ -2200,10 +2163,6 @@ msgstr "Pagamento Rejeitado"
msgid "Payment Sent"
msgstr "Pagamento Enviado"
#: www/views/includes/slideToAcceptSuccess.html:12
msgid "Share this transaction"
msgstr "Compartilhar esta transação"
#: www/views/modals/txp-details.html:32
msgid "Payment accepted, but not yet broadcasted"
msgstr "Pagamento aceito, mas ainda não publicado"
@ -2221,8 +2180,8 @@ msgid "Payment details"
msgstr "Detalhes do pagamento"
#: www/views/modals/paypro.html:6
msgid "Payment Request"
msgstr "Solicitação de pagamento"
msgid "Payment request"
msgstr "Pedido de pagamento"
#: www/views/mercadoLibreCards.html:22
#: www/views/modals/mercadolibre-card-details.html:39
@ -2574,14 +2533,6 @@ msgstr "Procurar transações"
msgid "Search or enter bitcoin address"
msgstr "Procure ou digite o endereço bitcoin"
#: src/js/controllers/tab-send.js:28
msgid "Clipboard"
msgstr "Área de transferência"
#: src/js/controllers/tab-send.js:29
msgid "Your Clipboard is empty"
msgstr "A sua área de transferência está vazia"
#: www/views/modals/search.html:16
msgid "Search transactions"
msgstr "Procurar transações"
@ -2640,68 +2591,9 @@ msgid "Send by email"
msgstr "Enviar por E-mail"
#: src/js/controllers/confirm.js:177
#: src/js/controllers/tab-send.js:94
msgid "Send from"
msgstr "Enviar De"
#: src/js/controllers/tab-send.js:77
msgid "Send to"
msgstr "Enviar para"
#: www/views/tab-send.html:20
msgid "Paste Clipboard"
msgstr "Colar na área de trabalho"
#: www/views/tab-send.html:21
msgid "Paste Address"
msgstr "Colar endereço"
#: www/views/tab-send.html:27
msgid "Transfer between wallets"
msgstr "Transferência entre carteiras"
#: www/views/tab-send.html:35
msgid "Scan QR Code"
msgstr "Digitalizar o código QR"
#: www/views/tab-send.html:46
msgid "Send Bitcoin faster!"
msgstr "Envie Bitcoin mais rápido!"
#: www/views/tab-send.html:50
msgid "Save frequently used addresses and send them Bitcoin in just one tap"
msgstr "Salvar endereços usados com frequência e enviar Bitcoin com apenas um toque"
#: www/views/tab-send.html:55
msgid "Add your first contact"
msgstr "Adicionar o seu primeiro contato"
#: www/views/tab-send.html:65
msgid "Your Bitcoin wallet is empty"
msgstr "Sua carteira de Bitcoin está vazia"
#: www/views/tab-send.html:69
msgid "To get started, buy Bitcoin Cash (BCH) or Bitcoin Core (BTC), or share your address."
msgstr "Para começar, compre Bitcoin Cash (BCH) ou Bitcoin Core (BTC) ou compartilhe o seu endereço."
#: www/views/tab-send.html:70
msgid "You can receive bitcoin from any wallet or service."
msgstr "Você pode receber bitcoin de qualquer carteira ou serviço."
#: www/views/tab-send.html:72
#: www/views/shapeshift.html:23
#: www/views/tab-send.html:33
msgid "To get started, you'll need to create a bitcoin wallet and get some bitcoin."
msgstr "Para começar, você precisa criar uma carteira de bitcoins e obter alguns bitcoins."
#: www/views/tab-send.html:74
msgid "Buy Bitcoin now"
msgstr "Comprar Bitcoin agora"
#: www/views/tab-send.html:76
msgid "Show my address"
msgstr "Mostrar meu endereço"
#: www/views/includes/itemSelector.html:8
msgid "Send max amount"
msgstr "Quantidade Máxima de envio"
@ -2925,13 +2817,8 @@ msgid "Sweep"
msgstr "Limpar"
#: www/views/includes/incomingDataMenu.html:89
msgctxt "List item"
msgid "Sweep paper wallet"
msgstr "Varrer a carteira de papel"
#: www/views/paperWallet.html:3
msgctxt "Page title"
msgid "Sweep Paper Wallet"
msgid "Sweep paper wallet"
msgstr "Varrer a carteira de papel"
#: src/js/services/onGoingProcess.js:33
@ -3100,14 +2987,6 @@ msgstr "Este aplicativo armazena seu bitcoin com segurança de ponta."
msgid "This bitcoin payment request has expired."
msgstr "Este bitcoin pagamento pedido expirou."
#: www/views/review.html:55
msgid "Payment expires:"
msgstr "Pagamento expira em:"
#: www/views/review.html:56
msgid "Payment request has expired"
msgstr "Pedido de pagamento expirou"
#: www/views/join.html:133
#: www/views/tab-create-personal.html:103
#: www/views/tab-create-shared.html:132
@ -3149,6 +3028,10 @@ msgstr "Para"
msgid "To get started, buy bitcoin or share your address. You can receive bitcoin from any wallet or service."
msgstr "Para começar, compre bitcoins ou compartilhe seu endereço. Você pode receber bitcoins de qualquer carteira ou serviço."
#: www/views/tab-send.html:33
msgid "To get started, you'll need to create a bitcoin wallet and get some bitcoin."
msgstr "Para começar, você precisa criar uma carteira de bitcoins e obter alguns bitcoins."
#: src/js/services/bitpayAccountService.js:73
msgid "To {{reason}} you must first add your BitPay account - {{email}}"
msgstr "Para {{reason}} você deve primeiro adicionar sua conta BitPay - {{email}}"
@ -3161,26 +3044,6 @@ msgstr "Recarga em andamento..."
msgid "Top up {{amountStr}} to debit card ({{cardLastNumber}})"
msgstr "Recarga de {{amountStr}} para cartão de débito ({{cardLastNumber}})"
#: www/views/shapeshift.html:30
msgid "Start ShapeShift"
msgstr "Iniciar ShapeShift"
#: www/views/shapeshift.html:30
msgid "Exchange your BTC to BCH in minutes."
msgstr "Troque seu BTC para BCH em minutos."
#: www/views/shapeshift.html:30
msgid "To start the process you need to add funds to your wallet."
msgstr "Para iniciar o processo, você precisa adicionar fundos à sua carteira."
#: www/views/shapeshift.html:30
msgid "The process is fast and you will receive the exchanged amount in your wallet."
msgstr "O processo é rápido e você receberá a quantia convertida na sua carteira."
#: www/views/shapeshift.html:34
msgid "This service is provided by the third-party ShapeShift, who will charge a small fee for the service. The fee will be shown before you start the transaction."
msgstr "Este serviço é fornecido pela terceira ShapeShift, que cobrará uma pequena taxa pelo serviço. A taxa será exibida antes de você iniciar a transação."
#: www/views/buyAmazon.html:61
#: www/views/buyMercadoLibre.html:60
#: www/views/modals/wallet-balance.html:23
@ -3773,171 +3636,3 @@ msgstr "Transações de {{updatingTxHistoryProgress}} transferidas"
msgid "{{wallet.m}}-of-{{wallet.n}}"
msgstr "{{wallet.m}}-de-{{wallet.n}}"
#: src/js/services/shapeshiftService.js:8
msgid "Shapeshift"
msgstr "Shapeshift"
#: www/views/includes/community.html:3
msgid "Community"
msgstr "Comunidade"
#: src/js/services/communityService.js:40
msgid "Bitcoin Cash Reddit"
msgstr "Bitcoin Cash Reddit"
#: src/js/services/communityService.js:47
msgid "Bitcoin.com Twitter"
msgstr "Twitter Bitcoin.com"
#: www/views/includes/nextSteps.html:3
msgid "Explore Bitcoin.com"
msgstr "Explore Bitcoin.com"
#: src/js/services/bitcoincomService.js:21
msgid "Bitcoin Cash Games"
msgstr "Jogos Bitcoin Cash"
#: www/views/includes/community.html:29
msgid "Share the Wallet App"
msgstr "Compartilhar o app de carteira"
#: src/js/services/bitcoincomService.js:28
msgid "News"
msgstr "Notícias"
#: src/js/services/bitcoincomService.js:35
msgid "Mining Pool"
msgstr "Pool de mineração"
#: src/js/services/bitcoincomService.js:42
msgid "Tools"
msgstr "Ferramentas"
#: src/js/services/bitcoincomService.js:49
msgid "Bitcoin Price Charts"
msgstr "Gráficos de preço do Bitcoin"
#: src/js/services/bitcoincomService.js:56
msgid "Free Bitcoin Cash"
msgstr "Bitcoin Cash grátis"
#: www/views/tab-home.html:30
msgid "Your Bitcoin Wallets are ready!"
msgstr "As suas carteiras de Bitcoin estão prontas!"
#: src/js/controllers/amount.js:49
msgid "Address does not contain currency information, please make sure you are sending the correct currency."
msgstr "O endereço não contém informações de moeda. Certifique-se de que está enviando a moeda correta."
#: www/views/review.html:4
msgid "Review Transaction"
msgstr "Revisar transação"
#: src/js/controllers/review.controller.js:36
msgid "You are sending"
msgstr "Você está enviando"
#: src/js/controllers/review.controller.js:66
msgid "You are shifting"
msgstr "Você está trocando"
#: www/views/review.html:36
msgid "To:"
msgstr "Para:"
#: www/views/review.html:53
msgid "Add personal note"
msgstr "Adicionar nota pessoal"
#: www/views/review.html:87
msgid "Suggested by merchant:"
msgstr "Sugerido pelo comerciante:"
#: src/js/controllers/review.controller.js:37
msgid "Enter text here"
msgstr "Insira o texto aqui"
#: www/views/review.html:57
msgid "Personal note:"
msgstr "Nota pessoal:"
#: www/views/review.html:69
msgid "Less than 1 cent"
msgstr "Menos de 1 centavo"
#: src/js/services/incomingData.js:129
msgid "This invoice is no longer accepting payments"
msgstr "Essa fatura não aceita mais pagamentos"
#: www/views/amount.html.js:60
msgid "Send Maximum Amount"
msgstr "Enviar montante máximo"
#: src/js/controllers/amount.controller.js:239
msgid "Unknown error."
msgstr "Erro desconhecido."
#: www/views/paperWallet.html:48
msgid "No Bitcoin Cash wallet to transfer funds to found."
msgstr "Nenhuma carteira de Bitcoin Cash para transferir fundos encontrada."
#: www/views/paperWallet.html:54
msgid "No Bitcoin Cash found."
msgstr "Bitcoin Cash não encontrado."
#: www/views/paperWallet.html:60
msgid "Bitcoin Core found:"
msgstr "Bitcoin Core encontrado:"
#: www/views/paperWallet.html:98
msgid "No Bitcoin Core wallet to transfer funds to found."
msgstr "Nenhuma carteira de Bitcoin Core para transferir fundos encontrada."
#: www/views/paperWallet.html:104
msgid "No Bitcoin Core found."
msgstr "Nenhum Bitcoin Core encontrado."
#: src/js/controllers/tab-scan.js:120
msgid "Scan Failed"
msgstr "Falha de verificação"
#: src/js/controllers/tab-scan.js:121
msgid "Data not recognised."
msgstr "Dados não reconhecidos."
#: src/js/controllers/tab-scan.js:121
msgid "Unsupported"
msgstr "Não suportado"
#: src/js/controllers/tab-scan.js:121
msgid "Testnet is not supported."
msgstr "Testnet não suportado."
#: www/views/includes/incomingDataMenu.html:81
msgid "URL"
msgstr "URL"
#: www/views/includes/incomingDataMenu.html:90
msgid "Open in web browser"
msgstr "Abrir no navegador da Web"
#: src/js/services/shapeshift.service.js.html:90
msgid "Invalid address"
msgstr "Endereço inválido"
#: src/js/services/shapeshift.service.js.html:90
msgid "Amount is not defined"
msgstr "Montante não definido"
#: src/js/services/shapeshift.service.js.html:90
msgid "Amount is below the minimun"
msgstr "Montante abaixo do mínimo"
#: src/js/services/shapeshift.service.js.html:90
msgid "Amount is above the limit"
msgstr "Montante acima do limite"
#: src/js/services/shapeshift.service.js.html:90
msgid "Invalid response from Shapeshift"
msgstr "Resposta inválida do Shapeshift"

View file

@ -11,7 +11,7 @@ msgstr ""
"Last-Translator: emilold\n"
"Language-Team: Russian\n"
"Language: ru\n"
"PO-Revision-Date: 2018-09-15 05:56\n"
"PO-Revision-Date: 2018-07-04 09:27\n"
#: www/views/modals/paypro.html:34
msgid "(Trusted)"
@ -79,27 +79,7 @@ msgstr "Номер учётной записи"
#: www/views/tab-home.html:61
msgid "Instant transactions with low fees"
msgstr "Мгновенные транзакции с низкой комиссией"
#: www/views/walletSelector.html:49
msgid "Insufficient funds"
msgstr "Недостаточно средств"
#: www/views/amount.html:42
msgid "Change Currency"
msgstr "Изменить валюту"
#: www/views/amount.html:49
msgid "Available Funds"
msgstr "Доступные средства"
#: www/views/amount.html:59
msgid "Use All Available Funds"
msgstr "Использовать все доступные средства"
#: www/views/amount.html:99
msgid "Next"
msgstr "Далее"
msgstr "Мгновенные транзакции с низкой оплатой"
#: www/views/preferencesBitpayServices.html:23
msgid "Accounts"
@ -226,20 +206,6 @@ msgstr "Почти готово! Давайте проверим."
msgid "Alternative Currency"
msgstr "Альтернативная валюта"
#: www/views/tab-settings.html:75
msgid "Price Display"
msgstr "Отображение цен"
#: src/js/controllers/tab-settings.js:19
#: www/views/preferencesPriceDisplay.html:12
msgid "Fiat"
msgstr "Фиатная валюта"
#: src/js/controllers/tab-settings.js:19
#: www/views/preferencesPriceDisplay.html:15
msgid "Cryptocurrency"
msgstr "Криптовалюта"
#: src/js/controllers/buyAmazon.js:98
msgid "Amazon.com is not available at this moment. Please try back later."
msgstr "Сайт Amazon.com сейчас недоступен. Попробуйте позже."
@ -471,7 +437,6 @@ msgid "Buy &amp; Sell Bitcoin"
msgstr "Купить &amp; продать биткойн"
#: www/views/tab-send.html:35
#: src/js/services/buyAndSellService.js:26
msgid "Buy Bitcoin"
msgstr "Купить биткойн"
@ -520,7 +485,7 @@ msgid "Cannot Create Wallet"
msgstr "Не удаётся создать кошелёк"
#: src/js/services/profileService.js:442
msgid "Cannot join the same wallet more than once"
msgid "Cannot join the same wallet more that once"
msgstr "Нельзя присоединиться к одному и тому же кошельку более одного раза"
#: www/views/includes/bitpayCardsCard.html:2
@ -654,14 +619,10 @@ msgstr "Подключение к Glidera..."
msgid "Connection reset by peer"
msgstr "Соединение сброшено другой стороной"
#: www/views/tab-send.html:85
#: www/views/tab-send.html:45
msgid "Contacts"
msgstr "Контакты"
#: www/views/tab-send.html:86
msgid "Saved frequently used addresses"
msgstr "Сохраненные часто используемые адреса"
#: www/views/onboarding/notifications.html:9
msgid "Continue"
msgstr "Продолжить"
@ -696,7 +657,6 @@ msgstr "Совладелец {{$index}}"
#: src/js/controllers/copayers.js:79
#: src/js/controllers/export.js:193
#: src/js/controllers/confirm.js:41
#: www/views/includes/copyToClipboard.html:4
msgid "Copied to clipboard"
msgstr "Скопировано в буфер обмена"
@ -863,7 +823,7 @@ msgstr "Создать общий кошелёк"
#: www/views/onboarding/tour.html:51
#: www/views/tab-home.html:75
#: www/views/tab-send.html:75
#: www/views/tab-send.html:36
msgid "Create bitcoin wallet"
msgstr "Создать биткойн-кошелёк"
@ -1316,7 +1276,6 @@ msgstr "Для целей ревизии"
#: www/views/modals/txp-details.html:74
#: www/views/topup.html:34
#: www/views/tx-details.html:52
#: www/views/review.html:22
msgid "From"
msgstr "От"
@ -1377,6 +1336,10 @@ msgid "Get news and updates from BitPay"
msgstr "Получать письма с новостями от BitPay"
#: www/views/onboarding/welcome.html:8
msgctxt "button"
msgid "Get started"
msgstr "Начать"
#: www/views/bitpayCard.html:49
msgid "Get started"
msgstr "Начать"
@ -2200,10 +2163,6 @@ msgstr "Платёж отклонён"
msgid "Payment Sent"
msgstr "Платёж отправлен"
#: www/views/includes/slideToAcceptSuccess.html:12
msgid "Share this transaction"
msgstr "Поделиться транзакцией"
#: www/views/modals/txp-details.html:32
msgid "Payment accepted, but not yet broadcasted"
msgstr "Платёж принят, но пока не отправлен"
@ -2221,7 +2180,7 @@ msgid "Payment details"
msgstr "Детали платежа"
#: www/views/modals/paypro.html:6
msgid "Payment Request"
msgid "Payment request"
msgstr "Запрос платежа"
#: www/views/mercadoLibreCards.html:22
@ -2574,14 +2533,6 @@ msgstr "Поиск транзакций"
msgid "Search or enter bitcoin address"
msgstr "Найти или ввести биткойн-адрес"
#: src/js/controllers/tab-send.js:28
msgid "Clipboard"
msgstr "Буфер обмена"
#: src/js/controllers/tab-send.js:29
msgid "Your Clipboard is empty"
msgstr "Буфер обмена пуст"
#: www/views/modals/search.html:16
msgid "Search transactions"
msgstr "Поиск транзакций"
@ -2640,68 +2591,9 @@ msgid "Send by email"
msgstr "Отправить на email"
#: src/js/controllers/confirm.js:177
#: src/js/controllers/tab-send.js:94
msgid "Send from"
msgstr "Отправить от"
#: src/js/controllers/tab-send.js:77
msgid "Send to"
msgstr "Получатель"
#: www/views/tab-send.html:20
msgid "Paste Clipboard"
msgstr "Вставить из буфера обмена"
#: www/views/tab-send.html:21
msgid "Paste Address"
msgstr "Вставить адрес"
#: www/views/tab-send.html:27
msgid "Transfer between wallets"
msgstr "Перевод между кошельками"
#: www/views/tab-send.html:35
msgid "Scan QR Code"
msgstr "Сканировать QR код"
#: www/views/tab-send.html:46
msgid "Send Bitcoin faster!"
msgstr "Отправляйте биткойны еще быстрее!"
#: www/views/tab-send.html:50
msgid "Save frequently used addresses and send them Bitcoin in just one tap"
msgstr "Сохраняйте часто используемые адреса кошельков и отправляйте на них биткойны одним нажатием"
#: www/views/tab-send.html:55
msgid "Add your first contact"
msgstr "Добавить первый контакт"
#: www/views/tab-send.html:65
msgid "Your Bitcoin wallet is empty"
msgstr "Ваш кошелёк пуст"
#: www/views/tab-send.html:69
msgid "To get started, buy Bitcoin Cash (BCH) or Bitcoin Core (BTC), or share your address."
msgstr "Чтобы начать работу, купите Bitcoin Cash (BCH) или Bitcoin Core (BTC), или поделитесь вашим адресом."
#: www/views/tab-send.html:70
msgid "You can receive bitcoin from any wallet or service."
msgstr "Вы можете получать биткойны с любого кошелька или сервиса."
#: www/views/tab-send.html:72
#: www/views/shapeshift.html:23
#: www/views/tab-send.html:33
msgid "To get started, you'll need to create a bitcoin wallet and get some bitcoin."
msgstr "Чтобы начать работу, вам нужно создать кошелёк и получить биткойн."
#: www/views/tab-send.html:74
msgid "Buy Bitcoin now"
msgstr "Купить биткойны сейчас"
#: www/views/tab-send.html:76
msgid "Show my address"
msgstr "Показать мой адрес"
#: www/views/includes/itemSelector.html:8
msgid "Send max amount"
msgstr "Отправить макс. сумму"
@ -2925,13 +2817,8 @@ msgid "Sweep"
msgstr "Считать"
#: www/views/includes/incomingDataMenu.html:89
msgctxt "List item"
msgid "Sweep paper wallet"
msgstr "Пополнить с бумажного кошелька"
#: www/views/paperWallet.html:3
msgctxt "Page title"
msgid "Sweep Paper Wallet"
msgid "Sweep paper wallet"
msgstr "Пополнить с бумажного кошелька"
#: src/js/services/onGoingProcess.js:33
@ -3100,14 +2987,6 @@ msgstr "Это приложение хранит биткойны с высоч
msgid "This bitcoin payment request has expired."
msgstr "Срок этого запроса платежа истёк."
#: www/views/review.html:55
msgid "Payment expires:"
msgstr "Срок платежа:"
#: www/views/review.html:56
msgid "Payment request has expired"
msgstr "Срок запроса на платеж истёк"
#: www/views/join.html:133
#: www/views/tab-create-personal.html:103
#: www/views/tab-create-shared.html:132
@ -3149,6 +3028,10 @@ msgstr "Кому"
msgid "To get started, buy bitcoin or share your address. You can receive bitcoin from any wallet or service."
msgstr "Чтобы начать работу, купите биткойн или поделитесь вашим адресом. Вы можете получать биткойны из любого кошелька или сервиса."
#: www/views/tab-send.html:33
msgid "To get started, you'll need to create a bitcoin wallet and get some bitcoin."
msgstr "Чтобы начать работу, вам нужно создать кошелёк и получить биткойн."
#: src/js/services/bitpayAccountService.js:73
msgid "To {{reason}} you must first add your BitPay account - {{email}}"
msgstr "{{reason}}: сначала нужно добавить учетную запись BitPay — {{email}}"
@ -3161,26 +3044,6 @@ msgstr "Выполняется пополнение..."
msgid "Top up {{amountStr}} to debit card ({{cardLastNumber}})"
msgstr "Пополнить дебетовую карту ({{cardLastNumber}}) на {{amountStr}}"
#: www/views/shapeshift.html:30
msgid "Start ShapeShift"
msgstr "Начать обмен ShapeShift"
#: www/views/shapeshift.html:30
msgid "Exchange your BTC to BCH in minutes."
msgstr "Обмен BTC на BCH за пару минут."
#: www/views/shapeshift.html:30
msgid "To start the process you need to add funds to your wallet."
msgstr "Для начала нужно добавить средства в кошелёк."
#: www/views/shapeshift.html:30
msgid "The process is fast and you will receive the exchanged amount in your wallet."
msgstr "Обмен происходит быстро. Итоговая сумма поступит вам в кошелёк."
#: www/views/shapeshift.html:34
msgid "This service is provided by the third-party ShapeShift, who will charge a small fee for the service. The fee will be shown before you start the transaction."
msgstr "Услуга предоставляется сторонней компанией ShapeShift, которая взимает небольшую комиссию. Комиссия будет показана перед началом транзакции."
#: www/views/buyAmazon.html:61
#: www/views/buyMercadoLibre.html:60
#: www/views/modals/wallet-balance.html:23
@ -3773,171 +3636,3 @@ msgstr "{{updatingTxHistoryProgress}} транзакций загружено"
msgid "{{wallet.m}}-of-{{wallet.n}}"
msgstr "{{wallet.m}}-из-{{wallet.n}}"
#: src/js/services/shapeshiftService.js:8
msgid "Shapeshift"
msgstr "Shapeshift"
#: www/views/includes/community.html:3
msgid "Community"
msgstr "Сообщество"
#: src/js/services/communityService.js:40
msgid "Bitcoin Cash Reddit"
msgstr "Bitcoin Cash Reddit"
#: src/js/services/communityService.js:47
msgid "Bitcoin.com Twitter"
msgstr "Bitcoin.com Twitter"
#: www/views/includes/nextSteps.html:3
msgid "Explore Bitcoin.com"
msgstr "Обзор Bitcoin.com"
#: src/js/services/bitcoincomService.js:21
msgid "Bitcoin Cash Games"
msgstr "Игры Bitcoin Cash"
#: www/views/includes/community.html:29
msgid "Share the Wallet App"
msgstr "Поделиться программой «Кошелёк»"
#: src/js/services/bitcoincomService.js:28
msgid "News"
msgstr "Новости"
#: src/js/services/bitcoincomService.js:35
msgid "Mining Pool"
msgstr "Пул для майнинга"
#: src/js/services/bitcoincomService.js:42
msgid "Tools"
msgstr "Инструменты"
#: src/js/services/bitcoincomService.js:49
msgid "Bitcoin Price Charts"
msgstr "Динамика курса биткойна"
#: src/js/services/bitcoincomService.js:56
msgid "Free Bitcoin Cash"
msgstr "Bitcoin Cash бесплатно"
#: www/views/tab-home.html:30
msgid "Your Bitcoin Wallets are ready!"
msgstr "Ваши кошельки готовы!"
#: src/js/controllers/amount.js:49
msgid "Address does not contain currency information, please make sure you are sending the correct currency."
msgstr "Адрес не содержит сведений о валюте. Проверьте, правильную ли валюту вы отправляете."
#: www/views/review.html:4
msgid "Review Transaction"
msgstr "Проверка транзакции"
#: src/js/controllers/review.controller.js:36
msgid "You are sending"
msgstr "Вы отправляете"
#: src/js/controllers/review.controller.js:66
msgid "You are shifting"
msgstr "Вы меняете"
#: www/views/review.html:36
msgid "To:"
msgstr "Куда:"
#: www/views/review.html:53
msgid "Add personal note"
msgstr "Добавить личное сообщение"
#: www/views/review.html:87
msgid "Suggested by merchant:"
msgstr "Предложено продавцом:"
#: src/js/controllers/review.controller.js:37
msgid "Enter text here"
msgstr "Вводите текст сюда"
#: www/views/review.html:57
msgid "Personal note:"
msgstr "Личное сообщение:"
#: www/views/review.html:69
msgid "Less than 1 cent"
msgstr "менее 1 копейки"
#: src/js/services/incomingData.js:129
msgid "This invoice is no longer accepting payments"
msgstr "По этому инвойсу платежи больше не принимаются"
#: www/views/amount.html.js:60
msgid "Send Maximum Amount"
msgstr "Отправить максимальную сумму"
#: src/js/controllers/amount.controller.js:239
msgid "Unknown error."
msgstr "Неизвестная ошибка."
#: www/views/paperWallet.html:48
msgid "No Bitcoin Cash wallet to transfer funds to found."
msgstr "Не найден кошелек Bitcoin Cash для перевода средств."
#: www/views/paperWallet.html:54
msgid "No Bitcoin Cash found."
msgstr "Не найден Bitcoin Cash."
#: www/views/paperWallet.html:60
msgid "Bitcoin Core found:"
msgstr "Найден Bitcoin Core:"
#: www/views/paperWallet.html:98
msgid "No Bitcoin Core wallet to transfer funds to found."
msgstr "Не найден кошелек Bitcoin Core для перевода средств."
#: www/views/paperWallet.html:104
msgid "No Bitcoin Core found."
msgstr "Не найден Bitcoin Core."
#: src/js/controllers/tab-scan.js:120
msgid "Scan Failed"
msgstr "Ошибка сканирования"
#: src/js/controllers/tab-scan.js:121
msgid "Data not recognised."
msgstr "Данные не распознаны."
#: src/js/controllers/tab-scan.js:121
msgid "Unsupported"
msgstr "Не поддерживается"
#: src/js/controllers/tab-scan.js:121
msgid "Testnet is not supported."
msgstr "Testnet не поддерживается."
#: www/views/includes/incomingDataMenu.html:81
msgid "URL"
msgstr "URL-адрес"
#: www/views/includes/incomingDataMenu.html:90
msgid "Open in web browser"
msgstr "Открыть в веб-браузере"
#: src/js/services/shapeshift.service.js.html:90
msgid "Invalid address"
msgstr "Неверный адрес"
#: src/js/services/shapeshift.service.js.html:90
msgid "Amount is not defined"
msgstr "Сумма не задана"
#: src/js/services/shapeshift.service.js.html:90
msgid "Amount is below the minimun"
msgstr "Сумма ниже минимума"
#: src/js/services/shapeshift.service.js.html:90
msgid "Amount is above the limit"
msgstr "Сумма больше ограничения"
#: src/js/services/shapeshift.service.js.html:90
msgid "Invalid response from Shapeshift"
msgstr "Неправильный ответ от Shapeshift"

View file

@ -11,7 +11,7 @@ msgstr ""
"Last-Translator: emilold\n"
"Language-Team: Swedish\n"
"Language: sv\n"
"PO-Revision-Date: 2018-09-06 16:45\n"
"PO-Revision-Date: 2018-07-04 03:58\n"
#: www/views/modals/paypro.html:34
msgid "(Trusted)"
@ -41,7 +41,7 @@ msgstr "Fem stjärnor hjälper oss att göra {{appName}} bättre och mer åtkoml
#: www/views/mercadoLibre.html:18
#: www/views/mercadoLibre.html:40
msgid "<b>Only</b> redeemable on Mercado Livre (Brazil)"
msgstr "<b>Only</b> redeemable on Mercado Livre (Brazil)"
msgstr ""
#: src/js/controllers/feedback/send.js:27
#: www/views/feedback/complete.html:21
@ -79,27 +79,7 @@ msgstr "Kontonummer"
#: www/views/tab-home.html:61
msgid "Instant transactions with low fees"
msgstr "Direkta transaktioner med låga avgifter"
#: www/views/walletSelector.html:49
msgid "Insufficient funds"
msgstr "Otillräckliga medel"
#: www/views/amount.html:42
msgid "Change Currency"
msgstr "Ändra valuta"
#: www/views/amount.html:49
msgid "Available Funds"
msgstr "Tillgängliga medel"
#: www/views/amount.html:59
msgid "Use All Available Funds"
msgstr "Använd alla tillgängliga medel"
#: www/views/amount.html:99
msgid "Next"
msgstr "Nästa"
msgstr ""
#: www/views/preferencesBitpayServices.html:23
msgid "Accounts"
@ -219,27 +199,13 @@ msgstr "Tillåt notificationer"
#: www/views/onboarding/disclaimer.html:14
msgid "Almost done! Let's review."
msgstr "Nästan klart! Låt oss granska."
msgstr ""
#: www/views/preferencesAltCurrency.html:4
#: www/views/tab-settings.html:79
msgid "Alternative Currency"
msgstr "Alternativ Valuta"
#: www/views/tab-settings.html:75
msgid "Price Display"
msgstr ""
#: src/js/controllers/tab-settings.js:19
#: www/views/preferencesPriceDisplay.html:12
msgid "Fiat"
msgstr "Fiat"
#: src/js/controllers/tab-settings.js:19
#: www/views/preferencesPriceDisplay.html:15
msgid "Cryptocurrency"
msgstr "Kryptovaluta"
#: src/js/controllers/buyAmazon.js:98
msgid "Amazon.com is not available at this moment. Please try back later."
msgstr "Amazon.com är inte tillgängligt för tillfället. Försök igen senare."
@ -393,7 +359,7 @@ msgstr ""
#: www/views/addressbook.add.html:38
#: www/views/includes/incomingDataMenu.html:29
msgid "Bitcoin Address"
msgstr "Bitcoin-adress"
msgstr ""
#: www/views/cashScan.html:4
msgid "Bitcoin Cash (BCH) Balances"
@ -426,7 +392,7 @@ msgstr ""
#: www/views/onboarding/tour.html:31
msgid "Bitcoin is a currency."
msgstr "Bitcoin är en valuta."
msgstr ""
#: www/views/onboarding/disclaimer.html:15
msgid "Bitcoin is different &ndash; it cannot be safely held with a bank or web service."
@ -446,7 +412,7 @@ msgstr ""
#: www/views/modals/txp-details.html:36
msgid "Broadcast Payment"
msgstr "Sänd betalning"
msgstr ""
#: src/js/controllers/modals/txpDetails.js:64
#: src/js/controllers/tx-details.js:81
@ -455,34 +421,33 @@ msgstr ""
#: src/js/services/onGoingProcess.js:11
msgid "Broadcasting transaction"
msgstr "Sänder transaktion"
msgstr ""
#: www/views/unsupported.html:6
msgid "Browser unsupported"
msgstr "Webbläsaren stöds inte"
msgstr ""
#: www/views/buyAmazon.html:5
#: www/views/buyMercadoLibre.html:6
msgid "Buy"
msgstr "Köp"
msgstr ""
#: www/views/includes/buyAndSellCard.html:3
msgid "Buy &amp; Sell Bitcoin"
msgstr ""
#: www/views/tab-send.html:35
#: src/js/services/buyAndSellService.js:26
msgid "Buy Bitcoin"
msgstr "Köp Bitcoin"
msgstr ""
#: www/views/mercadoLibre.html:22
#: www/views/mercadoLibre.html:50
msgid "Buy a Gift Card"
msgstr "Köp ett presentkort"
msgstr ""
#: src/js/controllers/buyAmazon.js:334
msgid "Buy from"
msgstr "Köp från"
msgstr ""
#: src/js/services/onGoingProcess.js:40
msgid "Buying Bitcoin..."
@ -490,7 +455,7 @@ msgstr ""
#: src/js/services/onGoingProcess.js:12
msgid "Calculating fee"
msgstr "Beräknar avgift"
msgstr ""
#: src/js/controllers/buyAmazon.js:313
#: src/js/controllers/buyMercadoLibre.js:307
@ -509,35 +474,35 @@ msgstr "Beräknar avgift"
#: www/views/modals/bitpay-card-confirmation.html:8
#: www/views/modals/confirmation.html:13
msgid "Cancel"
msgstr "Avbryt"
msgstr ""
#: www/views/copayers.html:36
msgid "Cancel invitation"
msgstr "Avbryt inbjudan"
msgstr ""
#: src/js/controllers/onboarding/tour.js:52
msgid "Cannot Create Wallet"
msgstr "Kan inte skapa plånbok"
msgstr ""
#: src/js/services/profileService.js:442
msgid "Cannot join the same wallet more than once"
msgid "Cannot join the same wallet more that once"
msgstr ""
#: www/views/includes/bitpayCardsCard.html:2
msgid "Cards"
msgstr "Kort"
msgstr ""
#: www/views/modals/paypro.html:30
msgid "Certified by"
msgstr "Certifierad av"
msgstr ""
#: www/views/preferencesExternal.html:19
msgid "Check installation and retry."
msgstr "Kontrollera installationen och försök igen."
msgstr ""
#: www/views/tab-import-file.html:4
msgid "Choose a backup file from your computer"
msgstr "Välj en backup-fil från din dator"
msgstr ""
#: www/views/modals/wallets.html:9
msgid "Choose your destination wallet"
@ -654,14 +619,10 @@ msgstr ""
msgid "Connection reset by peer"
msgstr ""
#: www/views/tab-send.html:85
#: www/views/tab-send.html:45
msgid "Contacts"
msgstr ""
#: www/views/tab-send.html:86
msgid "Saved frequently used addresses"
msgstr ""
#: www/views/onboarding/notifications.html:9
msgid "Continue"
msgstr ""
@ -696,7 +657,6 @@ msgstr ""
#: src/js/controllers/copayers.js:79
#: src/js/controllers/export.js:193
#: src/js/controllers/confirm.js:41
#: www/views/includes/copyToClipboard.html:4
msgid "Copied to clipboard"
msgstr ""
@ -863,7 +823,7 @@ msgstr ""
#: www/views/onboarding/tour.html:51
#: www/views/tab-home.html:75
#: www/views/tab-send.html:75
#: www/views/tab-send.html:36
msgid "Create bitcoin wallet"
msgstr ""
@ -1316,7 +1276,6 @@ msgstr ""
#: www/views/modals/txp-details.html:74
#: www/views/topup.html:34
#: www/views/tx-details.html:52
#: www/views/review.html:22
msgid "From"
msgstr ""
@ -1377,6 +1336,10 @@ msgid "Get news and updates from BitPay"
msgstr ""
#: www/views/onboarding/welcome.html:8
msgctxt "button"
msgid "Get started"
msgstr ""
#: www/views/bitpayCard.html:49
msgid "Get started"
msgstr ""
@ -2200,10 +2163,6 @@ msgstr ""
msgid "Payment Sent"
msgstr ""
#: www/views/includes/slideToAcceptSuccess.html:12
msgid "Share this transaction"
msgstr ""
#: www/views/modals/txp-details.html:32
msgid "Payment accepted, but not yet broadcasted"
msgstr ""
@ -2221,7 +2180,7 @@ msgid "Payment details"
msgstr ""
#: www/views/modals/paypro.html:6
msgid "Payment Request"
msgid "Payment request"
msgstr ""
#: www/views/mercadoLibreCards.html:22
@ -2574,14 +2533,6 @@ msgstr ""
msgid "Search or enter bitcoin address"
msgstr ""
#: src/js/controllers/tab-send.js:28
msgid "Clipboard"
msgstr ""
#: src/js/controllers/tab-send.js:29
msgid "Your Clipboard is empty"
msgstr ""
#: www/views/modals/search.html:16
msgid "Search transactions"
msgstr ""
@ -2640,68 +2591,9 @@ msgid "Send by email"
msgstr ""
#: src/js/controllers/confirm.js:177
#: src/js/controllers/tab-send.js:94
msgid "Send from"
msgstr ""
#: src/js/controllers/tab-send.js:77
msgid "Send to"
msgstr ""
#: www/views/tab-send.html:20
msgid "Paste Clipboard"
msgstr ""
#: www/views/tab-send.html:21
msgid "Paste Address"
msgstr ""
#: www/views/tab-send.html:27
msgid "Transfer between wallets"
msgstr ""
#: www/views/tab-send.html:35
msgid "Scan QR Code"
msgstr ""
#: www/views/tab-send.html:46
msgid "Send Bitcoin faster!"
msgstr ""
#: www/views/tab-send.html:50
msgid "Save frequently used addresses and send them Bitcoin in just one tap"
msgstr ""
#: www/views/tab-send.html:55
msgid "Add your first contact"
msgstr ""
#: www/views/tab-send.html:65
msgid "Your Bitcoin wallet is empty"
msgstr ""
#: www/views/tab-send.html:69
msgid "To get started, buy Bitcoin Cash (BCH) or Bitcoin Core (BTC), or share your address."
msgstr ""
#: www/views/tab-send.html:70
msgid "You can receive bitcoin from any wallet or service."
msgstr ""
#: www/views/tab-send.html:72
#: www/views/shapeshift.html:23
#: www/views/tab-send.html:33
msgid "To get started, you'll need to create a bitcoin wallet and get some bitcoin."
msgstr ""
#: www/views/tab-send.html:74
msgid "Buy Bitcoin now"
msgstr ""
#: www/views/tab-send.html:76
msgid "Show my address"
msgstr ""
#: www/views/includes/itemSelector.html:8
msgid "Send max amount"
msgstr ""
@ -2925,13 +2817,8 @@ msgid "Sweep"
msgstr ""
#: www/views/includes/incomingDataMenu.html:89
msgctxt "List item"
msgid "Sweep paper wallet"
msgstr ""
#: www/views/paperWallet.html:3
msgctxt "Page title"
msgid "Sweep Paper Wallet"
msgid "Sweep paper wallet"
msgstr ""
#: src/js/services/onGoingProcess.js:33
@ -3100,14 +2987,6 @@ msgstr ""
msgid "This bitcoin payment request has expired."
msgstr ""
#: www/views/review.html:55
msgid "Payment expires:"
msgstr ""
#: www/views/review.html:56
msgid "Payment request has expired"
msgstr ""
#: www/views/join.html:133
#: www/views/tab-create-personal.html:103
#: www/views/tab-create-shared.html:132
@ -3149,6 +3028,10 @@ msgstr ""
msgid "To get started, buy bitcoin or share your address. You can receive bitcoin from any wallet or service."
msgstr ""
#: www/views/tab-send.html:33
msgid "To get started, you'll need to create a bitcoin wallet and get some bitcoin."
msgstr ""
#: src/js/services/bitpayAccountService.js:73
msgid "To {{reason}} you must first add your BitPay account - {{email}}"
msgstr ""
@ -3161,26 +3044,6 @@ msgstr ""
msgid "Top up {{amountStr}} to debit card ({{cardLastNumber}})"
msgstr ""
#: www/views/shapeshift.html:30
msgid "Start ShapeShift"
msgstr ""
#: www/views/shapeshift.html:30
msgid "Exchange your BTC to BCH in minutes."
msgstr ""
#: www/views/shapeshift.html:30
msgid "To start the process you need to add funds to your wallet."
msgstr ""
#: www/views/shapeshift.html:30
msgid "The process is fast and you will receive the exchanged amount in your wallet."
msgstr ""
#: www/views/shapeshift.html:34
msgid "This service is provided by the third-party ShapeShift, who will charge a small fee for the service. The fee will be shown before you start the transaction."
msgstr ""
#: www/views/buyAmazon.html:61
#: www/views/buyMercadoLibre.html:60
#: www/views/modals/wallet-balance.html:23
@ -3773,171 +3636,3 @@ msgstr ""
msgid "{{wallet.m}}-of-{{wallet.n}}"
msgstr ""
#: src/js/services/shapeshiftService.js:8
msgid "Shapeshift"
msgstr ""
#: www/views/includes/community.html:3
msgid "Community"
msgstr ""
#: src/js/services/communityService.js:40
msgid "Bitcoin Cash Reddit"
msgstr ""
#: src/js/services/communityService.js:47
msgid "Bitcoin.com Twitter"
msgstr ""
#: www/views/includes/nextSteps.html:3
msgid "Explore Bitcoin.com"
msgstr ""
#: src/js/services/bitcoincomService.js:21
msgid "Bitcoin Cash Games"
msgstr ""
#: www/views/includes/community.html:29
msgid "Share the Wallet App"
msgstr ""
#: src/js/services/bitcoincomService.js:28
msgid "News"
msgstr ""
#: src/js/services/bitcoincomService.js:35
msgid "Mining Pool"
msgstr ""
#: src/js/services/bitcoincomService.js:42
msgid "Tools"
msgstr ""
#: src/js/services/bitcoincomService.js:49
msgid "Bitcoin Price Charts"
msgstr ""
#: src/js/services/bitcoincomService.js:56
msgid "Free Bitcoin Cash"
msgstr ""
#: www/views/tab-home.html:30
msgid "Your Bitcoin Wallets are ready!"
msgstr ""
#: src/js/controllers/amount.js:49
msgid "Address does not contain currency information, please make sure you are sending the correct currency."
msgstr ""
#: www/views/review.html:4
msgid "Review Transaction"
msgstr ""
#: src/js/controllers/review.controller.js:36
msgid "You are sending"
msgstr ""
#: src/js/controllers/review.controller.js:66
msgid "You are shifting"
msgstr ""
#: www/views/review.html:36
msgid "To:"
msgstr ""
#: www/views/review.html:53
msgid "Add personal note"
msgstr ""
#: www/views/review.html:87
msgid "Suggested by merchant:"
msgstr ""
#: src/js/controllers/review.controller.js:37
msgid "Enter text here"
msgstr ""
#: www/views/review.html:57
msgid "Personal note:"
msgstr ""
#: www/views/review.html:69
msgid "Less than 1 cent"
msgstr ""
#: src/js/services/incomingData.js:129
msgid "This invoice is no longer accepting payments"
msgstr ""
#: www/views/amount.html.js:60
msgid "Send Maximum Amount"
msgstr ""
#: src/js/controllers/amount.controller.js:239
msgid "Unknown error."
msgstr ""
#: www/views/paperWallet.html:48
msgid "No Bitcoin Cash wallet to transfer funds to found."
msgstr ""
#: www/views/paperWallet.html:54
msgid "No Bitcoin Cash found."
msgstr ""
#: www/views/paperWallet.html:60
msgid "Bitcoin Core found:"
msgstr ""
#: www/views/paperWallet.html:98
msgid "No Bitcoin Core wallet to transfer funds to found."
msgstr ""
#: www/views/paperWallet.html:104
msgid "No Bitcoin Core found."
msgstr ""
#: src/js/controllers/tab-scan.js:120
msgid "Scan Failed"
msgstr ""
#: src/js/controllers/tab-scan.js:121
msgid "Data not recognised."
msgstr ""
#: src/js/controllers/tab-scan.js:121
msgid "Unsupported"
msgstr ""
#: src/js/controllers/tab-scan.js:121
msgid "Testnet is not supported."
msgstr ""
#: www/views/includes/incomingDataMenu.html:81
msgid "URL"
msgstr ""
#: www/views/includes/incomingDataMenu.html:90
msgid "Open in web browser"
msgstr ""
#: src/js/services/shapeshift.service.js.html:90
msgid "Invalid address"
msgstr ""
#: src/js/services/shapeshift.service.js.html:90
msgid "Amount is not defined"
msgstr ""
#: src/js/services/shapeshift.service.js.html:90
msgid "Amount is below the minimun"
msgstr ""
#: src/js/services/shapeshift.service.js.html:90
msgid "Amount is above the limit"
msgstr ""
#: src/js/services/shapeshift.service.js.html:90
msgid "Invalid response from Shapeshift"
msgstr ""

View file

@ -72,26 +72,6 @@ msgstr ""
msgid "Instant transactions with low fees"
msgstr ""
#: www/views/walletSelector.html:49
msgid "Insufficient funds"
msgstr ""
#: www/views/amount.html:42
msgid "Change Currency"
msgstr ""
#: www/views/amount.html:49
msgid "Available Funds"
msgstr ""
#: www/views/amount.html:59
msgid "Use All Available Funds"
msgstr ""
#: www/views/amount.html:99
msgid "Next"
msgstr ""
#: www/views/preferencesBitpayServices.html:23
msgid "Accounts"
msgstr ""
@ -217,20 +197,6 @@ msgstr ""
msgid "Alternative Currency"
msgstr ""
#: www/views/tab-settings.html:75
msgid "Price Display"
msgstr ""
#: src/js/controllers/tab-settings.js:19
#: www/views/preferencesPriceDisplay.html:12
msgid "Fiat"
msgstr ""
#: src/js/controllers/tab-settings.js:19
#: www/views/preferencesPriceDisplay.html:15
msgid "Cryptocurrency"
msgstr ""
#: src/js/controllers/buyAmazon.js:98
msgid "Amazon.com is not available at this moment. Please try back later."
msgstr ""
@ -462,7 +428,6 @@ msgid "Buy &amp; Sell Bitcoin"
msgstr ""
#: www/views/tab-send.html:35
#: src/js/services/buyAndSellService.js:26
msgid "Buy Bitcoin"
msgstr ""
@ -511,7 +476,7 @@ msgid "Cannot Create Wallet"
msgstr ""
#: src/js/services/profileService.js:442
msgid "Cannot join the same wallet more than once"
msgid "Cannot join the same wallet more that once"
msgstr ""
#: www/views/includes/bitpayCardsCard.html:2
@ -687,7 +652,6 @@ msgstr ""
#: src/js/controllers/copayers.js:79
#: src/js/controllers/export.js:193
#: src/js/controllers/confirm.js:41
#: www/views/includes/copyToClipboard.html:4
msgid "Copied to clipboard"
msgstr ""
@ -1307,7 +1271,6 @@ msgstr ""
#: www/views/modals/txp-details.html:74
#: www/views/topup.html:34
#: www/views/tx-details.html:52
#: www/views/review.html:22
msgid "From"
msgstr ""
@ -1368,6 +1331,10 @@ msgid "Get news and updates from BitPay"
msgstr ""
#: www/views/onboarding/welcome.html:8
msgctxt "button"
msgid "Get started"
msgstr ""
#: www/views/bitpayCard.html:49
msgid "Get started"
msgstr ""
@ -2191,10 +2158,6 @@ msgstr ""
msgid "Payment Sent"
msgstr ""
#: www/views/includes/slideToAcceptSuccess.html:12
msgid "Share this transaction"
msgstr ""
#: www/views/modals/txp-details.html:32
msgid "Payment accepted, but not yet broadcasted"
msgstr ""
@ -2212,7 +2175,7 @@ msgid "Payment details"
msgstr ""
#: www/views/modals/paypro.html:6
msgid "Payment Request"
msgid "Payment request"
msgstr ""
#: www/views/mercadoLibreCards.html:22
@ -2648,7 +2611,7 @@ msgid "Paste Address"
msgstr ""
#: www/views/tab-send.html:27
msgid "Transfer between wallets"
msgid "Wallet to Wallet Transfer"
msgstr ""
#: www/views/tab-send.html:35
@ -2659,6 +2622,10 @@ msgstr ""
msgid "Send Bitcoin faster!"
msgstr ""
#: www/views/tab-send.html:46
msgid "Send Bitcoin faster!"
msgstr ""
#: www/views/tab-send.html:50
msgid "Save frequently used addresses and send them Bitcoin in just one tap"
msgstr ""
@ -2680,8 +2647,6 @@ msgid "You can receive bitcoin from any wallet or service."
msgstr ""
#: www/views/tab-send.html:72
#: www/views/shapeshift.html:23
#: www/views/tab-send.html:33
msgid "To get started, you'll need to create a bitcoin wallet and get some bitcoin."
msgstr ""
@ -2916,13 +2881,8 @@ msgid "Sweep"
msgstr ""
#: www/views/includes/incomingDataMenu.html:89
msgctxt "List item"
msgid "Sweep paper wallet"
msgstr ""
#: www/views/paperWallet.html:3
msgctxt "Page title"
msgid "Sweep Paper Wallet"
msgid "Sweep paper wallet"
msgstr ""
#: src/js/services/onGoingProcess.js:33
@ -3091,14 +3051,6 @@ msgstr ""
msgid "This bitcoin payment request has expired."
msgstr ""
#: www/views/review.html:55
msgid "Payment expires:"
msgstr ""
#: www/views/review.html:56
msgid "Payment request has expired"
msgstr ""
#: www/views/join.html:133
#: www/views/tab-create-personal.html:103
#: www/views/tab-create-shared.html:132
@ -3140,6 +3092,10 @@ msgstr ""
msgid "To get started, buy bitcoin or share your address. You can receive bitcoin from any wallet or service."
msgstr ""
#: www/views/tab-send.html:33
msgid "To get started, you'll need to create a bitcoin wallet and get some bitcoin."
msgstr ""
#: src/js/services/bitpayAccountService.js:73
msgid "To {{reason}} you must first add your BitPay account - {{email}}"
msgstr ""
@ -3152,26 +3108,6 @@ msgstr ""
msgid "Top up {{amountStr}} to debit card ({{cardLastNumber}})"
msgstr ""
#: www/views/shapeshift.html:30
msgid "Start ShapeShift"
msgstr ""
#: www/views/shapeshift.html:30
msgid "Exchange your BTC to BCH in minutes."
msgstr ""
#: www/views/shapeshift.html:30
msgid "To start the process you need to add funds to your wallet."
msgstr ""
#: www/views/shapeshift.html:30
msgid "The process is fast and you will receive the exchanged amount in your wallet."
msgstr ""
#: www/views/shapeshift.html:34
msgid "This service is provided by the third-party ShapeShift, who will charge a small fee for the service. The fee will be shown before you start the transaction."
msgstr ""
#: www/views/buyAmazon.html:61
#: www/views/buyMercadoLibre.html:60
#: www/views/modals/wallet-balance.html:23
@ -3763,171 +3699,3 @@ msgstr ""
#: www/views/includes/walletInfo.html:18
msgid "{{wallet.m}}-of-{{wallet.n}}"
msgstr ""
#: src/js/services/shapeshiftService.js:8
msgid "Shapeshift"
msgstr ""
#: www/views/includes/community.html:3
msgid "Community"
msgstr ""
#: src/js/services/communityService.js:40
msgid "Bitcoin Cash Reddit"
msgstr ""
#: src/js/services/communityService.js:47
msgid "Bitcoin.com Twitter"
msgstr ""
#: www/views/includes/nextSteps.html:3
msgid "Explore Bitcoin.com"
msgstr ""
#: src/js/services/bitcoincomService.js:21
msgid "Bitcoin Cash Games"
msgstr ""
#: www/views/includes/community.html:29
msgid "Share the Wallet App"
msgstr ""
#: src/js/services/bitcoincomService.js:28
msgid "News"
msgstr ""
#: src/js/services/bitcoincomService.js:35
msgid "Mining Pool"
msgstr ""
#: src/js/services/bitcoincomService.js:42
msgid "Tools"
msgstr ""
#: src/js/services/bitcoincomService.js:49
msgid "Bitcoin Price Charts"
msgstr ""
#: src/js/services/bitcoincomService.js:56
msgid "Free Bitcoin Cash"
msgstr ""
#: www/views/tab-home.html:30
msgid "Your Bitcoin Wallets are ready!"
msgstr ""
#: src/js/controllers/amount.js:49
msgid "Address does not contain currency information, please make sure you are sending the correct currency."
msgstr ""
#: www/views/review.html:4
msgid "Review Transaction"
msgstr ""
#: src/js/controllers/review.controller.js:36
msgid "You are sending"
msgstr ""
#: src/js/controllers/review.controller.js:66
msgid "You are shifting"
msgstr ""
#: www/views/review.html:36
msgid "To:"
msgstr ""
#: www/views/review.html:53
msgid "Add personal note"
msgstr ""
#: www/views/review.html:87
msgid "Suggested by merchant:"
msgstr ""
#: src/js/controllers/review.controller.js:37
msgid "Enter text here"
msgstr ""
#: www/views/review.html:57
msgid "Personal note:"
msgstr ""
#: www/views/review.html:69
msgid "Less than 1 cent"
msgstr ""
#: src/js/services/incomingData.js:129
msgid "This invoice is no longer accepting payments"
msgstr ""
#: www/views/amount.html.js:60
msgid "Send Maximum Amount"
msgstr ""
#: src/js/controllers/amount.controller.js:239
msgid "Unknown error."
msgstr ""
#: www/views/paperWallet.html:48
msgid "No Bitcoin Cash wallet to transfer funds to found."
msgstr ""
#: www/views/paperWallet.html:54
msgid "No Bitcoin Cash found."
msgstr ""
#: www/views/paperWallet.html:60
msgid "Bitcoin Core found:"
msgstr ""
#: www/views/paperWallet.html:98
msgid "No Bitcoin Core wallet to transfer funds to found."
msgstr ""
#: www/views/paperWallet.html:104
msgid "No Bitcoin Core found."
msgstr ""
#: src/js/controllers/tab-scan.js:120
msgid "Scan Failed"
msgstr ""
#: src/js/controllers/tab-scan.js:121
msgid "Data not recognised."
msgstr ""
#: src/js/controllers/tab-scan.js:121
msgid "Unsupported"
msgstr ""
#: src/js/controllers/tab-scan.js:121
msgid "Testnet is not supported."
msgstr ""
#: www/views/includes/incomingDataMenu.html:81
msgid "URL"
msgstr ""
#: www/views/includes/incomingDataMenu.html:90
msgid "Open in web browser"
msgstr ""
#: src/js/services/shapeshift.service.js.html:90
msgid "Invalid address"
msgstr ""
#: src/js/services/shapeshift.service.js.html:90
msgid "Amount is not defined"
msgstr ""
#: src/js/services/shapeshift.service.js.html:90
msgid "Amount is below the minimun"
msgstr ""
#: src/js/services/shapeshift.service.js.html:90
msgid "Amount is above the limit"
msgstr ""
#: src/js/services/shapeshift.service.js.html:90
msgid "Invalid response from Shapeshift"
msgstr ""

File diff suppressed because it is too large Load diff

View file

@ -11,7 +11,7 @@ msgstr ""
"Last-Translator: emilold\n"
"Language-Team: Chinese Simplified\n"
"Language: zh\n"
"PO-Revision-Date: 2018-09-15 05:56\n"
"PO-Revision-Date: 2018-07-04 03:57\n"
#: www/views/modals/paypro.html:34
msgid "(Trusted)"
@ -79,27 +79,7 @@ msgstr "帐号"
#: www/views/tab-home.html:61
msgid "Instant transactions with low fees"
msgstr "以较低费用进行即时交易"
#: www/views/walletSelector.html:49
msgid "Insufficient funds"
msgstr "资金不足"
#: www/views/amount.html:42
msgid "Change Currency"
msgstr "更改货币"
#: www/views/amount.html:49
msgid "Available Funds"
msgstr "可用资金"
#: www/views/amount.html:59
msgid "Use All Available Funds"
msgstr "使用所有可用资金"
#: www/views/amount.html:99
msgid "Next"
msgstr "下一步"
msgstr ""
#: www/views/preferencesBitpayServices.html:23
msgid "Accounts"
@ -226,20 +206,6 @@ msgstr "差不多完成了 !让我们回顾一下。"
msgid "Alternative Currency"
msgstr "替代货币"
#: www/views/tab-settings.html:75
msgid "Price Display"
msgstr "价格显示"
#: src/js/controllers/tab-settings.js:19
#: www/views/preferencesPriceDisplay.html:12
msgid "Fiat"
msgstr "法币"
#: src/js/controllers/tab-settings.js:19
#: www/views/preferencesPriceDisplay.html:15
msgid "Cryptocurrency"
msgstr "加密货币"
#: src/js/controllers/buyAmazon.js:98
msgid "Amazon.com is not available at this moment. Please try back later."
msgstr "亚马逊服务器暂时无法访问,请稍候再试。"
@ -397,12 +363,12 @@ msgstr "比特币地址"
#: www/views/cashScan.html:4
msgid "Bitcoin Cash (BCH) Balances"
msgstr "Bitcoin Cash (BCH) 余额"
msgstr ""
#: www/views/preferencesCash.html:3
#: www/views/tab-settings.html:47
msgid "Bitcoin Cash Support"
msgstr "Bitcoin Cash 支持"
msgstr ""
#: www/views/tab-home.html:98
#: www/views/tab-settings.html:115
@ -418,7 +384,7 @@ msgstr "比特币网络手续费策略"
#: www/views/tab-home.html:83
#: www/views/tab-settings.html:107
msgid "Bitcoin Core Wallets"
msgstr "Bitcoin Core 钱包"
msgstr ""
#: src/js/services/incomingData.js:151
msgid "Bitcoin cash Payment"
@ -471,7 +437,6 @@ msgid "Buy &amp; Sell Bitcoin"
msgstr "购买或出售比特币"
#: www/views/tab-send.html:35
#: src/js/services/buyAndSellService.js:26
msgid "Buy Bitcoin"
msgstr "购买比特币"
@ -520,7 +485,7 @@ msgid "Cannot Create Wallet"
msgstr "不能创建钱包"
#: src/js/services/profileService.js:442
msgid "Cannot join the same wallet more than once"
msgid "Cannot join the same wallet more that once"
msgstr "无法重复加入同一个钱包"
#: www/views/includes/bitpayCardsCard.html:2
@ -654,14 +619,10 @@ msgstr "正在连接 Glidera..."
msgid "Connection reset by peer"
msgstr "连接被对方重置"
#: www/views/tab-send.html:85
#: www/views/tab-send.html:45
msgid "Contacts"
msgstr "联系人"
#: www/views/tab-send.html:86
msgid "Saved frequently used addresses"
msgstr "保存的常用地址"
#: www/views/onboarding/notifications.html:9
msgid "Continue"
msgstr "继续"
@ -692,11 +653,10 @@ msgstr "Copayer 加入"
#: www/views/preferencesInformation.html:94
msgid "Copayer {{$index}}"
msgstr "Copayer {{$index}}"
msgstr ""
#: src/js/controllers/copayers.js:79
#: src/js/controllers/export.js:193
#: src/js/controllers/confirm.js:41
#: www/views/includes/copyToClipboard.html:4
msgid "Copied to clipboard"
msgstr "已复制到剪贴板"
@ -863,7 +823,7 @@ msgstr "创建自己的免费钱包"
#: www/views/onboarding/tour.html:51
#: www/views/tab-home.html:75
#: www/views/tab-send.html:75
#: www/views/tab-send.html:36
msgid "Create bitcoin wallet"
msgstr "创建比特币的钱包"
@ -1017,7 +977,7 @@ msgstr "已达到空地址限制。无法生成新的地址。"
#: www/views/preferencesCash.html:17
msgid "Enable Bitcoin Cash wallet creation and operation within the App."
msgstr "在应用内启用 Bitcoin Cash 创建和操作。"
msgstr ""
#: www/views/tab-scan.html:19
msgid "Enable camera access in your device settings to get started."
@ -1033,7 +993,7 @@ msgstr "启用推式通知"
#: www/views/preferencesNotifications.html:33
msgid "Enable sound"
msgstr "启用声音"
msgstr ""
#: www/views/tab-scan.html:18
msgid "Enable the camera to get started."
@ -1041,7 +1001,7 @@ msgstr "使该摄像机开始。"
#: www/views/tab-settings.html:49
msgid "Enabled"
msgstr "已启用"
msgstr ""
#: src/js/services/walletService.js:1047
#: src/js/services/walletService.js:1062
@ -1316,7 +1276,6 @@ msgstr "供审计目的"
#: www/views/modals/txp-details.html:74
#: www/views/topup.html:34
#: www/views/tx-details.html:52
#: www/views/review.html:22
msgid "From"
msgstr "来自"
@ -1377,6 +1336,10 @@ msgid "Get news and updates from BitPay"
msgstr "从 BitPay 获取新闻和更新"
#: www/views/onboarding/welcome.html:8
msgctxt "button"
msgid "Get started"
msgstr "开始使用"
#: www/views/bitpayCard.html:49
msgid "Get started"
msgstr "马上体验"
@ -1623,7 +1586,7 @@ msgstr "网络地址不正确"
#: src/js/controllers/confirm.js:306
#: src/js/services/bwcError.js:44
msgid "Insufficient confirmed funds"
msgstr "确认的资金不足"
msgstr ""
#: src/js/controllers/topup.js:165
#: src/js/controllers/topup.js:177
@ -2048,7 +2011,7 @@ msgstr "好的"
#: www/views/modals/tx-status.html:36
#: www/views/modals/tx-status.html:46
msgid "OKAY"
msgstr "确定"
msgstr ""
#: www/views/modals/terms.html:15
msgid "Official English Disclaimer"
@ -2090,7 +2053,7 @@ msgstr "打开 GitHub 项目"
#: src/js/controllers/bitpayCard.js:123
#: src/js/controllers/tx-details.js:192
msgid "Open Explorer"
msgstr "打开浏览器"
msgstr ""
#: www/views/tab-scan.html:22
msgid "Open Settings"
@ -2106,7 +2069,7 @@ msgstr "打开网站"
#: src/js/controllers/preferencesCash.js:32
msgid "Open bitcoincash.org?"
msgstr "打开 bitcoincash.org"
msgstr ""
#: src/js/controllers/cashScan.js:18
msgid "Open the recovery tool."
@ -2200,10 +2163,6 @@ msgstr "支付被拒绝"
msgid "Payment Sent"
msgstr "支付已发送"
#: www/views/includes/slideToAcceptSuccess.html:12
msgid "Share this transaction"
msgstr "分享此交易"
#: www/views/modals/txp-details.html:32
msgid "Payment accepted, but not yet broadcasted"
msgstr "支付已被接受,但尚未广播"
@ -2221,8 +2180,8 @@ msgid "Payment details"
msgstr "支付明细"
#: www/views/modals/paypro.html:6
msgid "Payment Request"
msgstr "付请求"
msgid "Payment request"
msgstr "付请求"
#: www/views/mercadoLibreCards.html:22
#: www/views/modals/mercadolibre-card-details.html:39
@ -2552,7 +2511,7 @@ msgstr "请扫描你的指纹"
#: www/views/preferencesCash.html:23
msgid "Scan your wallets for Bitcoin Cash"
msgstr "扫描您的 Bitcoin Cash 钱包"
msgstr ""
#: src/js/services/onGoingProcess.js:30
msgid "Scanning Wallet funds..."
@ -2574,14 +2533,6 @@ msgstr "搜索交易"
msgid "Search or enter bitcoin address"
msgstr "搜索或输入比特币地址"
#: src/js/controllers/tab-send.js:28
msgid "Clipboard"
msgstr "剪贴板"
#: src/js/controllers/tab-send.js:29
msgid "Your Clipboard is empty"
msgstr "您的剪贴板为空"
#: www/views/modals/search.html:16
msgid "Search transactions"
msgstr "搜索交易"
@ -2640,68 +2591,9 @@ msgid "Send by email"
msgstr "通过电邮发送"
#: src/js/controllers/confirm.js:177
#: src/js/controllers/tab-send.js:94
msgid "Send from"
msgstr "从发送"
#: src/js/controllers/tab-send.js:77
msgid "Send to"
msgstr "发送到"
#: www/views/tab-send.html:20
msgid "Paste Clipboard"
msgstr "粘贴剪贴板"
#: www/views/tab-send.html:21
msgid "Paste Address"
msgstr "粘贴地址"
#: www/views/tab-send.html:27
msgid "Transfer between wallets"
msgstr "在钱包之间转账"
#: www/views/tab-send.html:35
msgid "Scan QR Code"
msgstr "扫描二维码"
#: www/views/tab-send.html:46
msgid "Send Bitcoin faster!"
msgstr "更快地发送比特币!"
#: www/views/tab-send.html:50
msgid "Save frequently used addresses and send them Bitcoin in just one tap"
msgstr "保存常用地址,只需点击一下即可将比特币发送到这些地址"
#: www/views/tab-send.html:55
msgid "Add your first contact"
msgstr "添加您的第一个联系人"
#: www/views/tab-send.html:65
msgid "Your Bitcoin wallet is empty"
msgstr "您的比特币钱包为空"
#: www/views/tab-send.html:69
msgid "To get started, buy Bitcoin Cash (BCH) or Bitcoin Core (BTC), or share your address."
msgstr "首先,购买 Bitcoin Cash (BCH) 或 Bitcoin Core (BTC),或者共享您的地址。"
#: www/views/tab-send.html:70
msgid "You can receive bitcoin from any wallet or service."
msgstr "您可以从任何钱包或服务接收比特币。"
#: www/views/tab-send.html:72
#: www/views/shapeshift.html:23
#: www/views/tab-send.html:33
msgid "To get started, you'll need to create a bitcoin wallet and get some bitcoin."
msgstr "若要开始,您将需要创建一个比特币的钱包,并获得一些比特币。"
#: www/views/tab-send.html:74
msgid "Buy Bitcoin now"
msgstr "立即购买比特币"
#: www/views/tab-send.html:76
msgid "Show my address"
msgstr "显示我的地址"
#: www/views/includes/itemSelector.html:8
msgid "Send max amount"
msgstr "发送最大数量"
@ -2918,21 +2810,16 @@ msgstr "超级经济"
#: www/views/preferencesCash.html:11
msgid "Support Bitcoin Cash"
msgstr "支持 Bitcoin Cash"
msgstr ""
#: www/views/paperWallet.html:7
msgid "Sweep"
msgstr "扫描"
#: www/views/includes/incomingDataMenu.html:89
msgctxt "List item"
msgid "Sweep paper wallet"
msgstr "清空纸钱包"
#: www/views/paperWallet.html:3
msgctxt "Page title"
msgid "Sweep Paper Wallet"
msgstr "清空纸钱包"
msgid "Sweep paper wallet"
msgstr "Sweep 纸钱包"
#: src/js/services/onGoingProcess.js:33
msgid "Sweeping Wallet..."
@ -2973,7 +2860,7 @@ msgstr "使用条款"
#: www/views/tab-create-personal.html:118
#: www/views/tab-import-phrase.html:68
msgid "Testnet"
msgstr "测试网"
msgstr ""
#: www/views/includes/incomingDataMenu.html:61
msgid "Text"
@ -3100,14 +2987,6 @@ msgstr "此应用程序商店你比特币与尖端的安全。"
msgid "This bitcoin payment request has expired."
msgstr "这比特币付款请求已过期。"
#: www/views/review.html:55
msgid "Payment expires:"
msgstr "付款到期:"
#: www/views/review.html:56
msgid "Payment request has expired"
msgstr "付款请求已过期"
#: www/views/join.html:133
#: www/views/tab-create-personal.html:103
#: www/views/tab-create-shared.html:132
@ -3149,6 +3028,10 @@ msgstr "发送到"
msgid "To get started, buy bitcoin or share your address. You can receive bitcoin from any wallet or service."
msgstr "若要开始,请买比特币或共享您的地址。你可以从任何钱包或服务接收比特币。"
#: www/views/tab-send.html:33
msgid "To get started, you'll need to create a bitcoin wallet and get some bitcoin."
msgstr "若要开始,您将需要创建一个比特币的钱包,并获得一些比特币。"
#: src/js/services/bitpayAccountService.js:73
msgid "To {{reason}} you must first add your BitPay account - {{email}}"
msgstr "到 {{reason}},您必须首先添加您的 BitPay 帐户-{{email}}"
@ -3161,26 +3044,6 @@ msgstr "在进展充值..."
msgid "Top up {{amountStr}} to debit card ({{cardLastNumber}})"
msgstr "充值 {{amountStr}},记入借方卡 ({{cardLastNumber}})"
#: www/views/shapeshift.html:30
msgid "Start ShapeShift"
msgstr "开始 ShapeShift"
#: www/views/shapeshift.html:30
msgid "Exchange your BTC to BCH in minutes."
msgstr "在数分钟内将您的 BTC 兑换为 BCH。"
#: www/views/shapeshift.html:30
msgid "To start the process you need to add funds to your wallet."
msgstr "要开始兑换,您需要先向钱包中充入资金。"
#: www/views/shapeshift.html:30
msgid "The process is fast and you will receive the exchanged amount in your wallet."
msgstr "兑换操作非常快,您将在自己的钱包中收到兑换后的金额。"
#: www/views/shapeshift.html:34
msgid "This service is provided by the third-party ShapeShift, who will charge a small fee for the service. The fee will be shown before you start the transaction."
msgstr "此服务由第三方 ShapeShift 提供,他们将收取少量服务费。所需费用将在您开始交易之前显示。"
#: www/views/buyAmazon.html:61
#: www/views/buyMercadoLibre.html:60
#: www/views/modals/wallet-balance.html:23
@ -3337,7 +3200,7 @@ msgstr "查看服务条款"
#: src/js/controllers/bitpayCard.js:122
#: src/js/controllers/tx-details.js:191
msgid "View Transaction on Explorer.Bitcoin.com"
msgstr "在 Explorer.Bitcoin.com 上查看交易"
msgstr ""
#: src/js/controllers/tab-home.js:148
msgid "View Update"
@ -3733,7 +3596,7 @@ msgstr "我"
#: www/views/addressbook.add.html:32
msgid "name@example.com"
msgstr "name@example.com"
msgstr ""
#: www/views/preferencesHistory.html:15
msgid "preparing..."
@ -3773,171 +3636,3 @@ msgstr "下载的 {{updatingTxHistoryProgress}} 交易"
msgid "{{wallet.m}}-of-{{wallet.n}}"
msgstr "{{wallet.m}}{{wallet.n}}"
#: src/js/services/shapeshiftService.js:8
msgid "Shapeshift"
msgstr "Shapeshift"
#: www/views/includes/community.html:3
msgid "Community"
msgstr "社区"
#: src/js/services/communityService.js:40
msgid "Bitcoin Cash Reddit"
msgstr "Bitcoin Cash Reddit"
#: src/js/services/communityService.js:47
msgid "Bitcoin.com Twitter"
msgstr "Bitcoin.com Twitter"
#: www/views/includes/nextSteps.html:3
msgid "Explore Bitcoin.com"
msgstr "探索 Bitcoin.com"
#: src/js/services/bitcoincomService.js:21
msgid "Bitcoin Cash Games"
msgstr "Bitcoin Cash 游戏"
#: www/views/includes/community.html:29
msgid "Share the Wallet App"
msgstr "分享钱包应用"
#: src/js/services/bitcoincomService.js:28
msgid "News"
msgstr "新闻"
#: src/js/services/bitcoincomService.js:35
msgid "Mining Pool"
msgstr "矿池"
#: src/js/services/bitcoincomService.js:42
msgid "Tools"
msgstr "工具"
#: src/js/services/bitcoincomService.js:49
msgid "Bitcoin Price Charts"
msgstr "比特币价格图表"
#: src/js/services/bitcoincomService.js:56
msgid "Free Bitcoin Cash"
msgstr "免费的 Bitcoin Cash"
#: www/views/tab-home.html:30
msgid "Your Bitcoin Wallets are ready!"
msgstr "您的比特币钱包已就绪!"
#: src/js/controllers/amount.js:49
msgid "Address does not contain currency information, please make sure you are sending the correct currency."
msgstr "地址未包含货币信息,请确保您发送的货币正确。"
#: www/views/review.html:4
msgid "Review Transaction"
msgstr "检查交易"
#: src/js/controllers/review.controller.js:36
msgid "You are sending"
msgstr "您将发送"
#: src/js/controllers/review.controller.js:66
msgid "You are shifting"
msgstr "您将兑换"
#: www/views/review.html:36
msgid "To:"
msgstr "到:"
#: www/views/review.html:53
msgid "Add personal note"
msgstr "添加个人注释"
#: www/views/review.html:87
msgid "Suggested by merchant:"
msgstr "商户建议:"
#: src/js/controllers/review.controller.js:37
msgid "Enter text here"
msgstr "在此处输入文本"
#: www/views/review.html:57
msgid "Personal note:"
msgstr "个人注释:"
#: www/views/review.html:69
msgid "Less than 1 cent"
msgstr "少于 1 美分"
#: src/js/services/incomingData.js:129
msgid "This invoice is no longer accepting payments"
msgstr "此发票不再接受付款"
#: www/views/amount.html.js:60
msgid "Send Maximum Amount"
msgstr "发送最大金额"
#: src/js/controllers/amount.controller.js:239
msgid "Unknown error."
msgstr "未知错误。"
#: www/views/paperWallet.html:48
msgid "No Bitcoin Cash wallet to transfer funds to found."
msgstr "未找到可以转入资金的 Bitcoin Cash 钱包。"
#: www/views/paperWallet.html:54
msgid "No Bitcoin Cash found."
msgstr "未找到 Bitcoin Cash。"
#: www/views/paperWallet.html:60
msgid "Bitcoin Core found:"
msgstr "已找到 Bitcoin Core"
#: www/views/paperWallet.html:98
msgid "No Bitcoin Core wallet to transfer funds to found."
msgstr "未找到可以转入资金的 Bitcoin Core 钱包。"
#: www/views/paperWallet.html:104
msgid "No Bitcoin Core found."
msgstr "未找到 Bitcoin Core。"
#: src/js/controllers/tab-scan.js:120
msgid "Scan Failed"
msgstr "扫描失败"
#: src/js/controllers/tab-scan.js:121
msgid "Data not recognised."
msgstr "数据未被识别。"
#: src/js/controllers/tab-scan.js:121
msgid "Unsupported"
msgstr "不受支持"
#: src/js/controllers/tab-scan.js:121
msgid "Testnet is not supported."
msgstr "不支持测试网。"
#: www/views/includes/incomingDataMenu.html:81
msgid "URL"
msgstr "网址"
#: www/views/includes/incomingDataMenu.html:90
msgid "Open in web browser"
msgstr "在网络浏览器中打开"
#: src/js/services/shapeshift.service.js.html:90
msgid "Invalid address"
msgstr "地址无效"
#: src/js/services/shapeshift.service.js.html:90
msgid "Amount is not defined"
msgstr "未定义金额"
#: src/js/services/shapeshift.service.js.html:90
msgid "Amount is below the minimun"
msgstr "金额低于最低金额"
#: src/js/services/shapeshift.service.js.html:90
msgid "Amount is above the limit"
msgstr "金额高于限额"
#: src/js/services/shapeshift.service.js.html:90
msgid "Invalid response from Shapeshift"
msgstr "Shapeshift 的响应无效"

View file

@ -8,7 +8,7 @@
"postinstall": "npm run apply:copay && echo && echo \"Repo configured for standard Copay distribution. To switch to the BitPay distribution, run 'npm run apply:bitpay'.\" && echo",
"start": "echo && echo \"Choose a distribution by running 'npm run apply:copay' or 'npm run apply:bitpay'.\" && echo",
"apply:copay": "npm i fs-extra@0.30 && cd app-template && node apply.js copay && cd .. && npm i",
"apply:bitcoincom": "npm i fs-extra && cd app-template && node apply.js bitcoincom && npm i && cordova prepare && cd ../ && ./fix-asn1.sh",
"apply:bitcoincom": "npm i fs-extra && cd app-template && node apply.js bitcoincom && npm i && cordova prepare",
"apply:bitpay": "npm i fs-extra@0.30 && cd app-template && node apply.js bitpay && cd .. && npm i",
"unstage-package": "git reset package.json",
"clean-all": "git clean -dfx"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 425 B

View file

@ -178,17 +178,11 @@ def codesign_app(config, args):
plistlib.writePlist(child_entitlements, tmp_child_entitlements)
info('Child entitlements: %s' % tmp_child_entitlements)
libffmpeg = glob(os.path.join(args.output, 'Contents/Versions/55.0.2883.87/nwjs Framework.framework/Versions/A'), 'libffmpeg.dylib', returnOnFound=True)
system('codesign --deep --force --verbose --verify --sign "%s" --entitlements %s --deep "%s"' % (identity, tmp_child_entitlements, libffmpeg))
libnode = glob(os.path.join(args.output, 'Contents/Versions/55.0.2883.87/nwjs Framework.framework/Versions/A'), 'libnode.dylib', returnOnFound=True)
system('codesign --deep --force --verbose --verify --sign "%s" --entitlements %s --deep "%s"' % (identity, tmp_child_entitlements, libnode))
helperApp = glob(args.output, 'nwjs Helper.app', returnOnFound=True)
system('codesign --deep --force --verbose --verify --sign "%s" --entitlements %s --deep "%s"' % (identity, tmp_child_entitlements, helperApp))
framework = glob(args.output, 'nwjs Framework.framework', returnOnFound=True)
system('codesign --deep --force --verbose --verify --sign "%s" --entitlements %s --deep "%s"' % (identity, tmp_child_entitlements, framework))
system('codesign -f --verbose -s "%s" --entitlements %s --deep "%s"' % (identity, tmp_child_entitlements, framework))
helperApp = glob(args.output, 'nwjs Helper.app', returnOnFound=True)
system('codesign -f --verbose -s "%s" --entitlements %s --deep "%s"' % (identity, tmp_child_entitlements, helperApp))
## sign parent app
(_, tmp_parent_entitlements) = tempfile.mkstemp()
if config.has_option('Sign', 'ParentEntitlements'):

View file

@ -5,9 +5,7 @@
<key>com.apple.security.app-sandbox</key>
<true/>
<key>com.apple.security.application-groups</key>
<array>
<string>299HJ3G3BP.com.bitcoin.mwallet.mac</string>
</array>
<string>$GROUPID</string>
<key>com.apple.security.files.user-selected.read-only</key>
<true/>
<key>com.apple.security.network.client</key>

View file

@ -1,25 +1,21 @@
ext {
ANDROID_SUPPORT_V4_VERSION = '26.1.0'
}
configurations.all {
resolutionStrategy {
force "com.android.support:support-v4:26.1.0"
force "com.google.android.gms:play-services-auth:11.8.0"
force "com.google.android.gms:play-services-identity:11.8.0"
force "com.google.android.gms:play-services-ads:11.8.0"
force "com.google.android.gms:play-services-base:11.8.0"
force "com.google.android.gms:play-services-gcm:11.8.0"
force "com.google.android.gms:play-services-analytics:11.8.0"
force "com.google.android.gms:play-services-location:11.8.0"
force "com.google.android.gms:play-services-basement:11.8.0"
force "com.google.android.gms:play-services-tagmanager:11.8.0"
force 'com.google.firebase:firebase-core:11.8.0'
force 'com.google.firebase:firebase-crash:11.8.0'
force 'com.google.firebase:firebase-auth:11.8.0'
force 'com.google.firebase:firebase-common:11.8.0'
force 'com.google.firebase:firebase-config:11.8.0'
force 'com.google.firebase:firebase-perf:11.8.0'
force 'com.google.firebase:firebase-messaging:11.8.0'
}
resolutionStrategy {
force "com.android.support:support-v4:26.1.0"
force "com.google.android.gms:play-services-auth:11.8.0"
force "com.google.android.gms:play-services-identity:11.8.0"
force "com.google.android.gms:play-services-ads:11.8.0"
force "com.google.android.gms:play-services-base:11.8.0"
force "com.google.android.gms:play-services-gcm:11.8.0"
force "com.google.android.gms:play-services-analytics:11.8.0"
force "com.google.android.gms:play-services-location:11.8.0"
force "com.google.android.gms:play-services-basement:11.8.0"
force "com.google.android.gms:play-services-tagmanager:11.8.0"
force 'com.google.firebase:firebase-core:11.8.0'
force 'com.google.firebase:firebase-crash:11.8.0'
force 'com.google.firebase:firebase-auth:11.8.0'
force 'com.google.firebase:firebase-common:11.8.0'
force 'com.google.firebase:firebase-config:11.8.0'
force 'com.google.firebase:firebase-perf:11.8.0'
force 'com.google.firebase:firebase-messaging:11.8.0'
}
}

View file

@ -19,9 +19,7 @@ var modules = [
'copayApp.controllers',
'copayApp.directives',
'copayApp.addons',
'bitcoincom.controllers',
'bitcoincom.directives',
'bitcoincom.services'
'bitcoincom.directives'
];
var copayApp = window.copayApp = angular.module('copayApp', modules);
@ -31,6 +29,4 @@ angular.module('copayApp.services', []);
angular.module('copayApp.controllers', []);
angular.module('copayApp.directives', []);
angular.module('copayApp.addons', []);
angular.module('bitcoincom.controllers', []);
angular.module('bitcoincom.directives', []);
angular.module('bitcoincom.services', []);

View file

@ -21,9 +21,6 @@ angular.module('copayApp.controllers').controller('addressbookAddController', fu
$timeout(function() {
var form = addressbookForm;
if (data && form) {
if (data.result) {
data = data.result;
}
data = data.replace(/^bitcoin(cash)?:/, '');
form.address.$setViewValue(data);
form.address.$isValid = true;
@ -39,9 +36,9 @@ angular.module('copayApp.controllers').controller('addressbookAddController', fu
addressbook.address = translated.legacy;
}
var channel = "ga";
if (platformInfo.isCordova) {
channel = "firebase";
var channel = "firebase";
if (platformInfo.isNW) {
channel = "ga";
}
var log = new window.BitAnalytics.LogEvent("contact_created", [{
"coin": $scope.addressbookEntry.coin

View file

@ -1,6 +1,6 @@
'use strict';
angular.module('copayApp.controllers').controller('addressbookViewController', function($scope, sendFlowService, $state, $timeout, lodash, addressbookService, popupService, $ionicHistory, platformInfo, gettextCatalog, configService, bitcoinCashJsService) {
angular.module('copayApp.controllers').controller('addressbookViewController', function($scope, $state, $timeout, lodash, addressbookService, popupService, $ionicHistory, platformInfo, gettextCatalog, configService, bitcoinCashJsService) {
var config = configService.getSync();
var defaults = configService.getDefaults();
@ -21,14 +21,23 @@ angular.module('copayApp.controllers').controller('addressbookViewController', f
});
$scope.sendTo = function() {
var stateParams = {
data: $scope.addressbookEntry.address,
toName: $scope.addressbookEntry.name,
toEmail: $scope.addressbookEntry.email,
coin: $scope.addressbookEntry.coin
};
sendFlowService.start(stateParams);
$ionicHistory.removeBackView();
$state.go('tabs.send');
$timeout(function() {
var to = '';
if ($scope.addressbookEntry.coin == 'bch') {
var a = 'bitcoincash:' + $scope.addressbookEntry.address;
to = bitcoinCashJsService.readAddress(a).legacy;
} else {
to = $scope.addressbookEntry.address;
}
$state.transitionTo('tabs.send.amount', {
toAddress: to,
toName: $scope.addressbookEntry.name,
toEmail: $scope.addressbookEntry.email,
coin: $scope.addressbookEntry.coin
});
}, 100);
};
$scope.remove = function(addressbookEntry) {

View file

@ -1,774 +0,0 @@
'use strict';
(function(){
angular
.module('bitcoincom.controllers')
.controller('amountController', amountController);
function amountController(configService, $filter, gettextCatalog, $ionicHistory, $ionicModal, $ionicScrollDelegate, lodash, $log, nodeWebkitService, rateService, $scope, $state, $timeout, sendFlowService, shapeshiftService, txFormatService, platformInfo, ongoingProcess, popupService, profileService, walletService, $window) {
var vm = this;
// Variables
vm.allowSend = false;
vm.altCurrencyList = [];
vm.alternativeAmount = '';
vm.alternativeUnit = '';
vm.amount = '0';
vm.availableFunds = '';
vm.canSendAllAvailableFunds = true;
vm.errorMessage = '';
// Use insufficient for logic, as when the amount is invalid, funds being
// either sufficent or insufficient doesn't make sense.
vm.fundsAreInsufficient = false;
vm.globalResult = '';
vm.isRequestingSpecificAmount = false;
vm.listComplete = false;
vm.lastUsedPopularList = [];
vm.maxAmount = 0;
vm.minAmount = 0;
vm.sendableFunds = '';
vm.showSendMaxButton = false;
vm.showSendLimitMaxButton = false;
vm.thirdParty = false;
vm.unit = '';
// Functions
vm.changeUnit = changeUnit;
vm.close = close;
vm.findCurrency = findCurrency;
vm.finish = finish;
vm.goBack = goBack;
vm.loadMore = loadMore;
vm.next = next;
vm.openPopup = openPopup;
vm.pushDigit = pushDigit;
vm.removeDigit = removeDigit;
vm.save = save;
vm.sendMax = sendMax;
$scope.$on('$ionicView.beforeEnter', onBeforeEnter);
$scope.$on('$ionicView.leave', onLeave);
var LENGTH_EXPRESSION_LIMIT = 19;
var LENGTH_BEFORE_COMMA_EXPRESSION_LIMIT = 8;
var LENGTH_AFTER_COMMA_EXPRESSION_LIMIT = 8;
var altCurrencyModal = null;
var altUnitIndex = 0;
var availableUnits = [];
var canSendMax = true;
var fiatCode;
var isNW = platformInfo.isNW;
var isAndroid = platformInfo.isAndroid;
var isIos = platformInfo.isIOS;
var lastUsedAltCurrencyList = [];
var passthroughParams = {};
var satToUnit;
var transactionSendableAmount = {
crypto: '',
satoshis: null
};
var unitDecimals;
var unitIndex = 0;
var unitToSatoshi;
var useSendMax = false;
var walletSpendableAmount = {
crypto: '',
satoshis: null
};
function onLeave() {
angular.element($window).off('keydown');
}
function onBeforeEnter(event, data) {
if (data.direction == "back") {
sendFlowService.state.pop();
}
initCurrencies();
passthroughParams = sendFlowService.state.getClone();
console.log('amount onBeforeEnter after back sendflow ', passthroughParams);
vm.fromWalletId = passthroughParams.fromWalletId;
vm.toWalletId = passthroughParams.toWalletId;
vm.minAmount = parseFloat(passthroughParams.minAmount);
vm.maxAmount = parseFloat(passthroughParams.maxAmount);
vm.isRequestingSpecificAmount = !passthroughParams.fromWalletId;
vm.showSendMaxButton = !vm.isRequestingSpecificAmount;
var config = configService.getSync().wallet.settings;
unitToSatoshi = config.unitToSatoshi;
satToUnit = 1 / unitToSatoshi;
unitDecimals = config.unitDecimals;
setAvailableUnits();
updateUnitUI();
var reNr = /^[1234567890\.]$/;
var reOp = /^[\*\+\-\/]$/;
if (!isAndroid && !isIos) {
angular.element($window).on('keydown', function(e) {
if (!e.key) return;
if (e.which === 8) { // you can add others here inside brackets.
if (!altCurrencyModal) {
e.preventDefault();
vm.removeDigit();
}
}
if (e.key.match(reNr)) {
vm.pushDigit(e.key);
} else if (e.key.match(reOp)) {
pushOperator(e.key);
} else if (e.keyCode === 86) {
if (e.ctrlKey || e.metaKey) processClipboard();
} else if (e.keyCode === 13) vm.finish();
$timeout(function() {
$scope.$apply();
});
});
}
resetAmount();
processAmount();
$timeout(function() {
$ionicScrollDelegate.resize();
}, 10);
function setAvailableUnits() {
var defaults = configService.getDefaults();
var configCache = configService.getSync();
availableUnits = [];
var coinFromWallet = '';
if (passthroughParams.fromWalletId) {
var fromWallet = profileService.getWallet(passthroughParams.fromWalletId);
coinFromWallet = fromWallet.coin;
} else {
var toWallet = profileService.getWallet(passthroughParams.toWalletId);
coinFromWallet = toWallet.coin;
}
if (coinFromWallet === 'bch') {
availableUnits.push({
name: 'Bitcoin Cash',
id: 'bch',
shortName: (configCache.bitcoinCashAlias || defaults.bitcoinCashAlias).toUpperCase(),
});
};
if (coinFromWallet === 'btc') {
availableUnits.push({
name: 'Bitcoin',
id: 'btc',
shortName: (configCache.bitcoinAlias || defaults.bitcoinAlias).toUpperCase(),
});
}
unitIndex = 0;
// currency have preference
var fiatName;
if (passthroughParams.currency) {
fiatCode = passthroughParams.currency;
altUnitIndex = unitIndex
unitIndex = availableUnits.length;
} else {
fiatCode = config.alternativeIsoCode || 'USD';
fiatName = config.alternanativeName || fiatCode;
altUnitIndex = availableUnits.length;
}
availableUnits.push({
name: fiatName || fiatCode,
// TODO
id: fiatCode,
shortName: fiatCode,
isFiat: true,
});
unitIndex = lodash.findIndex(availableUnits, {
isFiat: true
});
altUnitIndex = 0;
if (passthroughParams.fromWalletId) {
var fromWallet = profileService.getWallet(passthroughParams.fromWalletId);
updateAvailableFundsFromWallet(fromWallet);
}
if (passthroughParams.thirdParty) {
vm.thirdParty = passthroughParams.thirdParty; // Parse stringified JSON-object
if (vm.thirdParty) {
initShapeshift();
}
}
}
}
function goBack() {
sendFlowService.router.goBack();
}
function initShapeshift() {
if (vm.thirdParty.id === 'shapeshift') {
vm.thirdParty.data = vm.thirdParty.data || {};
vm.fromWallet = profileService.getWallet(vm.fromWalletId);
vm.toWallet = profileService.getWallet(vm.toWalletId);
vm.showSendMaxButton = false;
vm.showSendLimitMaxButton = false;
vm.canSendAllAvailableFunds = false;
ongoingProcess.set('connectingShapeshift', true);
shapeshiftService.getMarketData(vm.fromWallet.coin, vm.toWallet.coin, function onMarketData(err, data) {
ongoingProcess.set('connectingShapeshift', false);
if (err) {
// Error stop here
popupService.showAlert(gettextCatalog.getString('Shapeshift Error'), err.message, function () {
goBack();
});
} else {
vm.thirdParty.data.minAmount = vm.minAmount = parseFloat(data.minimum);
vm.thirdParty.data.maxAmount = vm.maxAmount = parseFloat(data.maxLimit);
setMaximumButtonFromWallet(vm.fromWallet);
}
});
}
}
function paste(value) {
vm.amount = value;
processAmount();
$timeout(function() {
$scope.$apply();
});
}
function processClipboard() {
if (!isNW) return;
var value = nodeWebkitService.readFromClipboard();
if (value && evaluate(value) > 0) paste(evaluate(value));
}
function sendMax() {
if (canSendMax) {
useSendMax = true;
finish();
} else {
var transactionSendableAmountInUnits = transactionSendableAmount.satoshis * satToUnit;
if (vm.minAmount && transactionSendableAmountInUnits < vm.minAmount) {
popupService.showAlert(
gettextCatalog.getString('Insufficient funds'),
gettextCatalog.getString('Amount below minimum allowed')
);
} else {
// Need to be precise, so use crypto directly rather than fiat with exchange rate
if (availableUnits[unitIndex].isFiat) {
var tempIndex = altUnitIndex;
altUnitIndex = unitIndex;
unitIndex = tempIndex;
}
vm.amount = transactionSendableAmountInUnits.toFixed(LENGTH_AFTER_COMMA_EXPRESSION_LIMIT);
useSendMax = true;
finish();
}
}
}
function updateUnitUI() {
vm.unit = availableUnits[unitIndex].shortName;
vm.alternativeUnit = availableUnits[altUnitIndex].shortName;
processAmount();
$log.debug('Update unit coin @amount unit:' + vm.unit + " alternativeUnit:" + vm.alternativeUnit);
}
function changeUnit() {
vm.amount = '0';
if (!(availableUnits[unitIndex].isFiat && availableUnits.length > 2 && altUnitIndex == 0)) {
unitIndex++;
if (unitIndex >= availableUnits.length) unitIndex = 0;
}
if (availableUnits[unitIndex].isFiat) {
altUnitIndex = altUnitIndex == 0 && availableUnits.length > 2 ? 1 : 0;
} else {
altUnitIndex = lodash.findIndex(availableUnits, {
isFiat: true
});
}
updateAvailableFundsStringIfNeeded();
updateUnitUI();
}
function pushDigit(digit) {
if (vm.amount && digit != '.') {
var amountSplitByComma = vm.amount.split('.');
if (amountSplitByComma.length > 1 && amountSplitByComma[1].length >= LENGTH_AFTER_COMMA_EXPRESSION_LIMIT) return;
if (amountSplitByComma.length == 1 && amountSplitByComma[0].length >= LENGTH_BEFORE_COMMA_EXPRESSION_LIMIT) return;
}
if (vm.amount && vm.amount.length >= LENGTH_EXPRESSION_LIMIT) return;
if (vm.amount.indexOf('.') > -1 && digit == '.') return;
if (vm.amount == '0' && digit == '0') return;
if (availableUnits[unitIndex].isFiat && vm.amount.indexOf('.') > -1 && vm.amount[vm.amount.indexOf('.') + 2]) return;
if (vm.amount == '0' && digit != '.') {
vm.amount = '';
}
if (vm.amount == '' && digit == '.') {
vm.amount = '0';
}
vm.amount = (vm.amount + digit).replace('..', '.');
processAmount();
}
function pushOperator(operator) {
if (!vm.amount || vm.amount.length == 0) return;
vm.amount = pushOperator(vm.amount);
function pushOperator(val) {
if (!isOperator(lodash.last(val))) {
return val + operator;
} else {
return val.slice(0, -1) + operator;
}
}
}
function isOperator(val) {
var regex = /[\/\-\+\x\*]/;
return regex.test(val);
}
function isExpression(val) {
var regex = /^\.?\d+(\.?\d+)?([\/\-\+\*x]\d?\.?\d+)+$/;
return regex.test(val);
}
function removeDigit() {
vm.amount = (vm.amount).toString().slice(0, -1);
processAmount();
}
function resetAmount() {
vm.amount = vm.alternativeAmount = vm.globalResult = '0';
vm.allowSend = false;
}
function openPopup() {
$ionicModal.fromTemplateUrl('views/modals/altCurrency.html', {
scope: $scope
}).then(function(modal) {
altCurrencyModal = modal;
altCurrencyModal.show();
});
}
function close() {
altCurrencyModal.remove();
altCurrencyModal = null;
}
function processAmount() {
var formatedValue = format(vm.amount);
var result = evaluate(formatedValue);
var amountInCrypto = 0;
if (lodash.isNumber(result)) {
vm.globalResult = isExpression(vm.amount) ? '= ' + processResult(result) : '';
if (availableUnits[unitIndex].isFiat) {
var a = fromFiat(result);
if (a) {
amountInCrypto = a;
var amountInSatoshis = a * unitToSatoshi;
vm.fundsAreInsufficient = !!passthroughParams.fromWalletId
&& walletSpendableAmount.satoshis !== null
&& walletSpendableAmount.satoshis < amountInSatoshis;
vm.alternativeAmount = txFormatService.formatAmount(amountInSatoshis, true);
vm.allowSend = lodash.isNumber(a)
&& a > 0
&& (!vm.minAmount || a >= vm.minAmount)
&& (!vm.maxAmount || a <= vm.maxAmount)
&& !vm.fundsAreInsufficient;
} else {
if (result) {
vm.alternativeAmount = 'N/A';
} else {
vm.alternativeAmount = null;
}
vm.fundsAreInsufficient = false;
vm.allowSend = false;
}
} else {
amountInCrypto = result;
vm.fundsAreInsufficient = passthroughParams.fromWalletId
&& walletSpendableAmount.satoshis !== null
&& walletSpendableAmount.satoshis < result * unitToSatoshi;
vm.alternativeAmount = $filter('formatFiatAmount')(toFiat(result));
vm.allowSend = lodash.isNumber(result)
&& result > 0
&& (!vm.minAmount || result >= vm.minAmount)
&& (!vm.maxAmount || result <= vm.maxAmount)
&& !vm.fundsAreInsufficient;
}
} else {
vm.fundsAreInsufficient = false;
}
if (vm.fundsAreInsufficient) {
vm.errorMessage = gettextCatalog.getString('Not enough available funds');
} else if (amountInCrypto && vm.thirdParty && vm.thirdParty.id === 'shapeshift') {
if (amountInCrypto < vm.minAmount) {
vm.errorMessage = gettextCatalog.getString('Amount is below minimum');
} else if (amountInCrypto > vm.maxAmount) {
vm.errorMessage = gettextCatalog.getString('Amount is above maximum');
} else {
vm.errorMessage = '';
}
} else {
vm.errorMessage = '';
}
}
function processResult(val) {
if (availableUnits[unitIndex].isFiat) return $filter('formatFiatAmount')(val);
else return txFormatService.formatAmount(val.toFixed(unitDecimals) * unitToSatoshi, true);
}
function fromFiat(val) {
return parseFloat((rateService.fromFiat(val, fiatCode, availableUnits[altUnitIndex].id) * satToUnit).toFixed(unitDecimals));
}
function toFiat(val) {
if (!rateService.getRate(fiatCode)) return;
return parseFloat((rateService.toFiat(val * unitToSatoshi, fiatCode, availableUnits[unitIndex].id)).toFixed(2));
}
function evaluate(val) {
var result;
try {
result = $scope.$eval(val);
} catch (e) {
return 0;
}
if (!lodash.isFinite(result)) return 0;
return result;
}
function format(val) {
if (!val) return;
var result = val.toString();
if (isOperator(lodash.last(val))) result = result.slice(0, -1);
return result.replace('x', '*');
}
function finish() {
var unit = availableUnits[unitIndex];
var uiAmount = evaluate(format(vm.amount));
var satoshis = 0;
if (unit.isFiat) {
satoshis = Math.floor(fromFiat(uiAmount) * unitToSatoshi);
} else {
satoshis = Math.floor(uiAmount * unitToSatoshi);
}
var confirmData = {
amount: (useSendMax && canSendMax) ? undefined : satoshis,
displayAddress: passthroughParams.displayAddress,
fromWalletId: passthroughParams.fromWalletId,
sendMax: useSendMax,
toAddress: passthroughParams.toAddress,
toWalletId: passthroughParams.toWalletId
};
if (vm.thirdParty) {
confirmData.thirdParty = vm.thirdParty;
}
if (!confirmData.fromWalletId) {
$state.transitionTo('tabs.paymentRequest.confirm', confirmData);
} else {
sendFlowService.goNext(confirmData);
useSendMax = false;
}
}
// Currency
var nextCurrencies = 10;
var completeAlternativeList = [];
var popularCurrencyList = [
{isoCode: 'USD', order: 0},
{isoCode: 'EUR', order: 1},
{isoCode: 'JPY', order: 2},
{isoCode: 'GBP', order: 3},
{isoCode: 'AUD', order: 4},
{isoCode: 'CAD', order: 5},
{isoCode: 'CHF', order: 6},
{isoCode: 'CNY', order: 7},
{isoCode: 'KRW', order: 8},
{isoCode: 'HKD', order: 9},
];
function initCurrencies() {
var unusedCurrencyList = [{
isoCode: 'LTL'
}, {
isoCode: 'BTC'
}, {
isoCode: 'BCC'
}, {
isoCode: 'BCH_BTC'
}, {
isoCode: 'BCH'
}];
rateService.whenAvailable(function() {
vm.listComplete = false;
var idx = lodash.indexBy(unusedCurrencyList, 'isoCode');
var idx2 = lodash.indexBy(lastUsedAltCurrencyList, 'isoCode');
var idx3 = lodash.indexBy(popularCurrencyList, 'isoCode');
var alternatives = rateService.listAlternatives(true);
lodash.each(alternatives, function(c) {
if (idx3[c.isoCode]) {
idx3[c.isoCode].name = c.name;
}
if (!idx[c.isoCode] && !idx2[c.isoCode] && !idx3[c.isoCode]) {
completeAlternativeList.push(c);
}
});
vm.altCurrencyList = completeAlternativeList.slice(0, 10);
vm.lastUsedPopularList = lodash.unique(lodash.union(lastUsedAltCurrencyList, popularCurrencyList), 'isoCode');
rateService.updateRates();
$timeout(function() {
$scope.$apply();
});
});
}
function loadMore() {
$timeout(function() {
vm.altCurrencyList = completeAlternativeList.slice(0, nextCurrencies);
nextCurrencies += 10;
vm.listComplete = vm.altCurrencyList.length >= completeAlternativeList.length;
$scope.$broadcast('scroll.infiniteScrollComplete');
}, 100);
}
function next() {
useSendMax = false;
vm.finish();
}
function findCurrency(search) {
if (!search) initCurrencies();
var list = lodash.unique(lodash.union(completeAlternativeList, lodash.union(lastUsedAltCurrencyList, popularCurrencyList)), 'isoCode');
vm.altCurrencyList = lodash.filter(list, function(item) {
var val = item.name
var val2 = item.isoCode;
return lodash.includes(val.toLowerCase(), search.toLowerCase()) || lodash.includes(val2.toLowerCase(), search.toLowerCase());
});
$timeout(function() {
$scope.$apply();
});
}
function save(newAltCurrency) {
var opts = {
wallet: {
settings: {
alternativeName: newAltCurrency.name,
alternativeIsoCode: newAltCurrency.isoCode,
}
}
};
configService.set(opts, function(err) {
if (err) $log.warn(err);
walletService.updateRemotePreferences(profileService.getWallets());
var altUnitIndex = lodash.findIndex(availableUnits, {
isFiat: true
});
availableUnits[altUnitIndex].id = newAltCurrency.isoCode;
availableUnits[altUnitIndex].name = newAltCurrency.isoCode;
availableUnits[altUnitIndex].shortName = newAltCurrency.isoCode;
fiatCode = newAltCurrency.isoCode;
updateAvailableFundsStringIfNeeded();
updateUnitUI();
close();
});
}
function updateAvailableFundsStringIfNeeded() {
if (passthroughParams.fromWalletId && walletSpendableAmount.satoshis !== null) {
vm.availableFunds = walletSpendableAmount.crypto;
if (availableUnits[unitIndex].isFiat) {
var coin = availableUnits[altUnitIndex].id;
txFormatService.formatAlternativeStr(coin, walletSpendableAmount.satoshis, function formatCallback(formatted){
if (formatted) {
$scope.$apply(function() {
vm.availableFunds = formatted;
});
}
});
}
updateMaximumButtonIfNeeded();
}
}
function updateAvailableFundsFromWallet(wallet) {
console.log('amount updateAvailableFundsFromWallet()');
var availableFundsInFiat = '';
if (wallet.status && wallet.status.isValid) {
walletSpendableAmount.crypto = wallet.status.spendableBalanceStr;
walletSpendableAmount.satoshis = wallet.status.spendableAmount;
if (wallet.status.alternativeBalanceAvailable) {
availableFundsInFiat = wallet.status.spendableBalanceAlternative + ' ' + wallet.status.alternativeIsoCode;
} else {
availableFundsInFiat = '';
}
} else if (wallet.cachedStatus && wallet.cachedStatus.isValid) {
if (wallet.cachedStatus.alternativeBalanceAvailable) {
availableFundsInFiat = wallet.cachedStatus.spendableBalanceAlternative + ' ' + wallet.cachedStatus.alternativeIsoCode;
} else {
availableFundsInFiat = '';
}
walletSpendableAmount.crypto = wallet.cachedStatus.spendableBalanceStr;
walletSpendableAmount.satoshis = wallet.cachedStatus.spendableAmount;
} else {
walletSpendableAmount.crypto = '';
walletSpendableAmount.satoshis = null;
}
if (availableUnits[unitIndex].isFiat) {
vm.availableFunds = availableFundsInFiat || walletSpendableAmount.crypto;
} else {
vm.availableFunds = walletSpendableAmount.crypto;
}
setMaximumButtonFromWallet(wallet);
}
function updateMaximumButtonIfNeeded() {
console.log('sendmax updateMaximumButtonIfNeeded()');
if (vm.showSendMaxButton || vm.showSendLimitMaxButton) {
transactionSendableAmount.fiat = '';
vm.sendableFunds = transactionSendableAmount.crypto;
if (availableUnits[unitIndex].isFiat) {
var coin = availableUnits[altUnitIndex].id;
txFormatService.formatAlternativeStr(coin, transactionSendableAmount.satoshis, function formatCallback(formatted){
if (formatted) {
$scope.$apply(function onApply() {
vm.sendableFunds = formatted;
});
}
});
}
}
}
function setMaximumButtonFromWallet(wallet) {
console.log('sendmax setMaximumButtonFromWallet()');
var minSatoshis = vm.minAmount * unitToSatoshi;
var maxSatoshis = vm.maxAmount * unitToSatoshi;
if (minSatoshis > walletSpendableAmount.satoshis) {
console.log('sendmax Hiding max buttons as minimum is too high.');
canSendMax = false;
vm.showSendMaxButton = true;
vm.showSendLimitMaxButton = false;
transactionSendableAmount.satoshis = walletSpendableAmount.satoshis;
} else if (maxSatoshis) {
if (walletSpendableAmount.satoshis > maxSatoshis) {
console.log('sendmax Showing max limit button as available is greater than max limit.');
canSendMax = false;
vm.showSendMaxButton = false;
vm.showSendLimitMaxButton = true;
transactionSendableAmount.satoshis = maxSatoshis;
} else {
console.log('sendmax Showing sendmax as all available as less than max limit.');
// Enabling send max here is a little dangerous, if they receive funds between pressing
// this and the calculation in the Review screen.
canSendMax = false;
vm.showSendMaxButton = true;
vm.showSendLimitMaxButton = false;
transactionSendableAmount.satoshis = walletSpendableAmount.satoshis;
}
} else {
console.log('sendmax Showing sendmax as all available because no limits.');
canSendMax = true;
vm.showSendMaxButton = true;
vm.showSendLimitMaxButton = false;
transactionSendableAmount.satoshis = walletSpendableAmount.satoshis;
}
if (vm.showSendMaxButton || vm.showSendLimitMaxButton) {
console.log('sendmax Setting max button text');
transactionSendableAmount.crypto = txFormatService.formatAmountStr(wallet.coin, transactionSendableAmount.satoshis);
vm.sendableFunds = transactionSendableAmount.crypto;
if (availableUnits[unitIndex].isFiat) {
txFormatService.formatAlternativeStr(wallet.coin, transactionSendableAmount.satoshis, function onFormat(formatted){
if (formatted) {
$scope.$apply(function onApply() {
vm.sendableFunds = formatted;
});
}
});
}
}
}
}
})();

View file

@ -0,0 +1,636 @@
'use strict';
angular.module('copayApp.controllers').controller('amountController', function($scope, $filter, $timeout, $ionicModal, $ionicScrollDelegate, $ionicHistory, storageService, walletService, gettextCatalog, platformInfo, lodash, configService, rateService, $stateParams, $window, $state, $log, txFormatService, ongoingProcess, popupService, bwcError, payproService, profileService, bitcore, amazonService, nodeWebkitService) {
var _id;
var unitToSatoshi;
var satToUnit;
var unitDecimals;
var satToBtc;
var SMALL_FONT_SIZE_LIMIT = 10;
var LENGTH_EXPRESSION_LIMIT = 19;
var LENGTH_BEFORE_COMMA_EXPRESSION_LIMIT = 8;
var LENGTH_AFTER_COMMA_EXPRESSION_LIMIT = 8;
var isNW = platformInfo.isNW;
var unitIndex = 0;
var altUnitIndex = 0;
var availableUnits = [];
var fiatCode;
var fixedUnit;
$scope.amountModel = { amount: 0 };
$scope.isChromeApp = platformInfo.isChromeApp;
$scope.isAndroid = platformInfo.isAndroid;
$scope.isIos = platformInfo.isIOS;
$scope.$on('$ionicView.leave', function() {
angular.element($window).off('keydown');
});
$scope.$on("$ionicView.beforeEnter", function(event, data) {
initCurrencies();
if (data.stateParams.shapeshiftOrderId && data.stateParams.shapeshiftOrderId.length > 0) {
$scope.minShapeshiftAmount = parseFloat(data.stateParams.minShapeshiftAmount);
$scope.maxShapeshiftAmount = parseFloat(data.stateParams.maxShapeshiftAmount);
$scope.shapeshiftOrderId = data.stateParams.shapeshiftOrderId;
}
// To get the wallet from with the new flow
$scope.fromWalletId = data.stateParams.fromWalletId;
if (data.stateParams.noPrefix) {
$scope.showWarningMessage = data.stateParams.noPrefix != 0;
if ($scope.showWarningMessage) {
var message = 'Address doesn\'t contain currency information, please make sure you are sending the correct currency.';
popupService.showAlert('', message, function() {}, 'Ok');
}
}
var config = configService.getSync().wallet.settings;
function setAvailableUnits() {
var defaults = configService.getDefaults();
var configCache = configService.getSync();
availableUnits = [];
var hasBCHWallets = profileService.getWallets({
coin: 'bch'
}).length;
if (hasBCHWallets) {
availableUnits.push({
name: 'Bitcoin Cash',
id: 'bch',
shortName: (configCache.bitcoinCashAlias || defaults.bitcoinCashAlias).toUpperCase(),
});
};
var hasBTCWallets = profileService.getWallets({
coin: 'btc'
}).length;
if (hasBTCWallets) {
availableUnits.push({
name: 'Bitcoin',
id: 'btc',
shortName: (configCache.bitcoinAlias || defaults.bitcoinAlias).toUpperCase(),
});
}
unitIndex = 0;
if (data.stateParams.coin) {
var coins = data.stateParams.coin.split(',');
var newAvailableUnits = [];
lodash.each(coins, function(c) {
var coin = lodash.find(availableUnits, {
id: c
});
if (!coin) {
$log.warn('Could not find desired coin:' + data.stateParams.coin)
} else {
newAvailableUnits.push(coin);
}
});
if (newAvailableUnits.length > 0) {
availableUnits = newAvailableUnits;
}
}
// currency have preference
var fiatName;
if (data.stateParams.currency) {
fiatCode = data.stateParams.currency;
altUnitIndex = unitIndex
unitIndex = availableUnits.length;
} else {
fiatCode = config.alternativeIsoCode || 'USD';
fiatName = config.alternanativeName || fiatCode;
altUnitIndex = availableUnits.length;
}
availableUnits.push({
name: fiatName || fiatCode,
// TODO
id: fiatCode,
shortName: fiatCode,
isFiat: true,
});
if (data.stateParams.fixedUnit) {
fixedUnit = true;
}
unitIndex = lodash.findIndex(availableUnits, {
isFiat: true
});
altUnitIndex = 0;
};
// Go to...
_id = data.stateParams.id; // Optional (BitPay Card ID or Wallet ID)
$scope.nextStep = data.stateParams.nextStep;
setAvailableUnits();
updateUnitUI();
$scope.hasMaxAmount = true;
if ($ionicHistory.backView().stateName == 'tabs.receive') {
$scope.hasMaxAmount = false;
}
$scope.showMenu = $ionicHistory.backView() && ($ionicHistory.backView().stateName == 'tabs.send' || $ionicHistory.backView().stateName == 'tabs.bitpayCard');
$scope.recipientType = data.stateParams.recipientType || null;
$scope.toAddress = data.stateParams.toAddress;
$scope.displayAddress = data.stateParams.displayAddress;
$scope.toName = data.stateParams.toName;
$scope.toEmail = data.stateParams.toEmail;
$scope.toColor = data.stateParams.toColor;
if (!$scope.nextStep && !data.stateParams.toAddress) {
$log.error('Bad params at amount')
throw ('bad params');
}
var reNr = /^[1234567890\.]$/;
var reOp = /^[\*\+\-\/]$/;
if (!$scope.isAndroid && !$scope.isIos) {
var disableKeys = angular.element($window).on('keydown', function(e) {
if (!e.key) return;
if (e.which === 8) { // you can add others here inside brackets.
if (!$scope.altCurrencyModal) {
e.preventDefault();
$scope.removeDigit();
}
}
if (e.key.match(reNr)) {
$scope.pushDigit(e.key);
} else if (e.key.match(reOp)) {
$scope.pushOperator(e.key);
} else if (e.keyCode === 86) {
if (e.ctrlKey || e.metaKey) processClipboard();
} else if (e.keyCode === 13) $scope.finish();
$timeout(function() {
$scope.$apply();
});
});
}
$scope.specificAmount = $scope.specificAlternativeAmount = '';
$scope.isCordova = platformInfo.isCordova;
unitToSatoshi = config.unitToSatoshi;
satToUnit = 1 / unitToSatoshi;
satToBtc = 1 / 100000000;
unitDecimals = config.unitDecimals;
$scope.resetAmount();
// in SAT ALWAYS
if ($stateParams.toAmount) {
$scope.amountModel.amount = (($stateParams.toAmount) * satToUnit).toFixed(unitDecimals);
}
$scope.processAmount();
$timeout(function() {
$ionicScrollDelegate.resize();
}, 10);
});
$scope.goBack = function() {
if ($scope.shapeshiftOrderId) {
$state.go('tabs.send').then(function() {
$ionicHistory.clearHistory();
$state.go('tabs.home').then(function() {
$state.transitionTo('tabs.shapeshift');
});
});
} else {
$ionicHistory.goBack();
}
}
function paste(value) {
$scope.amountModel.amount = value;
$scope.processAmount();
$timeout(function() {
$scope.$apply();
});
};
function processClipboard() {
if (!isNW) return;
var value = nodeWebkitService.readFromClipboard();
if (value && evaluate(value) > 0) paste(evaluate(value));
};
$scope.sendMax = function() {
$scope.useSendMax = true;
$scope.finish();
};
$scope.toggleAlternative = function() {
if ($scope.amountModel.amount && isExpression($scope.amountModel.amount)) {
var amount = evaluate(format($scope.amountModel.amount));
$scope.globalResult = '= ' + processResult(amount);
}
};
function updateUnitUI() {
$scope.unit = availableUnits[unitIndex].shortName;
$scope.alternativeUnit = availableUnits[altUnitIndex].shortName;
$scope.processAmount();
$log.debug('Update unit coin @amount unit:' + $scope.unit + " alternativeUnit:" + $scope.alternativeUnit);
};
$scope.changeUnit = function() {
$scope.amountModel.amount = '0';
if (fixedUnit) return;
if (!(availableUnits[unitIndex].isFiat && availableUnits.length > 2 && altUnitIndex == 0)) {
unitIndex++;
if (unitIndex >= availableUnits.length) unitIndex = 0;
}
if (availableUnits[unitIndex].isFiat) {
altUnitIndex = altUnitIndex == 0 && availableUnits.length > 2 ? 1 : 0;
} else {
altUnitIndex = lodash.findIndex(availableUnits, {
isFiat: true
});
}
updateUnitUI();
};
$scope.changeAlternativeUnit = function() {
// Do nothing is fiat is not main unit
if (!availableUnits[unitIndex].isFiat) return;
var nextCoin = lodash.findIndex(availableUnits, function(x) {
if (x.isFiat) return false;
if (x.id == availableUnits[altUnitIndex].id) return false;
return true;
});
if (nextCoin >= 0) {
altUnitIndex = nextCoin;
updateUnitUI();
}
};
function checkFontSize() {
if ($scope.amountModel.amount && $scope.amountModel.amount.length >= SMALL_FONT_SIZE_LIMIT) $scope.smallFont = true;
else $scope.smallFont = false;
};
$scope.pushDigit = function(digit) {
if ($scope.amountModel.amount && digit != '.') {
var amountSplitByComma = $scope.amountModel.amount.split('.');
if (amountSplitByComma.length > 1 && amountSplitByComma[1].length >= LENGTH_AFTER_COMMA_EXPRESSION_LIMIT) return;
if (amountSplitByComma.length == 1 && amountSplitByComma[0].length >= LENGTH_BEFORE_COMMA_EXPRESSION_LIMIT) return;
}
if ($scope.amountModel.amount && $scope.amountModel.amount.length >= LENGTH_EXPRESSION_LIMIT) return;
if ($scope.amountModel.amount.indexOf('.') > -1 && digit == '.') return;
if ($scope.amountModel.amount == '0' && digit == '0') return;
if (availableUnits[unitIndex].isFiat && $scope.amountModel.amount.indexOf('.') > -1 && $scope.amountModel.amount[$scope.amountModel.amount.indexOf('.') + 2]) return;
if ($scope.amountModel.amount == '0' && digit != '.') {
$scope.amountModel.amount = '';
}
if ($scope.amountModel.amount == '' && digit == '.') {
$scope.amountModel.amount = '0';
}
$scope.amountModel.amount = ($scope.amountModel.amount + digit).replace('..', '.');
checkFontSize();
$scope.processAmount();
};
$scope.pushOperator = function(operator) {
if (!$scope.amountModel.amount || $scope.amountModel.amount.length == 0) return;
$scope.amountModel.amount = _pushOperator($scope.amountModel.amount);
function _pushOperator(val) {
if (!isOperator(lodash.last(val))) {
return val + operator;
} else {
return val.slice(0, -1) + operator;
}
};
};
function isOperator(val) {
var regex = /[\/\-\+\x\*]/;
return regex.test(val);
};
function isExpression(val) {
var regex = /^\.?\d+(\.?\d+)?([\/\-\+\*x]\d?\.?\d+)+$/;
return regex.test(val);
};
$scope.removeDigit = function() {
$scope.amountModel.amount = ($scope.amountModel.amount).toString().slice(0, -1);
$scope.processAmount();
checkFontSize();
};
$scope.resetAmount = function() {
$scope.amountModel.amount = $scope.alternativeAmount = $scope.globalResult = '';
$scope.allowSend = false;
checkFontSize();
};
$scope.openPopup = function() {
$ionicModal.fromTemplateUrl('views/modals/altCurrency.html', {
scope: $scope
}).then(function(modal) {
$scope.altCurrencyModal = modal;
$scope.altCurrencyModal.show();
});
};
$scope.close = function() {
$scope.altCurrencyModal.remove();
$scope.altCurrencyModal = false;
};
$scope.processAmount = function() {
var formatedValue = format($scope.amountModel.amount);
var result = evaluate(formatedValue);
if (lodash.isNumber(result)) {
$scope.globalResult = isExpression($scope.amountModel.amount) ? '= ' + processResult(result) : '';
if (availableUnits[unitIndex].isFiat) {
var a = fromFiat(result);
if (a) {
$scope.alternativeAmount = txFormatService.formatAmount(a * unitToSatoshi, true);
$scope.allowSend = lodash.isNumber(a) && a > 0
&& (!$scope.shapeshiftOrderId
|| (a >= $scope.minShapeshiftAmount && a <= $scope.maxShapeshiftAmount));
} else {
if (result) {
$scope.alternativeAmount = 'N/A';
} else {
$scope.alternativeAmount = null;
}
$scope.allowSend = false;
}
} else {
$scope.alternativeAmount = $filter('formatFiatAmount')(toFiat(result));
$scope.allowSend = lodash.isNumber(result) && result > 0
&& (!$scope.shapeshiftOrderId
|| (result >= $scope.minShapeshiftAmount && result <= $scope.maxShapeshiftAmount));
}
}
};
function processResult(val) {
if (availableUnits[unitIndex].isFiat) return $filter('formatFiatAmount')(val);
else return txFormatService.formatAmount(val.toFixed(unitDecimals) * unitToSatoshi, true);
};
function fromFiat(val) {
return parseFloat((rateService.fromFiat(val, fiatCode, availableUnits[altUnitIndex].id) * satToUnit).toFixed(unitDecimals));
};
function toFiat(val) {
if (!rateService.getRate(fiatCode)) return;
return parseFloat((rateService.toFiat(val * unitToSatoshi, fiatCode, availableUnits[unitIndex].id)).toFixed(2));
};
function evaluate(val) {
var result;
try {
result = $scope.$eval(val);
} catch (e) {
return 0;
}
if (!lodash.isFinite(result)) return 0;
return result;
};
function format(val) {
if (!val) return;
var result = val.toString();
if (isOperator(lodash.last(val))) result = result.slice(0, -1);
return result.replace('x', '*');
};
$scope.finish = function() {
function finish() {
var unit = availableUnits[unitIndex];
var _amount = evaluate(format($scope.amountModel.amount));
var coin = unit.id;
if (unit.isFiat) {
coin = availableUnits[altUnitIndex].id;
}
if ($scope.nextStep) {
$state.transitionTo($scope.nextStep, {
id: _id,
amount: $scope.useSendMax ? null : _amount,
currency: unit.id.toUpperCase(),
coin: coin,
useSendMax: $scope.useSendMax,
fromWalletId: $scope.fromWalletId
});
} else {
var amount = _amount;
if (unit.isFiat) {
amount = (fromFiat(amount) * unitToSatoshi).toFixed(0);
} else {
amount = (amount * unitToSatoshi).toFixed(0);
}
var confirmData = {
recipientType: $scope.recipientType,
toAmount: amount,
toAddress: $scope.toAddress,
displayAddress: $scope.displayAddress || $scope.toAddress,
toName: $scope.toName,
toEmail: $scope.toEmail,
toColor: $scope.toColor,
coin: coin,
useSendMax: $scope.useSendMax,
fromWalletId: $scope.fromWalletId
};
if ($scope.shapeshiftOrderId) {
var shapeshiftOrderUrl = 'https://www.shapeshift.io/#/status/';
shapeshiftOrderUrl += $scope.shapeshiftOrderId;
confirmData.description = shapeshiftOrderUrl;
confirmData.fromWalletId = $scope.fromWalletId;
if (confirmData.useSendMax) {
var wallet = lodash.find(profileService.getWallets({ coin: coin }),
function(w) {
return w.id == $scope.fromWalletId;
});
var balance = parseFloat(wallet.cachedBalance.substring(0, wallet.cachedBalance.length-4));
if (balance < $scope.minShapeshiftAmount * 1.04) {
confirmData.useSendMax = false;
confirmData.toAmount = $scope.minShapeshiftAmount * unitToSatoshi;
} else if (balance > $scope.maxShapeshiftAmount) {
confirmData.useSendMax = false;
confirmData.toAmount = $scope.maxShapeshiftAmount * unitToSatoshi * 0.99;
}
}
}
$state.transitionTo('tabs.send.confirm', confirmData);
}
$scope.useSendMax = null;
}
if ($scope.showWarningMessage) {
var u = $scope.unit == 'BCH' || $scope.unit == 'BTC' ? $scope.unit : $scope.alternativeUnit;
var message = 'Are you sure you want to send ' + u.toUpperCase() + '?';
popupService.showConfirm(message, '', 'Yes', 'No', function(res) {
if (!res) {
$scope.useSendMax = null;
return;
};
finish();
});
} else {
finish();
}
};
// Currency
var next = 10;
var completeAlternativeList = [];
var popularCurrencyList = [
{isoCode: 'USD', order: 0},
{isoCode: 'EUR', order: 1},
{isoCode: 'JPY', order: 2},
{isoCode: 'GBP', order: 3},
{isoCode: 'AUD', order: 4},
{isoCode: 'CAD', order: 5},
{isoCode: 'CHF', order: 6},
{isoCode: 'CNY', order: 7},
{isoCode: 'KRW', order: 8},
{isoCode: 'HKD', order: 9},
]
function initCurrencies() {
var unusedCurrencyList = [{
isoCode: 'LTL'
}, {
isoCode: 'BTC'
}, {
isoCode: 'BCC'
}, {
isoCode: 'BCH_BTC'
}, {
isoCode: 'BCH'
}];
rateService.whenAvailable(function() {
$scope.listComplete = false;
var idx = lodash.indexBy(unusedCurrencyList, 'isoCode');
var idx2 = lodash.indexBy($scope.lastUsedAltCurrencyList, 'isoCode');
var idx3 = lodash.indexBy(popularCurrencyList, 'isoCode');
var alternatives = rateService.listAlternatives(true);
lodash.each(alternatives, function(c) {
if (idx3[c.isoCode]) {
idx3[c.isoCode].name = c.name;
}
if (!idx[c.isoCode] && !idx2[c.isoCode] && !idx3[c.isoCode]) {
completeAlternativeList.push(c);
}
});
$scope.altCurrencyList = completeAlternativeList.slice(0, 10);
$scope.lastUsedPopularList = lodash.unique(lodash.union($scope.lastUsedAltCurrencyList, popularCurrencyList), 'isoCode');
$timeout(function() {
$scope.$apply();
});
});
}
$scope.loadMore = function() {
$timeout(function() {
$scope.altCurrencyList = completeAlternativeList.slice(0, next);
next += 10;
$scope.listComplete = $scope.altCurrencyList.length >= completeAlternativeList.length;
$scope.$broadcast('scroll.infiniteScrollComplete');
}, 100);
};
$scope.findCurrency = function(search) {
if (!search) initCurrencies();
var list = lodash.unique(lodash.union(completeAlternativeList, lodash.union($scope.lastUsedAltCurrencyList, popularCurrencyList)), 'isoCode');
$scope.altCurrencyList = lodash.filter(list, function(item) {
var val = item.name
var val2 = item.isoCode;
return lodash.includes(val.toLowerCase(), search.toLowerCase()) || lodash.includes(val2.toLowerCase(), search.toLowerCase());
});
$timeout(function() {
$scope.$apply();
});
};
$scope.save = function(newAltCurrency) {
var opts = {
wallet: {
settings: {
alternativeName: newAltCurrency.name,
alternativeIsoCode: newAltCurrency.isoCode,
}
}
};
configService.set(opts, function(err) {
if (err) $log.warn(err);
walletService.updateRemotePreferences(profileService.getWallets());
var altUnitIndex = lodash.findIndex(availableUnits, {
isFiat: true
});
availableUnits[altUnitIndex].id = newAltCurrency.isoCode;
availableUnits[altUnitIndex].name = newAltCurrency.isoCode;
availableUnits[altUnitIndex].shortName = newAltCurrency.isoCode;
fiatCode = newAltCurrency.isoCode;
updateUnitUI();
$scope.close();
});
};
});

View file

@ -1,604 +0,0 @@
describe('amountController', function(){
var configCache,
configService,
gettextCatalog,
$controller,
$ionicHistory,
$rootScope,
ongoingProcess,
platformInfo,
popupService,
profileService,
rateService,
sendFlowService,
shapeshiftService,
txFormatService,
$scope,
$state,
$stateParams;
beforeEach(function(){
module('ngLodash');
module('copayApp.controllers');
configCache = {
wallet: {
settings: {
unitToSatoshi: 100000000
}
}
};
configService = jasmine.createSpyObj(['getDefaults','getSync']);
configService.getDefaults.and.returnValue({
bitcoinCashAlias: 'bch',
bitcoinAlias: 'btc'
});
configService.getSync.and.returnValue(configCache);
gettextCatalog = jasmine.createSpyObj(['getString']);
gettextCatalog.getString.and.callFake(function(str){ return str; });
$ionicHistory = jasmine.createSpyObj(['backView']);
ongoingProcess = jasmine.createSpyObj(['set']);
platformInfo = {
isChromeApp: false,
isAndroid: false,
isIos: true
};
popupService = jasmine.createSpyObj(['showAlert']);
profileService = jasmine.createSpyObj(['getWallet', 'getWallets']);
rateService = jasmine.createSpyObj(['fromFiat', 'listAlternatives', 'updateRates', 'whenAvailable']);
sendFlowService = jasmine.createSpyObj(['getStateClone', 'pushState']);
shapeshiftService = jasmine.createSpyObj(['getMarketData']);
txFormatService = jasmine.createSpyObj(['formatAlternativeStr', 'formatAmountStr']);
txFormatService.formatAlternativeStr.and.callFake(function(coin, satoshis, cb) {
if (typeof satoshis !== "number") {
throw "satoshis in formatAlternativeStr() is not a number."
}
var units = satoshis / 100000000;
var formatted = (units * 10000).toFixed(2) + ' USD';
cb(formatted);
});
txFormatService.formatAmountStr.and.callFake(function(coin, satoshis) {
if (typeof satoshis !== "number") {
throw "satoshis in formatAmountStr() is not a number."
}
return (satoshis * 100000000).toFixed(8) + ' ' + (coin || 'bch').toUpperCase();
});
$state = jasmine.createSpyObj(['transitionTo']);
$stateParams = {};
inject(function(_$controller_, _$rootScope_){
// The injector unwraps the underscores (_) from around the parameter names when matching
$controller = _$controller_;
$rootScope = _$rootScope_;
});
});
it('receives fromWalletId and toAddress.', function() {
var backView = {
stateName: 'ignoreme'
};
$ionicHistory.backView.and.returnValue(backView);
var wallet = {
status: {
isValid: true,
spendableAmount: 123456
}
};
profileService.getWallet.and.returnValue(wallet);
profileService.getWallets.and.returnValue([{}]);
rateService.fromFiat.and.returnValue(12); // satoshis or coins?
var $scope = $rootScope.$new();
var amountController = $controller('amountController', {
configService: configService,
gettextCatalog: gettextCatalog,
$ionicHistory: $ionicHistory,
$ionicModal: {},
$ionicScrollDelegate: {},
nodeWebkitService: {},
ongoingProcess: ongoingProcess,
platformInfo: platformInfo,
profileService: profileService,
popupService: popupService,
rateService: rateService,
$scope: $scope,
sendFlowService: sendFlowService,
shapeshiftService: shapeshiftService,
$state: {},
$stateParams: $stateParams,
txFormatService: txFormatService,
walletService: {}
});
var sendFlowState = {
fromWalletId: 'fd56c1e7-e3ac-4fd9-8afc-27b9c1b3718b',
toAddress: 'qrup46avn8t466xxwlzs4qelht7cnwvesv2e29wf7s'
};
sendFlowService.getStateClone.and.returnValue(sendFlowState);
$scope.$emit('$ionicView.beforeEnter', {});
//expect($scope.fromWalletId).toBe('fd56c1e7-e3ac-4fd9-8afc-27b9c1b3718b');
//expect($scope.toAddress).toBe('qrup46avn8t466xxwlzs4qelht7cnwvesv2e29wf7s');
});
describe('Shapeshift', function() {
var walletFrom;
var walletTo;
beforeEach(function(){
walletFrom = {};
walletTo = {};
profileService.getWallet.and.callFake(function(walletId){
if (walletId === '4cd7673e-7320-4dfa-86e5-d4edb51d460a') {
return walletFrom;
} else if (walletId === 'bf00af8f-0788-4b57-b30a-0390747407e9') {
return walletTo;
} else {
return null;
}
});
rateService.listAlternatives.and.returnValue([
{name: "Australian Dollar", isoCode: "AUD"},
{name: "United States Dollar", isoCode: "USD"}
]);
});
it ('with available balance below limit, shows sendMax for triggering alert', function() {
walletFrom.coin = 'btc';
walletFrom.status = {
isValid: true,
spendableAmount: 789
};
walletTo.coin = 'bch';
profileService.getWallets.and.returnValue([{}]);
rateService.fromFiat.and.returnValue(12);
var $scope = $rootScope.$new();
var amountController = $controller('amountController', {
configService: configService,
gettextCatalog: gettextCatalog,
$ionicHistory: $ionicHistory,
$ionicModal: {},
$ionicScrollDelegate: {},
nodeWebkitService: {},
ongoingProcess: ongoingProcess,
platformInfo: platformInfo,
profileService: profileService,
popupService: popupService,
rateService: rateService,
$scope: $scope,
sendFlowService: sendFlowService,
shapeshiftService: shapeshiftService,
$state: $state,
$stateParams: $stateParams,
txFormatService: txFormatService,
walletService: {}
});
rateService.whenAvailable.and.callFake(function(cb){
cb();
});
var sendFlowState = {
amount: '',
displayAddress: null,
fromWalletId: '4cd7673e-7320-4dfa-86e5-d4edb51d460a',
sendMax: false,
thirdParty: {
id: 'shapeshift',
data: {},
},
toAddress: '',
toWalletId: 'bf00af8f-0788-4b57-b30a-0390747407e9'
};
sendFlowService.getStateClone.and.returnValue(sendFlowState);
var reqCoinIn = '';
var reqCoinOut = '';
shapeshiftService.getMarketData.and.callFake(function(coinIn, coinOut, cb){
reqCoinIn = coinIn;
reqCoinOut = coinOut;
cb({
maxLimit: '0.6846239',
minimum: '0.00013692'
});
});
$scope.$emit('$ionicView.beforeEnter', {});
expect(rateService.updateRates.calls.any()).toEqual(true);
expect(reqCoinIn).toBe('btc');
expect(reqCoinOut).toBe('bch');
expect(amountController.maxAmount).toBe(0.68462390);
expect(amountController.minAmount).toBe(0.00013692);
expect(amountController.showSendMaxButton).toEqual(true);
expect(amountController.showSendLimitMaxButton).toEqual(false);
expect(amountController.sendableFunds).toEqual('0.08 USD');
// Now hit the Send Max button
amountController.sendMax();
expect(popupService.showAlert.calls.argsFor(0)[0]).toEqual('Insufficient funds');
expect(popupService.showAlert.calls.argsFor(0)[1]).toEqual('Amount below minimum allowed');
expect(sendFlowService.pushState.calls.any()).toEqual(false);
expect($state.transitionTo.calls.any()).toEqual(false);
});
it ('with available balance between limits, uses sendMax', function() {
walletFrom.coin = 'btc';
walletFrom.status = {
isValid: true,
spendableAmount: 456789
};
walletTo.coin = 'bch';
profileService.getWallets.and.returnValue([{}]);
rateService.fromFiat.and.returnValue(12);
var $scope = $rootScope.$new();
var amountController = $controller('amountController', {
configService: configService,
gettextCatalog: {},
$ionicHistory: $ionicHistory,
$ionicModal: {},
$ionicScrollDelegate: {},
nodeWebkitService: {},
ongoingProcess: ongoingProcess,
platformInfo: platformInfo,
profileService: profileService,
popupService: {},
rateService: rateService,
$scope: $scope,
sendFlowService: sendFlowService,
shapeshiftService: shapeshiftService,
$state: $state,
$stateParams: $stateParams,
txFormatService: txFormatService,
walletService: {}
});
rateService.whenAvailable.and.callFake(function(cb){
cb();
});
var sendFlowState = {
amount: '',
displayAddress: null,
fromWalletId: '4cd7673e-7320-4dfa-86e5-d4edb51d460a',
sendMax: false,
thirdParty: {
id: 'shapeshift',
data: {},
},
toAddress: '',
toWalletId: 'bf00af8f-0788-4b57-b30a-0390747407e9'
};
sendFlowService.getStateClone.and.returnValue(sendFlowState);
var reqCoinIn = '';
var reqCoinOut = '';
shapeshiftService.getMarketData.and.callFake(function(coinIn, coinOut, cb){
reqCoinIn = coinIn;
reqCoinOut = coinOut;
cb({
maxLimit: '0.6846239',
minimum: '0.00013692'
});
});
$scope.$emit('$ionicView.beforeEnter', {});
expect(rateService.updateRates.calls.any()).toEqual(true);
expect(reqCoinIn).toBe('btc');
expect(reqCoinOut).toBe('bch');
expect(amountController.maxAmount).toBe(0.68462390);
expect(amountController.minAmount).toBe(0.00013692);
expect(amountController.showSendMaxButton).toEqual(true);
expect(amountController.showSendLimitMaxButton).toEqual(false);
// Now hit the Send Max button
var pushedState = null;
sendFlowService.pushState.and.callFake(function (sendFlowState){
pushedState = sendFlowState;
});
amountController.sendMax();
expect(pushedState.amount).toBeUndefined();
expect(pushedState.fromWalletId).toEqual('4cd7673e-7320-4dfa-86e5-d4edb51d460a');
expect(pushedState.sendMax).toEqual(true);
expect(pushedState.toWalletId).toEqual('bf00af8f-0788-4b57-b30a-0390747407e9');
expect(pushedState.thirdParty.id).toEqual('shapeshift');
expect(pushedState.thirdParty.data.maxAmount).toEqual(0.6846239);
expect(pushedState.thirdParty.data.minAmount).toEqual(0.00013692);
expect($state.transitionTo.calls.count()).toEqual(1);
expect($state.transitionTo.calls.argsFor(0)[0]).toEqual('tabs.send.review');
});
it ('with available balance higher than max, uses send limit max instead of sendMax', function() {
walletFrom.coin = 'btc';
walletFrom.status = {
isValid: true,
spendableAmount: 123456789
};
walletTo.coin = 'bch';
profileService.getWallets.and.returnValue([{}]);
rateService.fromFiat.and.returnValue(12); // satoshis or coins?
var $scope = $rootScope.$new();
var amountController = $controller('amountController', {
configService: configService,
gettextCatalog: {},
$ionicHistory: $ionicHistory,
$ionicModal: {},
$ionicScrollDelegate: {},
nodeWebkitService: {},
ongoingProcess: ongoingProcess,
platformInfo: platformInfo,
profileService: profileService,
popupService: {},
rateService: rateService,
$scope: $scope,
sendFlowService: sendFlowService,
shapeshiftService: shapeshiftService,
$state: $state,
$stateParams: $stateParams,
txFormatService: txFormatService,
walletService: {}
});
rateService.whenAvailable.and.callFake(function(cb){
cb();
});
var sendFlowState = {
amount: '',
displayAddress: null,
fromWalletId: '4cd7673e-7320-4dfa-86e5-d4edb51d460a',
sendMax: false,
thirdParty: {
id: 'shapeshift',
data: {},
},
toAddress: '',
toWalletId: 'bf00af8f-0788-4b57-b30a-0390747407e9'
};
sendFlowService.getStateClone.and.returnValue(sendFlowState);
var reqCoinIn = '';
var reqCoinOut = '';
shapeshiftService.getMarketData.and.callFake(function(coinIn, coinOut, cb){
reqCoinIn = coinIn;
reqCoinOut = coinOut;
cb({
maxLimit: '0.6846239',
minimum: '0.00013692'
});
});
$scope.$emit('$ionicView.beforeEnter', {});
expect(rateService.updateRates.calls.any()).toEqual(true);
expect(reqCoinIn).toBe('btc');
expect(reqCoinOut).toBe('bch');
expect(amountController.maxAmount).toBe(0.6846239);
expect(amountController.minAmount).toBe(0.00013692);
expect(amountController.showSendMaxButton).toEqual(false);
expect(amountController.showSendLimitMaxButton).toEqual(true);
// Now hit the Send Max button
var pushedState = null;
sendFlowService.pushState.and.callFake(function (sendFlowState){
pushedState = sendFlowState;
});
amountController.sendMax();
expect(pushedState.amount).toEqual(68462390);
expect(pushedState.fromWalletId).toEqual('4cd7673e-7320-4dfa-86e5-d4edb51d460a');
expect(pushedState.sendMax).toEqual(false);
expect(pushedState.toWalletId).toEqual('bf00af8f-0788-4b57-b30a-0390747407e9');
expect(pushedState.thirdParty.id).toEqual('shapeshift');
expect(pushedState.thirdParty.data.maxAmount).toEqual(0.6846239);
expect(pushedState.thirdParty.data.minAmount).toEqual(0.00013692);
expect($state.transitionTo.calls.count()).toEqual(1);
expect($state.transitionTo.calls.argsFor(0)[0]).toEqual('tabs.send.review');
});
});
describe('Wallet transfer', function() {
var walletFrom;
var walletTo;
beforeEach(function(){
walletFrom = {};
walletTo = {};
profileService.getWallet.and.callFake(function(walletId){
if (walletId === '4cd7673e-7320-4dfa-86e5-d4edb51d460a') {
return walletFrom;
} else if (walletId === 'bf00af8f-0788-4b57-b30a-0390747407e9') {
return walletTo;
} else {
return null;
}
});
rateService.listAlternatives.and.returnValue([
{name: "Australian Dollar", isoCode: "AUD"},
{name: "United States Dollar", isoCode: "USD"}
]);
});
it('wallet transfer send max.', function() {
walletFrom.coin = 'btc';
walletFrom.status = {
isValid: true,
spendableAmount: 123456789
};
profileService.getWallets.and.returnValue([{}]);
var $scope = $rootScope.$new();
var amountController = $controller('amountController', {
configService: configService,
gettextCatalog: gettextCatalog,
$ionicHistory: $ionicHistory,
$ionicModal: {},
$ionicScrollDelegate: {},
nodeWebkitService: {},
ongoingProcess: ongoingProcess,
platformInfo: platformInfo,
profileService: profileService,
popupService: popupService,
rateService: rateService,
$scope: $scope,
sendFlowService: sendFlowService,
shapeshiftService: shapeshiftService,
$state: $state,
$stateParams: $stateParams,
txFormatService: txFormatService,
walletService: {}
});
var sendFlowState = {
fromWalletId: '4cd7673e-7320-4dfa-86e5-d4edb51d460a',
toWalletId: 'bf00af8f-0788-4b57-b30a-0390747407e9'
};
sendFlowService.getStateClone.and.returnValue(sendFlowState);
$scope.$emit('$ionicView.beforeEnter', {});
expect(amountController.showSendMaxButton).toEqual(true);
expect(amountController.showSendLimitMaxButton).toEqual(false);
expect(amountController.sendableFunds).toEqual('12345.68 USD');
// Now hit the Send Max button
var pushedState = null;
sendFlowService.pushState.and.callFake(function (sendFlowState){
pushedState = sendFlowState;
});
amountController.sendMax();
expect(pushedState.amount).toBeUndefined();
expect(pushedState.fromWalletId).toEqual('4cd7673e-7320-4dfa-86e5-d4edb51d460a');
expect(pushedState.sendMax).toEqual(true);
expect(pushedState.toWalletId).toEqual('bf00af8f-0788-4b57-b30a-0390747407e9');
expect($state.transitionTo.calls.count()).toEqual(1);
expect($state.transitionTo.calls.argsFor(0)[0]).toEqual('tabs.send.review');
});
// This situation was seen in real life
it('wallet transfer with valid cached status only.', function() {
walletFrom.coin = 'btc';
walletFrom.status = {
isValid: false,
};
walletFrom.cachedStatus = {
isValid: true,
spendableAmount: 5678
};
profileService.getWallets.and.returnValue([{}]);
var $scope = $rootScope.$new();
var amountController = $controller('amountController', {
configService: configService,
gettextCatalog: gettextCatalog,
$ionicHistory: $ionicHistory,
$ionicModal: {},
$ionicScrollDelegate: {},
nodeWebkitService: {},
ongoingProcess: ongoingProcess,
platformInfo: platformInfo,
profileService: profileService,
popupService: popupService,
rateService: rateService,
$scope: $scope,
sendFlowService: sendFlowService,
shapeshiftService: shapeshiftService,
$state: $state,
$stateParams: $stateParams,
txFormatService: txFormatService,
walletService: {}
});
var sendFlowState = {
fromWalletId: '4cd7673e-7320-4dfa-86e5-d4edb51d460a',
toWalletId: 'bf00af8f-0788-4b57-b30a-0390747407e9'
};
sendFlowService.getStateClone.and.returnValue(sendFlowState);
$scope.$emit('$ionicView.beforeEnter', {});
expect(amountController.showSendMaxButton).toEqual(true);
expect(amountController.showSendLimitMaxButton).toEqual(false);
expect(amountController.sendableFunds).toEqual('0.57 USD');
});
});
});

View file

@ -1,7 +1,7 @@
'use strict';
angular.module('copayApp.controllers').controller('backupController',
function($scope, $timeout, $log, $state, $stateParams, $ionicHistory, lodash, profileService, bwcService, walletService, ongoingProcess, popupService, gettextCatalog, $ionicModal) {
function($scope, $timeout, $log, $state, $stateParams, $ionicHistory, lodash, profileService, bwcService, walletService, ongoingProcess, popupService, gettextCatalog, $ionicModal, firebaseEventsService) {
if ($state.current.name == 'onboarding.backup') {
$scope.onboarding = true;
@ -89,8 +89,7 @@ angular.module('copayApp.controllers').controller('backupController',
$scope.setFlow(2);
})
} else {
//firebaseEventsService.logEvent('backed_up_wallet');
firebaseEventsService.logEvent('backed_up_wallet');
openConfirmBackupModal();
}
};

View file

@ -1,20 +1,25 @@
'use strict';
angular.module('copayApp.controllers').controller('confirmController', function($rootScope, $scope, $interval, $timeout, $ionicScrollDelegate, $ionicLoading, ionicToast, addressbookService, gettextCatalog, walletService, platformInfo, lodash, configService, $state, $log, profileService, bitcore, bitcoreCash, txFormatService, ongoingProcess, $ionicModal, popupService, $ionicHistory, $ionicConfig, feeService, bitcoinCashJsService, bwcError, txConfirmNotification, soundService, clipboardService) {
angular.module('copayApp.controllers').controller('confirmController', function($rootScope, $scope, $interval, $filter, $timeout, $ionicScrollDelegate, gettextCatalog, walletService, platformInfo, lodash, configService, $stateParams, $window, $state, $log, profileService, bitcore, bitcoreCash, txFormatService, ongoingProcess, $ionicModal, popupService, $ionicHistory, $ionicConfig, payproService, feeService, bwcError, txConfirmNotification, externalLinkService, firebaseEventsService, soundService) {
var countDown = null;
var FEE_TOO_HIGH_LIMIT_PER = 15;
var tx = {};
var lastTxId = "";
// Config Related values
var config = configService.getSync();
var walletConfig = config.wallet;
var unitToSatoshi = walletConfig.settings.unitToSatoshi;
var unitDecimals = walletConfig.settings.unitDecimals;
var satToUnit = 1 / unitToSatoshi;
var configFeeLevel = walletConfig.settings.feeLevel ? walletConfig.settings.feeLevel : 'normal';
// Platform info
var isChromeApp = platformInfo.isChromeApp;
var isCordova = platformInfo.isCordova;
var isWindowsPhoneApp = platformInfo.isCordova && platformInfo.isWP;
//custom fee flag
var usingCustomFee = false;
@ -26,16 +31,6 @@ angular.module('copayApp.controllers').controller('confirmController', function(
}, 10);
}
$scope.shareTransaction = function() {
var explorerTxUrl = 'https://explorer.bitcoin.com/'+tx.coin+'/tx/'+lastTxId;
if (platformInfo.isCordova) {
var text = 'Take a look at this Bitcoin transaction here: '+explorerTxUrl;
window.plugins.socialsharing.share(text, null, null, null);
} else {
ionicToast.show(gettextCatalog.getString('Copied to clipboard'), 'bottom', false, 3000);
clipboardService.copyToClipboard(explorerTxUrl);
}
};
$scope.showWalletSelector = function() {
$scope.walletSelector = true;
@ -50,6 +45,7 @@ angular.module('copayApp.controllers').controller('confirmController', function(
$ionicConfig.views.swipeBackEnabled(false);
});
function exitWithError(err) {
$log.info('Error setting wallet selector:' + err);
popupService.showAlert(gettextCatalog.getString(), bwcError.msg(err), function() {
@ -72,108 +68,112 @@ angular.module('copayApp.controllers').controller('confirmController', function(
});
};
var setWalletSelector = function(coin, network, minAmount, cb) {
$scope.$on("$ionicView.beforeEnter", function(event, data) {
// no min amount? (sendMax) => look for no empty wallets
minAmount = minAmount || 1;
function setWalletSelector(coin, network, minAmount, cb) {
$scope.wallets = profileService.getWallets({
onlyComplete: true,
network: network,
coin: coin
});
// no min amount? (sendMax) => look for no empty wallets
minAmount = minAmount || 1;
if (tx.fromWalletId) {
$scope.wallets = lodash.filter($scope.wallets, function (w) {
return w.id == tx.fromWalletId;
$scope.wallets = profileService.getWallets({
onlyComplete: true,
network: network,
coin: coin
});
}
if (tx.fromWalletId) {
$scope.wallets = lodash.filter($scope.wallets, function(w) {
return w.id == tx.fromWalletId;
});
}
if (!$scope.wallets || !$scope.wallets.length) {
setNoWallet(gettextCatalog.getString('No wallets available'), true);
return cb();
}
var filteredWallets = [];
var index = 0;
var walletsUpdated = 0;
if (!$scope.wallets || !$scope.wallets.length) {
setNoWallet(gettextCatalog.getString('No wallets available'), true);
return cb();
}
lodash.each($scope.wallets, function (w) {
walletService.getStatus(w, {}, function (err, status) {
if (err || !status) {
$log.error(err);
} else {
walletsUpdated++;
w.status = status;
var filteredWallets = [];
var index = 0;
var walletsUpdated = 0;
if (!status.availableBalanceSat)
$log.debug('No balance available in: ' + w.name);
lodash.each($scope.wallets, function(w) {
walletService.getStatus(w, {}, function(err, status) {
if (err || !status) {
$log.error(err);
} else {
walletsUpdated++;
w.status = status;
if (status.availableBalanceSat > minAmount) {
filteredWallets.push(w);
if (!status.availableBalanceSat)
$log.debug('No balance available in: ' + w.name);
if (status.availableBalanceSat > minAmount) {
filteredWallets.push(w);
}
}
}
if (++index == $scope.wallets.length) {
if (!walletsUpdated)
return cb('Could not update any wallet');
if (++index == $scope.wallets.length) {
if (!walletsUpdated)
return cb('Could not update any wallet');
if (lodash.isEmpty(filteredWallets)) {
setNoWallet(gettextCatalog.getString('Insufficient confirmed funds'), true);
if (lodash.isEmpty(filteredWallets)) {
setNoWallet(gettextCatalog.getString('Insufficient confirmed funds'), true);
}
$scope.wallets = lodash.clone(filteredWallets);
return cb();
}
$scope.wallets = lodash.clone(filteredWallets);
return cb();
}
});
});
};
$scope.getContacts = function(addr) {
addressbookService.list(function(err, ab) {
if (err) $log.error(err);
$scope.hasContacts = lodash.isEmpty(ab) ? false : true;
if (!$scope.hasContacts) return cb();
var completeContacts = [];
lodash.each(ab, function(v, k) {
completeContacts.push({
name: lodash.isObject(v) ? v.name : v,
address: k,
email: lodash.isObject(v) ? v.email : null,
recipientType: 'contact',
coin: v.coin,
displayCoin: (v.coin == 'bch'
? (config.bitcoinCashAlias || defaults.bitcoinCashAlias)
: (config.bitcoinAlias || defaults.bitcoinAlias)).toUpperCase()
});
});
};
return cb();
});
};
$scope.$on("$ionicView.beforeEnter", function(event, data) {
$scope.fromWallet = profileService.getWallet(data.stateParams.fromWalletId); // Wallet to send from
// Setup $scope
var B = data.stateParams.coin == 'bch' ? bitcoreCash : bitcore;
var networkName;
try {
networkName = (new B.Address(data.stateParams.toAddress)).network.name;
} catch(e) {
var message = gettextCatalog.getString('Invalid address');
var backText = gettextCatalog.getString('Go back');
var learnText = gettextCatalog.getString('Learn more');
popupService.showConfirm(null, message, backText, learnText, function(back) {
$ionicHistory.nextViewOptions({
disableAnimate: true,
historyRoot: true
});
$state.go('tabs.send').then(function() {
$ionicHistory.clearHistory();
if (!back) {
var url = 'https://support.bitpay.com/hc/en-us/articles/115004671663';
externalLinkService.open(url);
}
});
});
return;
}
// Grab stateParams
tx = {
amount: parseInt(data.stateParams.amount),
toAmount: parseInt(data.stateParams.toAmount),
sendMax: data.stateParams.useSendMax == 'true' ? true : false,
fromWalletId: data.stateParams.fromWalletId,
toAddress: data.stateParams.toAddress,
displayAddress: data.stateParams.displayAddress,
description: data.stateParams.description,
paypro: data.stateParams.paypro,
feeLevel: configFeeLevel,
spendUnconfirmed: walletConfig.spendUnconfirmed,
// Vanity tx info (not in the real tx)
recipientType: $scope.recipientType || null,
toName: null,
toEmail: null,
toColor: null,
network: false,
coin: $scope.fromWallet.coin,
recipientType: data.stateParams.recipientType || null,
toName: data.stateParams.toName,
toEmail: data.stateParams.toEmail,
toColor: data.stateParams.toColor,
network: networkName,
coin: data.stateParams.coin,
txp: {},
};
@ -182,71 +182,18 @@ angular.module('copayApp.controllers').controller('confirmController', function(
tx.feeRate = parseInt(data.stateParams.requiredFeeRate);
}
if (tx.coin && tx.coin === 'bch') {
if (tx.coin && tx.coin == 'bch') {
tx.feeLevel = 'normal';
}
var B = data.stateParams.coin === 'bch' ? bitcoreCash : bitcore;
var networkName;
$scope.recipientType = null;
try {
if (data.stateParams.toWalletId) { // There is a toWalletId, so we presume this is a wallet-to-wallet transfer
$scope.recipientType = 'wallet'; // set transaction type to wallet-to-wallet
$ionicLoading.show();
var toWallet = profileService.getWallet(data.stateParams.toWalletId);
tx.toColor = toWallet.color;
tx.toName = toWallet.name;
// We need an address to send to, so we ask the walletService to create a new address for the toWallet.
walletService.getAddress(toWallet, true, function (err, addr) {
$ionicLoading.hide();
tx.toAddress = addr;
networkName = (new B.Address(tx.toAddress)).network.name;
tx.network = networkName;
setupTx(tx);
});
} else { // This is a Wallet-to-address transfer
networkName = (new B.Address(tx.toAddress)).network.name;
tx.network = networkName;
setupTx(tx);
}
} catch (e) {
var message = gettextCatalog.getString('Invalid address');
popupService.showAlert(null, message, function () {
$ionicHistory.nextViewOptions({
disableAnimate: true,
historyRoot: true
});
$state.go('tabs.send').then(function () {
$ionicHistory.clearHistory();
});
});
return;
}
});
var setupTx = function(tx) {
if (tx.coin === 'bch') {
tx.displayAddress = bitcoinCashJsService.readAddress(tx.toAddress).cashaddr;
} else {
tx.displayAddress = entry.address;
}
addressbookService.get(tx.coin+tx.toAddress, function(err, addr) { // Check if the recipient is a contact
if (!err && addr) {
tx.toName = addr.name;
tx.toEmail = addr.email;
tx.recipientType = 'contact';
}
});
// Other Scope vars
$scope.isCordova = isCordova;
$scope.isWindowsPhoneApp = isWindowsPhoneApp;
$scope.showAddress = false;
$scope.walletSelectorTitle = gettextCatalog.getString('Send from');
setWalletSelector(tx.coin, tx.network, tx.amount, function(err) {
setWalletSelector(tx.coin, tx.network, tx.toAmount, function(err) {
if (err) {
return exitWithError('Could not update wallets');
}
@ -260,7 +207,7 @@ angular.module('copayApp.controllers').controller('confirmController', function(
$scope.displayBalanceAsFiat = walletConfig.settings.priceDisplay === 'fiat';
};
});
function getSendMaxInfo(tx, wallet, cb) {
@ -284,7 +231,7 @@ angular.module('copayApp.controllers').controller('confirmController', function(
return setSendError(msg);
}
if (tx.amount > Number.MAX_SAFE_INTEGER) {
if (tx.toAmount > Number.MAX_SAFE_INTEGER) {
var msg = gettextCatalog.getString('Amount too big');
$log.warn(msg);
return setSendError(msg);
@ -294,7 +241,7 @@ angular.module('copayApp.controllers').controller('confirmController', function(
txp.outputs = [{
'toAddress': tx.toAddress,
'amount': tx.amount,
'amount': tx.toAmount,
'message': tx.description
}];
@ -333,13 +280,13 @@ angular.module('copayApp.controllers').controller('confirmController', function(
$scope.tx = tx;
function updateAmount() {
if (!tx.amount) return;
if (!tx.toAmount) return;
// Amount
tx.amountStr = txFormatService.formatAmountStr(wallet.coin, tx.amount);
tx.amountStr = txFormatService.formatAmountStr(wallet.coin, tx.toAmount);
tx.amountValueStr = tx.amountStr.split(' ')[0];
tx.amountUnitStr = tx.amountStr.split(' ')[1];
txFormatService.formatAlternativeStr(wallet.coin, tx.amount, function(v) {
txFormatService.formatAlternativeStr(wallet.coin, tx.toAmount, function(v) {
var parts = v.split(' ');
tx.alternativeAmountStr = v;
tx.alternativeAmountValueStr = parts[0];
@ -395,7 +342,7 @@ angular.module('copayApp.controllers').controller('confirmController', function(
}
tx.sendMaxInfo = sendMaxInfo;
tx.amount = tx.sendMaxInfo.amount;
tx.toAmount = tx.sendMaxInfo.amount;
updateAmount();
ongoingProcess.set('calculatingFee', false);
$timeout(function() {
@ -446,7 +393,7 @@ angular.module('copayApp.controllers').controller('confirmController', function(
function useSelectedWallet() {
if (!$scope.useSendMax) {
showAmount(tx.amount);
showAmount(tx.toAmount);
}
$scope.onWalletSelect($scope.wallet);
@ -455,19 +402,19 @@ angular.module('copayApp.controllers').controller('confirmController', function(
function setButtonText(isMultisig, isPayPro) {
if (isPayPro) {
if (isCordova) {
if (isCordova && !isWindowsPhoneApp) {
$scope.buttonText = gettextCatalog.getString('Slide to pay');
} else {
$scope.buttonText = gettextCatalog.getString('Click to pay');
}
} else if (isMultisig) {
if (isCordova) {
if (isCordova && !isWindowsPhoneApp) {
$scope.buttonText = gettextCatalog.getString('Slide to accept');
} else {
$scope.buttonText = gettextCatalog.getString('Click to accept');
}
} else {
if (isCordova) {
if (isCordova && !isWindowsPhoneApp) {
$scope.buttonText = gettextCatalog.getString('Slide to send');
} else {
$scope.buttonText = gettextCatalog.getString('Click to send');
@ -475,6 +422,7 @@ angular.module('copayApp.controllers').controller('confirmController', function(
}
};
$scope.toggleAddress = function() {
$scope.showAddress = !$scope.showAddress;
};
@ -517,8 +465,7 @@ angular.module('copayApp.controllers').controller('confirmController', function(
if (!lodash.isEmpty(warningMsg))
msg += '\n' + warningMsg;
popupService.showAlert(null, msg, function() {});
popupService.showAlert(null, msg, function() {});
};
$scope.onWalletSelect = function(wallet) {
@ -665,7 +612,6 @@ angular.module('copayApp.controllers').controller('confirmController', function(
txConfirmNotification.subscribe(wallet, {
txid: txp.txid
});
lastTxId = txp.txid;
}
}, onSendStatusChange);
};
@ -697,9 +643,9 @@ angular.module('copayApp.controllers').controller('confirmController', function(
soundService.play('misc/payment_sent.mp3');
}
var channel = "ga";
if (platformInfo.isCordova) {
channel = "firebase";
var channel = "firebase";
if (platformInfo.isNW) {
channel = "ga";
}
var log = new window.BitAnalytics.LogEvent("transfer_success", [{
"coin": $scope.wallet.coin,
@ -709,6 +655,8 @@ angular.module('copayApp.controllers').controller('confirmController', function(
}], [channel, "adjust"]);
window.BitAnalytics.LogEventHandlers.postEvent(log);
// Should be removed
firebaseEventsService.logEvent('sent_bitcoin', { coin: $scope.wallet.coin });
$timeout(function() {
$scope.$digest();
}, 100);

View file

@ -1,7 +1,7 @@
'use strict';
angular.module('copayApp.controllers').controller('createController',
function($scope, $timeout, $log, lodash, $state, $ionicScrollDelegate, $ionicHistory, profileService, configService, gettextCatalog, ledger, trezor, intelTEE, derivationPathHelper, ongoingProcess, walletService, popupService, appConfigService, pushNotificationsService, $ionicNavBarDelegate) {
function($scope, $rootScope, $timeout, $log, lodash, $state, $ionicScrollDelegate, $ionicHistory, profileService, configService, gettextCatalog, ledger, trezor, intelTEE, derivationPathHelper, ongoingProcess, walletService, storageService, popupService, appConfigService, pushNotificationsService, firebaseEventsService, $ionicNavBarDelegate) {
/* For compressed keys, m*73 + n*34 <= 496 */
var COPAYER_PAIR_LIMITS = {
@ -268,7 +268,7 @@ angular.module('copayApp.controllers').controller('createController',
}, 100);
}
else {
//firebaseEventsService.logEvent('wallet_created', { coin: opts.coin });
firebaseEventsService.logEvent('wallet_created', { coin: opts.coin });
$state.go('tabs.home');
}
}

View file

@ -17,7 +17,7 @@ angular.module('copayApp.controllers').controller('customAmountController', func
}
$scope.$on("$ionicView.beforeEnter", function(event, data) {
var walletId = data.stateParams.toWalletId;
var walletId = data.stateParams.id;
if (!walletId) {
showErrorAndBack('Error', 'No wallet selected');
@ -53,26 +53,17 @@ angular.module('copayApp.controllers').controller('customAmountController', func
$scope.address = bchAddresses[$scope.bchAddressType];
}
$scope.coin = $scope.wallet.coin;
var satoshis = parseInt(data.stateParams.amount, 10);
$scope.coin = data.stateParams.coin;
var parsedAmount = txFormatService.parseAmount(
$scope.wallet.coin,
satoshis,
'sat');
data.stateParams.amount,
data.stateParams.currency);
// Amount in USD or BTC
var amount = parsedAmount.amount;
var currency = parsedAmount.currency;
$scope.amountUnitStr = parsedAmount.amountUnitStr;
configService.whenAvailable(function (config) {
$scope.selectedPriceDisplay = config.wallet.settings.priceDisplay;
$timeout(function () {
$scope.$apply();
});
});
if (currency != 'BTC' && currency != 'BCH') {
// Convert to BTC or BCH
var config = configService.getSync().wallet.settings;

View file

@ -1,6 +1,6 @@
'use strict';
angular.module('copayApp.controllers').controller('tourController',
function ($scope, $state, $log, $timeout, $filter, ongoingProcess, configService, profileService, rateService, popupService, gettextCatalog, lodash, startupService, storageService, uxLanguage, walletService, $q) {
function($scope, $state, $log, $timeout, $filter, ongoingProcess, profileService, rateService, popupService, gettextCatalog, startupService, storageService, walletService, $q) {
$scope.data = {
index: 0
@ -46,90 +46,62 @@ angular.module('copayApp.controllers').controller('tourController',
creatingWallet = true;
ongoingProcess.set('creatingWallet', true);
$timeout(function() {
uxLanguage.init(function(lang) {
var rateCode = uxLanguage.getRateCode(lang);
console.log("When Available: rateService");
rateService.whenAvailable(function() {
var alternatives = rateService.listAlternatives(true);
profileService.createDefaultWallet(function(err, walletClients) {
if (err) {
$log.warn(err);
var newAltCurrency = lodash.find(alternatives, {
'isoCode': rateCode
return $timeout(function() {
$log.warn('Retrying to create default wallet.....:' + ++retryCount);
if (retryCount > 3) {
ongoingProcess.set('creatingWallet', false);
popupService.showAlert(
gettextCatalog.getString('Cannot Create Wallet'), err,
function() {
retryCount = 0;
return $scope.createDefaultWallet();
}, gettextCatalog.getString('Retry'));
} else {
return $scope.createDefaultWallet();
}
}, 2000);
};
ongoingProcess.set('creatingWallet', false);
var bchWallet = walletClients[0];
var btcWallet = walletClients[1];
var bchWalletId = bchWallet.credentials.walletId;
var btcWalletId = btcWallet.credentials.walletId;
function createAddressPromise(wallet) {
return $q(function(resolve, reject) {
walletService.getAddress(wallet, true, function(e, addr) {
if (e) reject(e);
resolve(addr);
});
configService.whenAvailable(function(config) {
var opts = {
wallet: {
settings: {
alternativeName: newAltCurrency.name,
alternativeIsoCode: newAltCurrency.isoCode,
}
}
};
configService.set(opts, function(err) {
if (err) $log.warn(err);
profileService.createDefaultWallet(function(err, walletClients) {
if (err) {
$log.warn(err);
return $timeout(function() {
$log.warn('Retrying to create default wallet.....:' + ++retryCount);
if (retryCount > 3) {
ongoingProcess.set('creatingWallet', false);
popupService.showAlert(
gettextCatalog.getString('Cannot Create Wallet'), err,
function() {
retryCount = 0;
return $scope.createDefaultWallet();
}, gettextCatalog.getString('Retry'));
} else {
return $scope.createDefaultWallet();
}
}, 2000);
}
;
ongoingProcess.set('creatingWallet', false);
var bchWallet = walletClients[0];
var btcWallet = walletClients[1];
var bchWalletId = bchWallet.credentials.walletId;
var btcWalletId = btcWallet.credentials.walletId;
function createAddressPromise(wallet) {
return $q(function (resolve, reject) {
walletService.getAddress(wallet, true, function (e, addr) {
if (e) reject(e);
resolve(addr);
});
});
}
function goToCollectEmail() {
$state.go('onboarding.collectEmail', {
bchWalletId: bchWalletId,
btcWalletId: btcWalletId
});
}
var bchAddressPromise = createAddressPromise(bchWallet);
var btcAddressPromise = createAddressPromise(btcWallet);
ongoingProcess.set('generatingNewAddress', true);
$q.all([bchAddressPromise, btcAddressPromise]).then(function (addresses) {
ongoingProcess.set('generatingNewAddress', false);
$state.go('tabs.home');
}, function (e) {
ongoingProcess.set('generatingNewAddress', false);
$log.warn(e);
popupService.showAlert(gettextCatalog.getString('Error'), e);
$state.go('tabs.home');
});
});
});
});
$log.debug('Setting default currency : ' + newAltCurrency);
});
})
}, 300);
};
});
}
function goToCollectEmail() {
$state.go('onboarding.collectEmail', {
bchWalletId: bchWalletId,
btcWalletId: btcWalletId
});
}
var bchAddressPromise = createAddressPromise(bchWallet);
var btcAddressPromise = createAddressPromise(btcWallet);
ongoingProcess.set('generatingNewAddress', true);
$q.all([bchAddressPromise, btcAddressPromise]).then(function(addresses) {
ongoingProcess.set('generatingNewAddress', false);
$state.go('tabs.home');
}, function(e) {
ongoingProcess.set('generatingNewAddress', false);
$log.warn(e);
popupService.showAlert(gettextCatalog.getString('Error'), e);
$state.go('tabs.home');
});
});
}, 300);
};
});

View file

@ -76,9 +76,9 @@ angular.module('copayApp.controllers').controller('preferencesNotificationsContr
emailService.updateEmail(opts);
var channel = "ga";
if (platformInfo.isCordova) {
channel = "firebase";
var channel = "firebase";
if (platformInfo.isNW) {
channel = "ga";
}
var log = new window.BitAnalytics.LogEvent("settings_email_notification_toggle", [{
"toggle": $scope.emailNotifications.value

View file

@ -1,974 +0,0 @@
'use strict';
(function () {
angular
.module('copayApp.controllers')
.controller('reviewController', reviewController);
function reviewController(addressbookService, bitcoinCashJsService, bitcore, bitcoreCash, bwcError, clipboardService, configService, feeService, gettextCatalog, $interval, $ionicHistory, $ionicModal, ionicToast, lodash, $log, ongoingProcess, platformInfo, popupService, profileService, $scope, sendFlowService, shapeshiftService, soundService, $state, $timeout, txConfirmNotification, txFormatService, walletService) {
var vm = this;
vm.buttonText = '';
vm.destination = {
address: '',
balanceAmount: '',
balanceCurrency: '',
coin: '',
color: '',
currency: '',
currencyColor: '',
kind: '', // 'address', 'contact', 'wallet'
name: ''
};
vm.displayAddress = '';
vm.feeCrypto = '';
vm.feeFiat = '';
vm.fiatCurrency = '';
vm.feeIsHigh = false;
vm.feeLessThanACent = false;
vm.isCordova = platformInfo.isCordova;
vm.memo = '';
vm.notReadyMessage = '';
vm.origin = {
balanceAmount: '',
balanceCurrency: '',
currency: '',
currencyColor: '',
};
vm.originWallet = null;
vm.paymentExpired = false;
vm.personalNotePlaceholder = gettextCatalog.getString('Enter text here');
vm.primaryAmount = '';
vm.primaryCurrency = '';
vm.usingMerchantFee = false;
vm.readyToSend = false;
vm.remainingTimeStr = '';
vm.secondaryAmount = '';
vm.secondaryCurrency = '';
vm.sendingTitle = gettextCatalog.getString('You are sending');
vm.sendStatus = '';
vm.showAddress = true;
vm.thirdParty = false;
vm.wallet = null;
vm.memoExpanded = false;
// Functions
vm.goBack = goBack;
vm.onSuccessConfirm = onSuccessConfirm;
vm.onShareTransaction = onShareTransaction;
var sendFlowData;
var config = null;
var coin = '';
var countDown = null;
var defaults = {};
var usingCustomFee = false;
var usingMerchantFee = false;
var destinationWalletId = '';
var lastTxId = '';
var originWalletId = '';
var priceDisplayIsFiat = true;
var satoshis = null;
var toAddress = '';
var tx = {};
var txPayproData = null;
var unitFromSat = 0;
var FEE_TOO_HIGH_LIMIT_PERCENTAGE = 15;
$scope.$on("$ionicView.beforeEnter", onBeforeEnter);
function onBeforeEnter(event, data) {
console.log('review onBeforeEnter sendflow ', sendFlowService.state);
// Reset from last time
vm.memo = '';
defaults = configService.getDefaults();
sendFlowData = sendFlowService.state.getClone();
originWalletId = sendFlowData.fromWalletId;
if (typeof sendFlowData.amount === 'string') {
satoshis = parseInt(sendFlowData.amount, 10);
} else {
satoshis = sendFlowData.amount;
}
toAddress = sendFlowData.toAddress;
destinationWalletId = sendFlowData.toWalletId;
vm.displayAddress = sendFlowData.displayAddress;
vm.originWallet = profileService.getWallet(originWalletId);
vm.origin.currency = vm.originWallet.coin.toUpperCase();
coin = vm.originWallet.coin;
if (sendFlowData.thirdParty) {
vm.thirdParty = sendFlowData.thirdParty;
switch (vm.thirdParty.id) {
case 'shapeshift':
initShapeshift(function (err) {
if (err) {
// Error stop here
ongoingProcess.set('connectingShapeshift', false);
popupService.showAlert(gettextCatalog.getString('Shapeshift Error'), err.toString(), function () {
$ionicHistory.goBack();
});
} else {
_next(data);
}
});
break;
case 'bip70':
initBip70();
default:
_next(data);
break;
}
} else {
_next(data);
}
function _next() {
configService.get(function onConfig(err, configCache) {
if (err) {
$log.err('Error getting config.', err);
} else {
config = configCache;
priceDisplayIsFiat = config.wallet.settings.priceDisplay === 'fiat';
vm.origin.currencyColor = (vm.originWallet.coin === 'btc' ? defaults.bitcoinWalletColor : defaults.bitcoinCashWalletColor);
console.log("coin", vm.originWallet.coin, vm.origin.currencyColor, config.bitcoinWalletColor, vm.originWallet.coin === 'btc');
unitFromSat = 1 / config.wallet.settings.unitToSatoshi;
}
updateSendAmounts();
getOriginWalletBalance(vm.originWallet);
handleDestinationAsAddress(toAddress, coin);
handleDestinationAsWallet(sendFlowData.toWalletId);
createVanityTransaction(data);
});
}
}
vm.approve = function() {
if (!tx || !vm.originWallet) return;
if (vm.paymentExpired) {
popupService.showAlert(null, gettextCatalog.getString('This bitcoin payment request has expired.', function () {
$ionicHistory.goBack();
}));
vm.sendStatus = '';
$timeout(function() {
$scope.$apply();
});
return;
}
ongoingProcess.set('creatingTx', true, statusChangeHandler);
getTxp(lodash.clone(tx), vm.originWallet, false, function(err, txp) {
ongoingProcess.set('creatingTx', false, statusChangeHandler);
if (err) return;
// confirm txs for more that 20usd, if not spending/touchid is enabled
function confirmTx(cb) {
if (walletService.isEncrypted(vm.originWallet))
return cb();
var amountUsd = parseFloat(txFormatService.formatToUSD(vm.originWallet.coin, txp.amount));
return cb();
};
function publishAndSign() {
if (!vm.originWallet.canSign() && !vm.originWallet.isPrivKeyExternal()) {
$log.info('No signing proposal: No private key');
return walletService.onlyPublish(vm.originWallet, txp, function(err) {
if (err) setSendError(err);
}, statusChangeHandler);
}
walletService.publishAndSign(vm.originWallet, txp, function(err, txp) {
if (err) return setSendError(err);
if (config.confirmedTxsNotifications && config.confirmedTxsNotifications.enabled) {
txConfirmNotification.subscribe(vm.originWallet, {
txid: txp.txid
});
lastTxId = txp.txid;
}
}, statusChangeHandler);
};
confirmTx(function(nok) {
if (nok) {
vm.sendStatus = '';
$timeout(function() {
$scope.$apply();
});
return;
}
publishAndSign();
});
});
};
vm.chooseFeeLevel = function(tx, wallet) {
if (wallet.coin == 'bch') return;
if (usingMerchantFee) return;
var scope = $rootScope.$new(true);
scope.network = tx.network;
scope.feeLevel = tx.feeLevel;
scope.noSave = true;
scope.coin = vm.originWallet.coin;
if (usingCustomFee) {
scope.customFeePerKB = tx.feeRate;
scope.feePerSatByte = tx.feeRate / 1000;
}
$ionicModal.fromTemplateUrl('views/modals/chooseFeeLevel.html', {
scope: scope,
backdropClickToClose: false,
hardwareBackButtonClose: false
}).then(function(modal) {
scope.chooseFeeLevelModal = modal;
scope.openModal();
});
scope.openModal = function() {
scope.chooseFeeLevelModal.show();
};
scope.hideModal = function(newFeeLevel, customFeePerKB) {
scope.chooseFeeLevelModal.hide();
$log.debug('New fee level choosen:' + newFeeLevel + ' was:' + tx.feeLevel);
usingCustomFee = newFeeLevel == 'custom' ? true : false;
if (tx.feeLevel == newFeeLevel && !usingCustomFee) return;
tx.feeLevel = newFeeLevel;
if (usingCustomFee) tx.feeRate = parseInt(customFeePerKB);
updateTx(tx, vm.originWallet, {
clearCache: true,
dryRun: true
}, function() {});
};
};
function createVanityTransaction(data) {
console.log('createVanityTransaction()');
var configFeeLevel = config.wallet.settings.feeLevel ? config.wallet.settings.feeLevel : 'normal';
// Grab stateParams
tx = {
amount: parseInt(sendFlowData.amount),
sendMax: sendFlowData.sendMax,
fromWalletId: sendFlowData.fromWalletId,
toAddress: sendFlowData.toAddress,
paypro: txPayproData,
feeLevel: configFeeLevel,
spendUnconfirmed: config.wallet.spendUnconfirmed,
// Vanity tx info (not in the real tx)
recipientType: vm.destination.kind || null,
toName: vm.destination.name || null,
toEmail: vm.destination.email || null,
toColor: vm.destination.color || null,
network: false,
coin: vm.originWallet.coin,
txp: {},
};
if (data.stateParams.requiredFeeRate) {
vm.usingMerchantFee = true;
tx.feeRate = parseInt(data.stateParams.requiredFeeRate);
}
if (tx.coin && tx.coin === 'bch') {
tx.feeLevel = 'normal';
}
var B = tx.coin === 'bch' ? bitcoreCash : bitcore;
var networkName;
try {
if (vm.destination.kind === 'wallet') { // This is a wallet-to-wallet transfer
ongoingProcess.set('generatingNewAddress', true);
var toWallet = profileService.getWallet(destinationWalletId);
// We need an address to send to, so we ask the walletService to create a new address for the toWallet.
console.log('Getting address for wallet...');
walletService.getAddress(toWallet, true, function onWalletAddress(err, addr) {
console.log('getAddress cb called', err);
ongoingProcess.set('generatingNewAddress', false);
tx.toAddress = addr;
networkName = (new B.Address(tx.toAddress)).network.name;
tx.network = networkName;
console.log('calling setupTx() for wallet.');
setupTx(tx);
});
} else { // This is a Wallet-to-address transfer
networkName = (new B.Address(tx.toAddress)).network.name;
tx.network = networkName;
console.log('calling setupTx() for address.');
setupTx(tx);
}
} catch (e) {
console.error('Error setting up tx', e);
var message = gettextCatalog.getString('Invalid address');
popupService.showAlert(null, message, function () {
$ionicHistory.nextViewOptions({
disableAnimate: true,
historyRoot: true
});
$state.go('tabs.send').then(function () {
$ionicHistory.clearHistory();
});
});
return;
}
}
function getOriginWalletBalance(originWallet) {
var balanceText = getWalletBalanceDisplayText(vm.originWallet);
vm.origin.balanceAmount = balanceText.amount;
vm.origin.balanceCurrency = balanceText.currency;
}
function getSendMaxInfo(tx, wallet, cb) {
if (!tx.sendMax) return cb();
//ongoingProcess.set('retrievingInputs', true);
walletService.getSendMaxInfo(wallet, {
feePerKb: tx.feeRate,
excludeUnconfirmedUtxos: !tx.spendUnconfirmed,
returnInputs: true,
}, cb);
};
function getTxp(tx, wallet, dryRun, cb) {
// ToDo: use a credential's (or fc's) function for this
if (tx.description && !wallet.credentials.sharedEncryptingKey) {
var msg = gettextCatalog.getString('Could not add message to imported wallet without shared encrypting key');
$log.warn(msg);
return setSendError(msg);
}
if (tx.amount > Number.MAX_SAFE_INTEGER) {
var msg = gettextCatalog.getString('Amount too big');
$log.warn(msg);
return setSendError(msg);
}
var txp = {};
txp.outputs = [{
'toAddress': tx.toAddress,
'amount': tx.amount,
'message': vm.memo
}];
if (tx.sendMaxInfo) {
txp.inputs = tx.sendMaxInfo.inputs;
txp.fee = tx.sendMaxInfo.fee;
} else {
if (usingCustomFee || usingMerchantFee) {
txp.feePerKb = tx.feeRate;
} else txp.feeLevel = tx.feeLevel;
}
txp.message = vm.memo;
if (tx.paypro) {
txp.payProUrl = tx.paypro.url;
}
txp.excludeUnconfirmedUtxos = !tx.spendUnconfirmed;
txp.dryRun = dryRun;
walletService.createTx(wallet, txp, function(err, ctxp) {
if (err) {
setSendError(err);
return cb(err);
}
return cb(null, ctxp);
});
};
function getWalletBalanceDisplayText(wallet) {
var balanceCryptoAmount = '';
var balanceCryptoCurrencyCode = '';
var balanceFiatAmount = '';
var balanceFiatCurrency = '';
var displayAmount = '';
var displayCurrency = '';
var walletStatus = null;
if (wallet.status && wallet.status.isValid) {
walletStatus = wallet.status;
} else if (wallet.cachedStatus.isValid) {
walletStatus = wallet.cachedStatus;
}
if (walletStatus) {
var cryptoBalanceParts = walletStatus.spendableBalanceStr.split(' ');
balanceCryptoAmount = cryptoBalanceParts[0];
balanceCryptoCurrencyCode = cryptoBalanceParts.length > 1 ? cryptoBalanceParts[1] : '';
if (walletStatus.alternativeBalanceAvailable) {
balanceFiatAmount = walletStatus.spendableBalanceAlternative;
balanceFiatCurrency = walletStatus.alternativeIsoCode;
}
}
if (priceDisplayIsFiat) {
displayAmount = balanceFiatAmount ? balanceFiatAmount : balanceCryptoAmount;
displayCurrency = balanceFiatAmount ? balanceFiatCurrency : balanceCryptoCurrencyCode;
} else {
displayAmount = balanceCryptoAmount;
displayCurrency = balanceCryptoCurrencyCode;
}
return {
amount: displayAmount,
currency: displayCurrency
};
}
function goBack() {
sendFlowService.router.goBack();
}
function handleDestinationAsAddress(address, originCoin) {
if (!address) {
return;
}
// Check if the recipient is a contact
addressbookService.get(originCoin + address, function(err, contact) {
if (!err && contact) {
handleDestinationAsAddressOfContact(contact);
} else {
if (originCoin === 'bch') {
vm.destination.address = bitcoinCashJsService.readAddress(address).cashaddr;
} else {
vm.destination.address = address;
}
vm.destination.kind = 'address';
}
});
}
function handleDestinationAsAddressOfContact(contact) {
vm.destination.kind = 'contact';
vm.destination.name = contact.name;
vm.destination.email = contact.email;
vm.destination.color = contact.coin === 'btc' ? defaults.bitcoinWalletColor : defaults.bitcoinCashWalletColor;
vm.destination.currency = contact.coin.toUpperCase();
vm.destination.currencyColor = vm.destination.color;
}
function handleDestinationAsWallet(walletId) {
destinationWalletId = walletId;
if (!destinationWalletId) {
return;
}
var destinationWallet = profileService.getWallet(destinationWalletId);
vm.destination.coin = destinationWallet.coin;
vm.destination.color = destinationWallet.color;
vm.destination.currency = destinationWallet.coin.toUpperCase();
vm.destination.kind = 'wallet';
vm.destination.name = destinationWallet.name;
if (defaults) {
vm.destination.currencyColor = vm.destination.coin === 'btc' ? defaults.bitcoinWalletColor : defaults.bitcoinCashWalletColor;
}
var balanceText = getWalletBalanceDisplayText(destinationWallet);
vm.destination.balanceAmount = balanceText.amount;
vm.destination.balanceCurrency = balanceText.currency;
}
function initBip70() {
vm.sendingTitle = gettextCatalog.getString('You are paying');
vm.memo = vm.thirdParty.memo;
vm.memoExpanded = !!vm.memo;
vm.destination.name = vm.thirdParty.name;
txPayproData = {
caTrusted: vm.thirdParty.caTrusted,
domain: vm.thirdParty.domain,
expires: vm.thirdParty.expires,
toAddress: toAddress,
url: vm.thirdParty.url,
verified: vm.thirdParty.verified,
};
}
function initShapeshift(cb) {
vm.sendingTitle = gettextCatalog.getString('You are shifting');
if (!vm.thirdParty.data) {
vm.thirdParty.data = {};
}
var toWallet = profileService.getWallet(destinationWalletId);
vm.destination.name = toWallet.name;
vm.destination.color = toWallet.color;
vm.destination.currency = toWallet.coin.toUpperCase();
ongoingProcess.set('connectingShapeshift', true);
walletService.getAddress(vm.originWallet, false, function onReturnWalletAddress(err, returnAddr) {
if (err) {
return cb(err);
}
walletService.getAddress(toWallet, false, function onWithdrawalWalletAddress(err, withdrawalAddr) {
if (err) {
return cb(err);
}
// Need to use the correct service to do it.
var amount = parseFloat(satoshis / 100000000);
shapeshiftService.shiftIt(vm.originWallet.coin, toWallet.coin, withdrawalAddr, returnAddr, amount, function onShiftIt(err, shapeshiftData) {
if (err) {
return cb(err);
} else {
vm.destination.kind = 'shapeshift';
vm.destination.address = toAddress;
tx.toAddress = shapeshiftData.toAddress;
vm.memo = 'ShapeShift Order:\nhttps://www.shapeshift.io/#/status/' + shapeshiftData.orderId;
vm.memoExpanded = !!vm.memo;
ongoingProcess.set('connectingShapeshift', false);
cb();
}
});
});
});
}
function onShareTransaction() {
var explorerTxUrl = 'https://explorer.bitcoin.com/' + tx.coin + '/tx/' + lastTxId;
if (platformInfo.isCordova) {
var text = gettextCatalog.getString('Take a look at this Bitcoin Cash transaction here: ') + explorerTxUrl;
if (coin === 'btc') {
text = gettextCatalog.getString('Take a look at this Bitcoin transaction here: ') + explorerTxUrl;
}
window.plugins.socialsharing.share(text, null, null, null);
} else {
ionicToast.show(gettextCatalog.getString('Copied to clipboard'), 'bottom', false, 3000);
clipboardService.copyToClipboard(explorerTxUrl);
}
}
function startExpirationTimer(expirationTime) {
vm.paymentExpired = false;
setExpirationTime();
countDown = $interval(function() {
setExpirationTime();
}, 1000);
function setExpirationTime() {
console.log('setExpirationTime()');
var now = Math.floor(Date.now() / 1000);
if (now > expirationTime) {
setExpiredValues();
return;
}
var totalSecs = expirationTime - now;
var m = Math.floor(totalSecs / 60);
var s = totalSecs % 60;
vm.remainingTimeStr = m + ":" + ('0' + s).slice(-2);
};
function setExpiredValues() {
vm.paymentExpired = true;
vm.remainingTimeStr = gettextCatalog.getString('Expired');
vm.readyToSend = false;
if (countDown) $interval.cancel(countDown);
$timeout(function() {
$scope.$apply();
});
};
};
function updateSendAmounts() {
if (typeof satoshis !== 'number') {
return;
}
var cryptoAmount = '';
var cryptoCurrencyCode = '';
var amountStr = txFormatService.formatAmountStr(coin, satoshis);
if (amountStr) {
var amountParts = amountStr.split(' ');
cryptoAmount = amountParts[0];
cryptoCurrencyCode = amountParts.length > 1 ? amountParts[1] : '';
}
// Want to avoid flashing of amount strings so do all formatting after this has returned.
txFormatService.formatAlternativeStr(coin, satoshis, function(v) {
if (!v) {
vm.primaryAmount = cryptoAmount;
vm.primaryCurrency = cryptoCurrencyCode;
vm.secondaryAmount = '';
vm.secondaryCurrency = '';
return;
}
vm.secondaryAmount = vm.primaryAmount;
vm.secondaryCurrency = vm.primaryCurrency;
var fiatParts = v.split(' ');
var fiatAmount = fiatParts[0];
var fiatCurrency = fiatParts.length > 1 ? fiatParts[1] : '';
if (priceDisplayIsFiat) {
vm.primaryAmount = fiatAmount;
vm.primaryCurrency = fiatCurrency;
vm.secondaryAmount = cryptoAmount;
vm.secondaryCurrency = cryptoCurrencyCode;
} else {
vm.primaryAmount = cryptoAmount;
vm.primaryCurrency = cryptoCurrencyCode;
vm.secondaryAmount = fiatAmount;
vm.secondaryCurrency = fiatCurrency;
}
});
}
function onSuccessConfirm() {
vm.sendStatus = '';
$ionicHistory.nextViewOptions({
disableAnimate: true,
historyRoot: true
});
$state.go('tabs.send').then(function() {
$ionicHistory.clearHistory();
$state.transitionTo('tabs.home');
});
};
function setButtonText(isMultisig, isPayPro) {
if (isPayPro) {
if (vm.isCordova) {
vm.buttonText = gettextCatalog.getString('Slide to pay');
} else {
vm.buttonText = gettextCatalog.getString('Click to pay');
}
} else if (isMultisig) {
if (vm.isCordova) {
vm.buttonText = gettextCatalog.getString('Slide to accept');
} else {
vm.buttonText = gettextCatalog.getString('Click to accept');
}
} else {
if (vm.isCordova) {
vm.buttonText = gettextCatalog.getString('Slide to send');
} else {
vm.buttonText = gettextCatalog.getString('Click to send');
}
}
}
function setNotReady(msg, criticalError) {
vn.readyToSend = false;
vm.notReadyMessage = msg;
$scope.criticalError = criticalError;
$log.warn('Not ready to make the payment:' + msg);
$timeout(function() {
$scope.$apply();
});
};
function setSendError(msg) {
$scope.sendStatus = '';
vm.readyToSend = false;
$timeout(function() {
$scope.$apply();
});
popupService.showAlert(gettextCatalog.getString('Error at confirm'), bwcError.msg(msg), function () {
$ionicHistory.goBack();
});
};
function setupTx(tx) {
if (tx.coin === 'bch') {
tx.displayAddress = bitcoinCashJsService.readAddress(tx.toAddress).cashaddr;
} else {
tx.displayAddress = tx.toAddress;
}
addressbookService.get(tx.coin+tx.toAddress, function(err, addr) { // Check if the recipient is a contact
if (!err && addr) {
tx.toName = addr.name;
tx.toEmail = addr.email;
tx.recipientType = 'contact';
}
});
vm.showAddress = false;
setButtonText(vm.originWallet.credentials.m > 1, !!tx.paypro);
if (tx.paypro)
startExpirationTimer(tx.paypro.expires);
popupService.showConfirm(null, 'Do you want this transaction to be sent without a fee?', 'Yes', 'No', function(ok) {
if(ok){
tx.feeRate = 0;
// tx.feeLevel = 'free';
usingCustomFee = true;
}
updateTx(tx, vm.originWallet, {
dryRun: true
}, function(err) {
$timeout(function() {
$scope.$apply();
}, 10);
});
});
// setWalletSelector(tx.coin, tx.network, tx.amount, function(err) {
// if (err) {
// return exitWithError('Could not update wallets');
// }
//
// if (vm.wallets.length > 1) {
// vm.showWalletSelector();
// } else if (vm.wallets.length) {
// setWallet(vm.wallets[0], tx);
// }
// });
}
function showSendMaxWarning(wallet, sendMaxInfo) {
var feeAlternative = '',
msg = '';
function verifyExcludedUtxos() {
var warningMsg = [];
if (sendMaxInfo.utxosBelowFee > 0) {
warningMsg.push(gettextCatalog.getString("A total of {{amountBelowFeeStr}} were excluded. These funds come from UTXOs smaller than the network fee provided.", {
amountBelowFeeStr: txFormatService.formatAmountStr(wallet.coin, sendMaxInfo.amountBelowFee)
}));
}
if (sendMaxInfo.utxosAboveMaxSize > 0) {
warningMsg.push(gettextCatalog.getString("A total of {{amountAboveMaxSizeStr}} were excluded. The maximum size allowed for a transaction was exceeded.", {
amountAboveMaxSizeStr: txFormatService.formatAmountStr(vm.originWallet.coin, sendMaxInfo.amountAboveMaxSize)
}));
}
return warningMsg.join('\n');
};
feeAlternative = txFormatService.formatAlternativeStr(vm.originWallet.coin, sendMaxInfo.fee);
if (feeAlternative) {
msg = gettextCatalog.getString("{{feeAlternative}} will be deducted for bitcoin networking fees ({{fee}}).", {
fee: txFormatService.formatAmountStr(vm.originWallet.coin, sendMaxInfo.fee),
feeAlternative: feeAlternative
});
} else {
msg = gettextCatalog.getString("{{fee}} will be deducted for bitcoin networking fees).", {
fee: txFormatService.formatAmountStr(vm.originWallet.coin, sendMaxInfo.fee)
});
}
var warningMsg = verifyExcludedUtxos();
if (!lodash.isEmpty(warningMsg))
msg += '\n' + warningMsg;
popupService.showAlert(null, msg, function() {});
//popupService.showConfirm(null, msg, null, null, function() {});
};
function statusChangeHandler(processName, showName, isOn) {
$log.debug('statusChangeHandler: ', processName, showName, isOn);
if (
(
processName === 'broadcastingTx' ||
((processName === 'signingTx') && vm.originWallet.m > 1) ||
(processName == 'sendingTx' && !vm.originWallet.canSign() && !vm.originWallet.isPrivKeyExternal())
) && !isOn) {
// Show the popup
vm.sendStatus = 'success';
// Clear the send flow service state
sendFlowService.state.clear();
if ($state.current.name === "tabs.send.review") { // XX SP: Otherwise all open wallets on other devices play this sound if you have been in a send flow before on that device.
soundService.play('misc/payment_sent.mp3');
}
var channel = "firebase";
if (platformInfo.isNW) {
channel = "ga";
}
// When displaying Fiat, if the formatting fails, the crypto will be the primary amount.
var amount = unitFromSat * satoshis;
var log = new window.BitAnalytics.LogEvent("transfer_success", [{
"coin": vm.originWallet.coin,
"type": "outgoing",
"amount": amount,
"fees": vm.feeCrypto
}], [channel, "adjust"]);
window.BitAnalytics.LogEventHandlers.postEvent(log);
$timeout(function() {
$scope.$digest();
}, 100);
} else if (showName) {
vm.sendStatus = showName;
}
};
function updateTx(tx, wallet, opts, cb) {
ongoingProcess.set('calculatingFee', true);
if (opts.clearCache) {
tx.txp = {};
}
// $scope.tx = tx;
// function updateAmount() {
// if (!tx.amount) return;
//
// // Amount
// tx.amountStr = txFormatService.formatAmountStr(originWallet.coin, tx.amount);
// tx.amountValueStr = tx.amountStr.split(' ')[0];
// tx.amountUnitStr = tx.amountStr.split(' ')[1];
// txFormatService.formatAlternativeStr(wallet.coin, tx.amount, function(v) {
// var parts = v.split(' ');
// tx.alternativeAmountStr = v;
// tx.alternativeAmountValueStr = parts[0];
// tx.alternativeAmountUnitStr = (parts.length > 0) ? parts[1] : '';
// });
// }
//
// updateAmount();
// refresh();
var feeServiceLevel = usingMerchantFee && vm.originWallet.coin == 'btc' ? 'urgent' : tx.feeLevel;
feeService.getFeeRate(vm.originWallet.coin, tx.network, feeServiceLevel, function(err, feeRate) {
if (err) {
ongoingProcess.set('calculatingFee', false);
return cb(err);
}
var msg;
// if (tx.feeLevel == 'free'){
// tx.feeRate = 0;
// }
// else
if (usingCustomFee) {
msg = gettextCatalog.getString('Custom');
tx.feeLevelName = msg;
} else if (usingMerchantFee) {
$log.info('Using Merchant Fee:' + tx.feeRate + ' vs. Urgent level:' + feeRate);
msg = gettextCatalog.getString('Suggested by Merchant');
tx.feeLevelName = msg;
} else {
tx.feeLevelName = feeService.feeOpts[tx.feeLevel];
tx.feeRate = feeRate;
}
getSendMaxInfo(lodash.clone(tx), wallet, function(err, sendMaxInfo) {
if (err) {
ongoingProcess.set('calculatingFee', false);
var msg = gettextCatalog.getString('Error getting SendMax information');
return setSendError(msg);
}
if (sendMaxInfo) {
$log.debug('Send max info', sendMaxInfo);
if (tx.sendMax && sendMaxInfo.amount == 0) {
ongoingProcess.set('calculatingFee', false);
setNotReady(gettextCatalog.getString('Insufficient confirmed funds'));
popupService.showAlert(gettextCatalog.getString('Error'), gettextCatalog.getString('Not enough funds for fee'), function () {
$ionicHistory.goBack();
});
return cb('no_funds');
}
tx.sendMaxInfo = sendMaxInfo;
tx.amount = tx.sendMaxInfo.amount;
satoshis = tx.amount;
updateSendAmounts();
ongoingProcess.set('calculatingFee', false);
$timeout(function() {
showSendMaxWarning(wallet, sendMaxInfo);
}, 200);
}
// txp already generated for this wallet?
if (tx.txp[wallet.id]) {
ongoingProcess.set('calculatingFee', false);
vm.readyToSend = true;
updateSendAmounts();
$scope.$apply();
return cb();
}
console.log('calling getTxp() from getSendMaxInfo cb.');
getTxp(lodash.clone(tx), wallet, opts.dryRun, function(err, txp) {
ongoingProcess.set('calculatingFee', false);
if (err) {
if (err.message == 'Insufficient funds') {
setNotReady(gettextCatalog.getString('Insufficient funds'));
popupService.showAlert(gettextCatalog.getString('Error'), gettextCatalog.getString('Not enough funds for fee'));
return cb('no_funds');
} else
return cb(err);
}
txp.feeStr = txFormatService.formatAmountStr(wallet.coin, txp.fee);
txFormatService.formatAlternativeStr(wallet.coin, txp.fee, function(v) {
// txp.alternativeFeeStr = v;
// if (txp.alternativeFeeStr.substring(0, 4) == '0.00')
// txp.alternativeFeeStr = '< ' + txp.alternativeFeeStr;
vm.feeFiat = v;
vm.fiatCurrency = config.wallet.settings.alternativeIsoCode;
if (v.substring(0, 1) === "<") {
vm.feeLessThanACent = true;
}
console.log("fiat", vm.feeFiat);
});
var per = (txp.fee / (txp.amount + txp.fee) * 100);
var perString = per.toFixed(2);
txp.feeRatePerStr = (perString == '0.00' ? '< ' : '') + perString + '%';
txp.feeToHigh = per > FEE_TOO_HIGH_LIMIT_PERCENTAGE;
vm.feeCrypto = (unitFromSat * txp.fee).toFixed(8);
vm.feeIsHigh = txp.feeToHigh;
console.log("crypto", vm.feeCrypto);
tx.txp[wallet.id] = txp;
$log.debug('Confirm. TX Fully Updated for wallet:' + wallet.id, tx);
vm.readyToSend = true;
updateSendAmounts();
console.log('readyToSend:', vm.readyToSend);
$scope.$apply();
return cb();
});
});
});
}
}
})();

View file

@ -1,6 +1,6 @@
'use strict';
angular.module('copayApp.controllers').controller('servicesController', function(externalLinkService, $scope, $ionicScrollDelegate, $timeout, servicesService, configService) {
angular.module('copayApp.controllers').controller('servicesController', function($scope, $ionicScrollDelegate, $timeout, servicesService, configService) {
$scope.hide = false;
configService.whenAvailable(function(config) {
@ -20,8 +20,4 @@ angular.module('copayApp.controllers').controller('servicesController', function
}, 10);
};
$scope.open = function(url) {
externalLinkService.open(url, false);
}
});

View file

@ -1,58 +1,67 @@
'use strict';
angular.module('copayApp.controllers').controller('shapeshiftController', function($scope, sendFlowService, $state, $timeout, $ionicHistory, profileService, walletService, popupService, lodash, $ionicNavBarDelegate) {
angular.module('copayApp.controllers').controller('shapeshiftController', function($scope, $interval, profileService, walletService, popupService, lodash, $ionicNavBarDelegate) {
var walletsBtc = [];
var walletsBch = [];
$scope.showMyAddress = showMyAddress;
function generateAddress(wallet, cb) {
if (!wallet) return;
walletService.getAddress(wallet, false, function(err, addr) {
if (err) {
popupService.showAlert(err);
}
return cb(addr);
});
}
function showToWallets() {
$scope.toWallets = $scope.fromWallet.coin == 'btc' ? walletsBch : walletsBtc;
$scope.onToWalletSelect($scope.toWallets[0]);
$scope.singleToWallet = $scope.toWallets.length == 1;
}
$scope.onFromWalletSelect = function(wallet) {
$scope.fromWallet = wallet;
showToWallets();
generateAddress(wallet, function(addr) {
$scope.fromWalletAddress = addr;
});
};
$scope.onToWalletSelect = function(wallet) {
$scope.toWallet = wallet;
generateAddress(wallet, function(addr) {
$scope.toWalletAddress = addr;
});
}
$scope.$on("$ionicView.beforeEnter", function(event, data) {
walletsBtc = profileService.getWallets({coin: 'btc'});
walletsBch = profileService.getWallets({coin: 'bch'});
$scope.fromWallets = lodash.filter(walletsBtc.concat(walletsBch), function(w) {
return (w.status && w.status.balance && w.status.balance.availableAmount > 0);
return w.status.balance.availableAmount > 0;
});
$scope.singleFromWallet = $scope.fromWallets.length === 1;
if ($scope.fromWallets.length == 0) return;
$scope.onFromWalletSelect($scope.fromWallets[0]);
$scope.onToWalletSelect($scope.toWallets[0]);
$scope.singleFromWallet = $scope.fromWallets.length == 1;
$scope.singleToWallet = $scope.toWallets.length == 1;
$scope.fromWalletSelectorTitle = 'From';
$scope.toWalletSelectorTitle = 'To';
$scope.showFromWallets = false;
$scope.showToWallets = false;
$scope.walletsWithFunds = profileService.getWallets({onlyComplete: true, hasFunds: true});
$scope.wallets = profileService.getWallets({onlyComplete: true});
$scope.hasWallets = !lodash.isEmpty($scope.wallets);
});
$scope.$on("$ionicView.enter", function(event, data) {
$ionicNavBarDelegate.showBar(true);
});
// This could probably be enhanced refactoring the routes abstract states
$scope.createWallet = function() {
$state.go('tabs.home').then(function() {
$state.go('tabs.add.create-personal');
});
};
$scope.buyBitcoin = function() {
$state.go('tabs.home').then(function() {
$state.go('tabs.buyandsell');
});
};
$scope.shapeshift = function() {
var stateParams = {
thirdParty: {
id: 'shapeshift'
}
};
sendFlowService.start(stateParams);
$scope.showFromWalletSelector = function() {
$scope.showFromWallets = true;
}
function showMyAddress() {
$state.go('tabs.home').then(function() {
$state.go('tabs.receive');
});
$scope.showToWalletSelector = function() {
$scope.showToWallets = true;
}
});

View file

@ -1,7 +1,7 @@
'use strict';
angular.module('copayApp.controllers').controller('tabHomeController',
function($rootScope, $timeout, $scope, $state, $stateParams, $ionicModal, $ionicScrollDelegate, $window, gettextCatalog, lodash, popupService, ongoingProcess, bannerService, communityService, externalLinkService, latestReleaseService, profileService, walletService, configService, $log, platformInfo, sendFlowService, storageService, txpModalService, appConfigService, startupService, addressbookService, bwcError, nextStepsService, buyAndSellService, homeIntegrationsService, bitpayCardService, pushNotificationsService, timeService, bitcoincomService, pricechartService, firebaseEventsService, servicesService, shapeshiftService, $ionicNavBarDelegate, signVerifyMessageService) {
function($rootScope, $timeout, $scope, $state, $stateParams, $ionicModal, $ionicScrollDelegate, $window, gettextCatalog, lodash, popupService, ongoingProcess, bannerService, externalLinkService, latestReleaseService, profileService, walletService, configService, $log, platformInfo, storageService, txpModalService, appConfigService, startupService, addressbookService, bwcError, nextStepsService, buyAndSellService, homeIntegrationsService, bitpayCardService, pushNotificationsService, timeService, bitcoincomService, pricechartService, firebaseEventsService, servicesService, shapeshiftService, $ionicNavBarDelegate, signVerifyMessageService) {
var wallet;
var listeners = [];
var notifications = [];
@ -20,12 +20,7 @@ angular.module('copayApp.controllers').controller('tabHomeController',
$scope.bannerUrl = '';
$scope.$on("$ionicView.beforeEnter", onBeforeEnter);
$scope.$on("$ionicView.enter", onEnter);
$scope.$on("$ionicView.afterEnter", onAfterEnter);
$scope.$on("$ionicView.leave", onLeave);
function onAfterEnter () {
$scope.$on("$ionicView.afterEnter", function() {
startupService.ready();
bannerService.getBanner(function (banner) {
@ -33,32 +28,32 @@ angular.module('copayApp.controllers').controller('tabHomeController',
$scope.bannerUrl = banner.url;
$scope.bannerIsLoading = false;
});
};
function onBeforeEnter (event, data) {
});
$scope.$on("$ionicView.beforeEnter", function(event, data) {
if (!$scope.homeTip) {
storageService.getHomeTipAccepted(function(error, value) {
$scope.homeTip = (value == 'accepted') ? false : true;
});
}
latestReleaseService.checkLatestRelease(function(err, newReleaseData) {
if (err) {
$log.warn(err);
return;
}
if (newReleaseData) {
$scope.newRelease = true;
$scope.newReleaseText = gettextCatalog.getString('There is a new version of {{appName}} available', {
appName: $scope.name
});
$scope.newReleaseNotes = newReleaseData.releaseNotes;
}
});
}
if ($scope.isNW) {
latestReleaseService.checkLatestRelease(function(err, newRelease) {
if (err) {
$log.warn(err);
return;
}
if (newRelease) {
$scope.newRelease = true;
$scope.updateText = gettextCatalog.getString('There is a new version of {{appName}} available', {
appName: $scope.name
});
}
});
}
});
function onEnter(event, data) {
$scope.$on("$ionicView.enter", function(event, data) {
$ionicNavBarDelegate.showBar(true);
updateAllWallets();
@ -102,30 +97,34 @@ angular.module('copayApp.controllers').controller('tabHomeController',
}
$scope.showServices = true;
pushNotificationsService.init();
firebaseEventsService.init();
$timeout(function() {
$ionicScrollDelegate.resize();
$scope.$apply();
}, 10);
});
}
});
function onLeave (event, data) {
$scope.$on("$ionicView.leave", function(event, data) {
lodash.each(listeners, function(x) {
x();
});
}
});
$scope.createdWithinPastDay = function(time) {
return timeService.withinPastDay(time);
};
$scope.startFreshSend = function() {
sendFlowService.start();
}
$scope.showUpdatePopup = function() {
latestReleaseService.showUpdatePopup();
$scope.openExternalLink = function() {
var url = 'https://github.com/Bitcoin-com/Wallet/releases/latest';
var optIn = true;
var title = gettextCatalog.getString('Update Available');
var message = gettextCatalog.getString('An update to this app is available. For your security, please update to the latest version.');
var okText = gettextCatalog.getString('View Update');
var cancelText = gettextCatalog.getString('Go Back');
externalLinkService.open(url, optIn, title, message, okText, cancelText);
};
$scope.openBannerUrl = function() {
@ -206,7 +205,6 @@ angular.module('copayApp.controllers').controller('tabHomeController',
var j = 0;
lodash.each(wallets, function(wallet) {
walletService.invalidateCache(wallet); // Temporary solution, to have the good balance, when we ask to reload the wallets.
walletService.getStatus(wallet, {}, function(err, status) {
if (err) {
@ -226,7 +224,6 @@ angular.module('copayApp.controllers').controller('tabHomeController',
cb();
}
}
$scope.walletsWithFunds = profileService.getWallets({hasFunds: true});
});
});
};

View file

@ -1,8 +1,7 @@
'use strict';
angular.module('copayApp.controllers').controller('tabReceiveController', function($rootScope, $scope, $timeout, $log, $ionicModal, $state, $ionicHistory, $ionicPopover, storageService, platformInfo, walletService, profileService, configService, lodash, gettextCatalog, popupService, bwcError, bitcoinCashJsService, $ionicNavBarDelegate, sendFlowService, txFormatService, soundService, clipboardService) {
angular.module('copayApp.controllers').controller('tabReceiveController', function($rootScope, $scope, $timeout, $log, $ionicModal, $state, $ionicHistory, $ionicPopover, storageService, platformInfo, walletService, profileService, configService, lodash, gettextCatalog, popupService, bwcError, bitcoinCashJsService, $ionicNavBarDelegate, txFormatService, soundService, clipboardService) {
var CLOSE_NORMAL = 1000;
var listeners = [];
$scope.bchAddressType = { type: 'cashaddr' };
var bchAddresses = {};
@ -11,63 +10,20 @@ angular.module('copayApp.controllers').controller('tabReceiveController', functi
$scope.isCordova = platformInfo.isCordova;
$scope.isNW = platformInfo.isNW;
var currentAddressSocket = null;
var paymentSubscriptionObj = { op:'addr_sub' };
var currentAddressSocket = {};
var paymentSubscriptionObj = { op:"addr_sub" }
var config;
$scope.displayBalanceAsFiat = true;
$scope.$on('$ionicView.beforeLeave', onBeforeLeave);
$scope.requestSpecificAmount = function() {
sendFlowService.start({
toWalletId: $scope.wallet.credentials.walletId,
isRequestAmount: true
$state.go('tabs.paymentRequest.amount', {
id: $scope.wallet.credentials.walletId,
coin: $scope.wallet.coin
});
};
function connectSocket() {
// Close existing socket if not connected with current address
if (currentAddressSocket) {
currentAddressSocket.close([CLOSE_NORMAL]);
}
if ($scope.wallet.coin === 'bch') {
// listen to bch address
currentAddressSocket = new WebSocket('wss://ws.blockchain.info/bch/inv');
paymentSubscriptionObj.addr = $scope.addrBchLegacy;
} else {
// listen to btc address
currentAddressSocket = new WebSocket('wss://ws.blockchain.info/inv');
paymentSubscriptionObj.addr = $scope.addr;
}
// create subscription to address
var msg = JSON.stringify(paymentSubscriptionObj);
currentAddressSocket.onopen = function (event) {
currentAddressSocket.send(msg);
};
// listen for response
currentAddressSocket.onmessage = function (event) {
//console.log("message received:" + event.data);
receivedPayment(event.data);
};
currentAddressSocket.onclose = function(event) {
if (event.code !== CLOSE_NORMAL) {
$log.debug('Socket was closed abnormally. Reconnect will be attempted in 1 second.');
$timeout(function() {
connectSocket();
}, 1000);
}
};
currentAddressSocket.onerror = function(err) {
console.error('Socket encountered error: ', err, 'Closing socket');
currentAddressSocket.close();
};
}
$scope.setAddress = function(newAddr, copyAddress) {
$scope.addr = null;
if (!$scope.wallet || $scope.generatingAddress || !$scope.wallet.isComplete()) return;
@ -80,24 +36,49 @@ angular.module('copayApp.controllers').controller('tabReceiveController', functi
popupService.showAlert(err);
}
if ($scope.wallet.coin === 'bch') {
bchAddresses = bitcoinCashJsService.translateAddresses(addr);
$scope.addr = bchAddresses[$scope.bchAddressType.type];
$scope.addrBchLegacy = bchAddresses['legacy'];
} else {
$scope.addr = addr;
//close existing socket
if (currentAddressSocket.close === 'function') {
currentAddressSocket.close();
}
connectSocket();
if ($scope.wallet.coin == 'bch') {
bchAddresses = bitcoinCashJsService.translateAddresses(addr);
$scope.addr = bchAddresses[$scope.bchAddressType.type];
$scope.addrBchLegacy = bchAddresses['legacy'];
// listen to bch address
currentAddressSocket = new WebSocket("wss://ws.blockchain.info/bch/inv");
paymentSubscriptionObj.addr = bchAddresses['legacy'];
} else {
$scope.addr = addr;
// listen to btc address
currentAddressSocket = new WebSocket("wss://ws.blockchain.info/inv");
paymentSubscriptionObj.addr = $scope.addr
}
if (copyAddress === true) {
try {
clipboardService.copyToClipboard($scope.wallet.coin == 'bch' && $scope.bchAddressType.type == 'cashaddr' ? 'bitcoincash:' + $scope.addr : $scope.addr);
} catch (error) {
$log.debug('Error copying to clipboard:');
$log.debug("Error copying to clipboard:");
$log.debug(error);
}
}
// create subscription
var msg = JSON.stringify(paymentSubscriptionObj);
currentAddressSocket.onopen = function (event) {
//console.log("message sent: " + msg);
currentAddressSocket.send(msg);
}
// listen for response
currentAddressSocket.onmessage = function (event) {
//console.log("message received:" + event.data);
receivedPayment(event.data);
}
$timeout(function() {
$scope.$apply();
@ -157,18 +138,16 @@ angular.module('copayApp.controllers').controller('tabReceiveController', functi
$scope.paymentReceivedAlternativeAmount = ''; // For when a subsequent payment is received.
txFormatService.formatAlternativeStr($scope.wallet.coin, data.x.out[i].value, function(alternativeStr){
if (alternativeStr) {
$scope.$apply(function () {
$scope.paymentReceivedAlternativeAmount = alternativeStr;
});
$scope.paymentReceivedAlternativeAmount = alternativeStr;
}
});
}
}
$scope.paymentReceivedCoin = $scope.wallet.coin;
var channel = "ga";
if (platformInfo.isCordova) {
channel = "firebase";
var channel = "firebase";
if (platformInfo.isNW) {
channel = "ga";
}
var log = new window.BitAnalytics.LogEvent("transfer_success", [{
"coin": $scope.wallet.coin,
@ -180,9 +159,6 @@ angular.module('copayApp.controllers').controller('tabReceiveController', functi
soundService.play('misc/payment_received.mp3');
}
// Notify new tx
$scope.$emit('bwsEvent', $scope.wallet.id);
$scope.$apply(function () {
$scope.showingPaymentReceived = true;
});
@ -251,24 +227,16 @@ angular.module('copayApp.controllers').controller('tabReceiveController', functi
}
};
function onBeforeLeave() {
currentAddressSocket.close([CLOSE_NORMAL]);
}
$scope.$on("$ionicView.beforeEnter", function(event, data) {
$scope.wallets = profileService.getWallets();
$scope.singleWallet = $scope.wallets.length == 1;
if (!$scope.wallets[0]) return;
var selectedWallet = null;
if (data.stateParams.walletId) { // from walletDetails
selectedWallet = checkSelectedWallet(profileService.getWallet(data.stateParams.walletId), $scope.wallets);
} else {
// select first wallet if no wallet selected previously
selectedWallet = checkSelectedWallet($scope.wallet, $scope.wallets);
}
// select first wallet if no wallet selected previously
var selectedWallet = checkSelectedWallet($scope.wallet, $scope.wallets);
$scope.onWalletSelect(selectedWallet);
$scope.showShareButton = platformInfo.isCordova ? (platformInfo.isIOS ? 'iOS' : 'Android') : null;
listeners = [
@ -280,6 +248,7 @@ angular.module('copayApp.controllers').controller('tabReceiveController', functi
configService.whenAvailable(function(_config) {
$scope.displayBalanceAsFiat = _config.wallet.settings.priceDisplay === 'fiat';
config = _config;
});
});

View file

@ -1,6 +1,6 @@
'use strict';
angular.module('copayApp.controllers').controller('tabScanController', function(gettextCatalog, popupService, $scope, $log, $timeout, scannerService, incomingDataService, $state, $ionicHistory, $rootScope, $ionicNavBarDelegate) {
angular.module('copayApp.controllers').controller('tabScanController', function($scope, $log, $timeout, scannerService, incomingData, $state, $ionicHistory, $rootScope, $ionicNavBarDelegate) {
var scannerStates = {
unauthorized: 'unauthorized',
@ -111,18 +111,7 @@ angular.module('copayApp.controllers').controller('tabScanController', function(
// Sometimes (testing in Chrome, when reading QR Code) data is an object
// that has a string data.result.
contents = contents.result || contents;
incomingDataService.redir(contents, function onError(err) {
if (err) {
var title = gettextCatalog.getString('Scan Failed');
popupService.showAlert(title, err.message, function onAlertShown() {
// Enable another scan since we won't receive incomingDataMenu.menuHidden
activate();
});
} else {
scannerService.resumePreview();
}
});
incomingData.redir(contents);
}
$rootScope.$on('incomingDataMenu.menuHidden', function() {

View file

@ -1,6 +1,6 @@
'use strict';
angular.module('copayApp.controllers').controller('tabSendController', function(bitcoinUriService, $scope, $log, $timeout, $ionicScrollDelegate, addressbookService, profileService, lodash, $state, walletService, platformInfo, sendFlowService, gettextCatalog, configService, $ionicPopup, $ionicNavBarDelegate, clipboardService, incomingDataService) {
angular.module('copayApp.controllers').controller('tabSendController', function($scope, $rootScope, $log, $timeout, $ionicScrollDelegate, $ionicLoading, addressbookService, profileService, lodash, $state, walletService, incomingData, popupService, platformInfo, bwcError, gettextCatalog, scannerService, configService, bitcoinCashJsService, $ionicPopup, $ionicNavBarDelegate, clipboardService) {
var clipboardHasAddress = false;
var clipboardHasContent = false;
var originalList;
@ -28,10 +28,6 @@ angular.module('copayApp.controllers').controller('tabSendController', function(
};
$scope.$on("$ionicView.enter", function(event, data) {
var stateParams = sendFlowService.state.getClone();
$scope.fromWallet = profileService.getWallet(stateParams.fromWalletId);
clipboardService.readFromClipboard(function(text) {
if (text.length > 200) {
text = text.substring(0, 200);
@ -39,9 +35,7 @@ angular.module('copayApp.controllers').controller('tabSendController', function(
$scope.clipboardHasAddress = false;
$scope.clipboardHasContent = false;
var parsed = bitcoinUriService.parse(text);
console.log('parsed', parsed);
if (parsed.isValid && parsed.publicAddress && parsed.coin === 'bch' && !parsed.testnet) { // CashAddr
if ((text.indexOf('bitcoincash:') === 0 || text[0] === 'C' || text[0] === 'H' || text[0] === 'p' || text[0] === 'q') && text.replace('bitcoincash:', '').length === 42) { // CashAddr
$scope.clipboardHasAddress = true;
} else if ((text[0] === "1" || text[0] === "3" || text.substring(0, 3) === "bc1") && text.length >= 26 && text.length <= 35) { // Legacy Addresses
$scope.clipboardHasAddress = true;
@ -61,7 +55,48 @@ angular.module('copayApp.controllers').controller('tabSendController', function(
});
});
var wallets;
var walletsBch;
var walletsBtc;
var walletToWalletFrom = false;
$scope.onWalletSelect = function(wallet) {
if (!$scope.walletToWalletFrom) {
$scope.walletToWalletFrom = wallet;
if (wallet.coin === 'bch') {
$scope.showWalletsBch = true;
} else if (wallet.coin === 'btc') {
$scope.showWalletsBtc = true;
}
$scope.walletSelectorTitleTo = gettextCatalog.getString('Send to');
} else {
$ionicLoading.show();
walletService.getAddress(wallet, true, function(err, addr) {
$ionicLoading.hide();
return $state.transitionTo('tabs.send.amount', {
displayAddress: $scope.walletToWalletFrom.coin === 'bch' ? bitcoinCashJsService.translateAddresses(addr).cashaddr : addr,
recipientType: 'wallet',
fromWalletId: $scope.walletToWalletFrom.id,
toAddress: addr,
coin: $scope.walletToWalletFrom.coin
});
});
}
};
$scope.showWalletSelector = function() {
$scope.walletToWalletFrom = false;
$scope.walletSelectorTitleFrom = gettextCatalog.getString('Send from');
$scope.showWallets = true;
};
$scope.findContact = function(search) {
if (incomingData.redir(search)) {
return;
}
if (!search || search.length < 1) {
$scope.list = originalList;
$timeout(function() {
@ -70,16 +105,12 @@ angular.module('copayApp.controllers').controller('tabSendController', function(
return;
}
var params = sendFlowService.state.getClone();
params.data = search;
sendFlowService.start(params, function onError() {
var result = lodash.filter(originalList, function(item) {
var val = item.name;
return lodash.startsWith(val.toLowerCase(), search.toLowerCase());
});
$scope.list = result;
var result = lodash.filter(originalList, function(item) {
var val = item.name;
return lodash.startsWith(val.toLowerCase(), search.toLowerCase());
});
$scope.list = result;
};
var hasWallets = function() {
@ -102,6 +133,7 @@ angular.module('copayApp.controllers').controller('tabSendController', function(
};
var updateHasFunds = function() {
$scope.hasFunds = false;
var index = 0;
lodash.each($scope.wallets, function(w) {
@ -147,7 +179,10 @@ angular.module('copayApp.controllers').controller('tabSendController', function(
coin: v.coin,
displayCoin: (v.coin == 'bch'
? (config.bitcoinCashAlias || defaults.bitcoinCashAlias)
: (config.bitcoinAlias || defaults.bitcoinAlias)).toUpperCase()
: (config.bitcoinAlias || defaults.bitcoinAlias)).toUpperCase(),
getAddress: function(cb) {
return cb(null, k);
},
});
});
originalList = completeContacts;
@ -168,37 +203,39 @@ angular.module('copayApp.controllers').controller('tabSendController', function(
};
$scope.searchBlurred = function() {
if ($scope.formData.search == null || $scope.formData.search.length === 0) {
if ($scope.formData.search == null || $scope.formData.search.length == 0) {
$scope.searchFocus = false;
}
};
$scope.sendToContact = function (item) {
$timeout(function () {
var toAddress = item.address;
if (item.recipientType && item.recipientType === 'contact') {
if (toAddress.indexOf('bch') === 0 || toAddress.indexOf('btc') === 0) {
toAddress = toAddress.substring(3);
$scope.goToAmount = function(item) {
$timeout(function() {
item.getAddress(function(err, addr) {
if (err || !addr) {
//Error is already formated
return popupService.showAlert(err);
}
}
$log.debug('Got toAddress:' + toAddress + ' | ' + item.name);
var stateParams = sendFlowService.state.getClone();
stateParams.toAddress = toAddress;
stateParams.coin = item.coin;
sendFlowService.start(stateParams);
if (item.recipientType && item.recipientType == 'contact') {
if (addr.indexOf('bch') == 0 || addr.indexOf('btc') == 0) {
addr = addr.substring(3);
}
}
$log.debug('Got toAddress:' + addr + ' | ' + item.name);
return $state.transitionTo('tabs.send.amount', {
recipientType: item.recipientType,
displayAddress: item.coin == 'bch' ? bitcoinCashJsService.translateAddresses(addr).cashaddr : addr,
toAddress: addr,
toName: item.name,
toEmail: item.email,
toColor: item.color,
coin: item.coin
});
});
});
};
$scope.startWalletToWalletTransfer = function() {
console.log('startWalletToWalletTransfer()');
var params = sendFlowService.state.getClone();
params.isWalletTransfer = true;
sendFlowService.start(params);
}
// This could probably be enhanced refactoring the routes abstract states
$scope.createWallet = function() {
$state.go('tabs.home').then(function() {
@ -213,8 +250,6 @@ angular.module('copayApp.controllers').controller('tabSendController', function(
};
$scope.$on("$ionicView.beforeEnter", function(event, data) {
console.log(data);
console.log('tab-send onBeforeEnter sendflow ', sendFlowService.state);
$scope.isIOS = platformInfo.isIOS && platformInfo.isCordova;
$scope.showWalletsBch = $scope.showWalletsBtc = $scope.showWallets = false;
@ -229,9 +264,5 @@ angular.module('copayApp.controllers').controller('tabSendController', function(
$scope.displayBalanceAsFiat = _config.wallet.settings.priceDisplay === 'fiat';
});
if (data.direction == "back") {
sendFlowService.state.clear();
}
});
});
});

View file

@ -16,7 +16,7 @@ angular.module('copayApp.controllers').controller('tabSettingsController', funct
isoCode: config.wallet.settings.alternativeIsoCode
};
$scope.selectedPriceDisplay = config.wallet.settings.priceDisplay === 'crypto' ? gettextCatalog.getString('Cryptocurrency') : gettextCatalog.getString('Fiat');
$scope.selectedPriceDisplay = config.wallet.settings.priceDisplay;
// TODO move this to a generic service
bitpayAccountService.getAccounts(function(err, data) {

View file

@ -1,13 +1,11 @@
'use strict';
angular.module('copayApp.controllers').controller('tabsController', function($rootScope, $log, $scope, $state, $stateParams, $timeout, platformInfo, incomingDataService, lodash, popupService, gettextCatalog, scannerService, sendFlowService) {
angular.module('copayApp.controllers').controller('tabsController', function($rootScope, $log, $scope, $state, $stateParams, $timeout, platformInfo, incomingData, lodash, popupService, gettextCatalog, scannerService) {
$scope.onScan = function(data) {
incomingDataService.redir(data, function onError(err) {
if (err) {
popupService.showAlert(gettextCatalog.getString('Error'), err.message);
}
});
if (!incomingData.redir(data)) {
popupService.showAlert(gettextCatalog.getString('Error'), gettextCatalog.getString('Invalid data'));
}
};
$scope.setScanFn = function(scanFn) {
@ -17,10 +15,6 @@ angular.module('copayApp.controllers').controller('tabsController', function($ro
};
};
$scope.startFreshSend = function() {
sendFlowService.start();
};
$scope.importInit = function() {
$scope.fromOnboarding = $stateParams.fromOnboarding;
$timeout(function() {
@ -29,6 +23,7 @@ angular.module('copayApp.controllers').controller('tabsController', function($ro
};
$scope.chooseScanner = function() {
var isWindowsPhoneApp = platformInfo.isCordova && platformInfo.isWP;
if (!isWindowsPhoneApp) {
@ -38,14 +33,10 @@ angular.module('copayApp.controllers').controller('tabsController', function($ro
scannerService.useOldScanner(function(err, contents) {
if (err) {
popupService.showAlert(gettextCatalog.getString('Error'), err.message);
} else {
incomingDataService.redir(contents, function onError(err) {
if (err) {
popupService.showAlert(gettextCatalog.getString('Error'), err.message);
}
});
popupService.showAlert(gettextCatalog.getString('Error'), err);
return;
}
incomingData.redir(contents);
});
};

View file

@ -1,204 +0,0 @@
'use strict';
(function () {
angular
.module('copayApp.controllers')
.controller('walletSelectorController', walletSelectorController);
function walletSelectorController ($scope, $state, sendFlowService, configService, gettextCatalog, ongoingProcess, profileService, walletService, txFormatService) {
var fromWalletId = '';
var priceDisplayAsFiat = false;
var unitDecimals = 0;
var unitsFromSatoshis = 0;
$scope.$on("$ionicView.beforeEnter", onBeforeEnter);
$scope.$on("$ionicView.enter", onEnter);
function onBeforeEnter(event, data) {
if (data.direction == "back") {
sendFlowService.state.pop();
}
$scope.params = sendFlowService.state.getClone();
console.log('walletSelector onBeforeEnter after back sendflow', $scope.params);
var config = configService.getSync().wallet.settings;
priceDisplayAsFiat = config.priceDisplay === 'fiat';
unitDecimals = config.unitDecimals;
unitsFromSatoshis = 1 / config.unitToSatoshi;
if ($scope.params.isWalletTransfer) {
$scope.sendFlowTitle = gettextCatalog.getString('Transfer between wallets');
} else if (!$scope.params.thirdParty) {
$scope.sendFlowTitle = gettextCatalog.getString('Send');
}
$scope.coin = false; // Wallets to show (for destination screen or contacts)
$scope.type = $scope.params['fromWalletId'] ? 'destination' : 'origin'; // origin || destination
fromWalletId = $scope.params['fromWalletId'];
if ($scope.type === 'destination' && $scope.params.toAddress) {
$state.transitionTo(getNextStep($scope.params));
}
if ($scope.params.coin) {
$scope.coin = $scope.params.coin; // Contacts have a coin embedded
}
if ($scope.params.amount) { // There is an amount, so presume that it is a payment request
$scope.sendFlowTitle = gettextCatalog.getString('Payment Request');
$scope.specificAmount = $scope.specificAlternativeAmount = '';
$scope.isPaymentRequest = true;
}
if ($scope.params.thirdParty) {
$scope.thirdParty = $scope.params.thirdParty;
}
};
function onEnter (event, data) {
configService.whenAvailable(function(config) {
$scope.selectedPriceDisplay = config.wallet.settings.priceDisplay;
});
if ($scope.thirdParty) {
// Third party services specific logic
handleThirdPartyIfShapeshift();
}
prepareWalletLists();
formatRequestedAmount();
};
function formatRequestedAmount() {
if ($scope.params.amount) {
var cryptoAmount = (unitsFromSatoshis * $scope.params.amount).toFixed(unitDecimals);
var cryptoCoin = $scope.coin.toUpperCase();
txFormatService.formatAlternativeStr($scope.coin, $scope.params.amount, function onFormatAlternativeStr(formatted){
if (formatted) {
var fiatParts = formatted.split(' ');
var fiatAmount = fiatParts[0];
var fiatCurrrency = fiatParts.length > 1 ? fiatParts[1] : '';
if (priceDisplayAsFiat) {
$scope.requestAmount = fiatAmount;
$scope.requestCurrency = fiatCurrrency;
$scope.requestAmountSecondary = cryptoAmount;
$scope.requestCurrencySecondary = cryptoCoin;
} else {
$scope.requestAmount = cryptoAmount;
$scope.requestCurrency = cryptoCoin;
$scope.requestAmountSecondary = fiatAmount;
$scope.requestCurrencySecondary = fiatCurrrency;
}
$scope.$apply();
}
});
}
}
function handleThirdPartyIfShapeshift() {
console.log($scope.thirdParty, $scope.coin);
if ($scope.thirdParty.id === 'shapeshift' && $scope.type === 'destination') { // Shapeshift wants to know the
$scope.coin = profileService.getWallet(fromWalletId).coin;
if ($scope.coin === 'bch') {
$scope.coin = 'btc';
} else {
$scope.coin = 'bch';
}
}
}
function prepareWalletLists() {
var walletsAll = [];
var walletsSufficientFunds = [];
$scope.walletsInsufficientFunds = []; // For origin screen
if ($scope.type === 'origin') {
$scope.headerTitle = gettextCatalog.getString('Choose a wallet to send from');
if ($scope.params.amount || $scope.coin) {
walletsAll = profileService.getWallets({coin: $scope.coin});
ongoingProcess.set('scanning', true);
walletsAll.forEach(function forWallet(wallet) {
if (!wallet.status && !wallet.cachedStatus) {
walletService.getStatus(wallet, {}, function(err, status) {
wallet.status = status;
if (status.availableBalanceSat > ($scope.params.amount ? $scope.params.amount : 0)) {
walletsSufficientFunds.push(wallet);
} else {
$scope.walletsInsufficientFunds.push(wallet);
}
if ($scope.coin === 'btc') { // As this is a promise
$scope.walletsBtc = walletsSufficientFunds;
} else {
$scope.walletsBch = walletsSufficientFunds;
}
ongoingProcess.set('scanning', false);
});
} else {
var walletStatus = null;
if (wallet.status && wallet.status.isValid) {
walletStatus = wallet.status;
} else if (wallet.cachedStatus && wallet.status.isValid) {
walletStatus = wallet.cachedStatus;
}
if (walletStatus && walletStatus.availableBalanceSat > ($scope.params.amount ? $scope.params.amount : 0)) {
walletsSufficientFunds.push(wallet);
} else {
$scope.walletsInsufficientFunds.push(wallet);
}
ongoingProcess.set('scanning', false);
}
});
if ($scope.coin === 'btc') {
$scope.walletsBtc = walletsSufficientFunds;
} else {
$scope.walletsBch = walletsSufficientFunds;
}
} else {
$scope.walletsBch = profileService.getWallets({coin: 'bch', hasFunds: true});
$scope.walletsBtc = profileService.getWallets({coin: 'btc', hasFunds: true});
$scope.walletsInsufficientFunds = profileService.getWallets({coin: $scope.coin, hasNoFunds: true});
}
} else if ($scope.type === 'destination') {
if (!$scope.coin) { // Allow for the coin to be set by a third party
$scope.fromWallet = profileService.getWallet(fromWalletId);
$scope.coin = $scope.fromWallet.coin; // Only show wallets with the select origin wallet coin
}
$scope.headerTitle = gettextCatalog.getString('Choose a wallet to send to');
if ($scope.coin === 'btc') { // if no specific coin is set or coin is set btc
$scope.walletsBtc = profileService.getWallets({coin: $scope.coin});
} else {
$scope.walletsBch = profileService.getWallets({coin: $scope.coin});
}
}
}
$scope.useWallet = function(wallet) {
var params = sendFlowService.state.getClone();
if ($scope.type === 'origin') { // we're on the origin screen, set wallet to send from
params.fromWalletId = wallet.id;
} else { // we're on the destination screen, set wallet to send to
params.toWalletId = wallet.id;
}
sendFlowService.goNext(params);
};
$scope.goBack = function() {
sendFlowService.router.goBack();
}
}
})();

View file

@ -1,65 +1,52 @@
'use strict';
angular.module('copayApp.controllers').controller('walletDetailsController', function($scope, $rootScope, $interval, $timeout, $filter, $log, $ionicModal, $ionicPopover, $state, $stateParams, $ionicHistory, profileService, lodash, configService, platformInfo, walletService, txpModalService, externalLinkService, popupService, addressbookService, sendFlowService, storageService, $ionicScrollDelegate, $window, bwcError, gettextCatalog, timeService, feeService, appConfigService, rateService, walletHistoryService) {
// Desktop can display 13 rows of transactions, bump it up to a nice round 15.
var DISPLAY_PAGE_SIZE = 15;
var currentTxHistoryDisplayPage = 0;
var completeTxHistory = []
angular.module('copayApp.controllers').controller('walletDetailsController', function($scope, $rootScope, $interval, $timeout, $filter, $log, $ionicModal, $ionicPopover, $state, $stateParams, $ionicHistory, profileService, lodash, configService, platformInfo, walletService, txpModalService, externalLinkService, popupService, addressbookService, storageService, $ionicScrollDelegate, $window, bwcError, gettextCatalog, timeService, feeService, appConfigService, rateService) {
var HISTORY_SHOW_LIMIT = 10;
var currentTxHistoryPage = 0;
var listeners = [];
// For gradual migration for doing it properly
$scope.vm = {
allowInfiniteScroll: false,
gettingCachedHistory: true,
gettingInitialHistory: true,
updatingTxHistory: false,
fetchedAllTxHistory: false,
//updateTxHistoryError: false
updateTxHistoryFailed: false
};
// Need flag for when to allow infinite scroll at bottom
// - ie not when loading initial data and there is no more cached data
$scope.amountIsCollapsible = false;
$scope.color = '#888888';
$scope.filteredTxHistory = [];
$scope.txps = [];
$scope.completeTxHistory = [];
$scope.openTxpModal = txpModalService.open;
$scope.isCordova = platformInfo.isCordova;
$scope.isAndroid = platformInfo.isAndroid;
$scope.isIOS = platformInfo.isIOS;
$scope.isSearching = false;
$scope.openTxpModal = txpModalService.open;
$scope.requiresMultipleSignatures = false;
$scope.showBalanceButton = false;
$scope.status = null;
// Displaying 50 transactions when entering the screen takes a while, so only display a subset
// of everything we have, not the complete history.
$scope.txHistory = []; // This is what is displayed
$scope.txHistorySearchResults = [];
$scope.txps = [];
$scope.updatingStatus = false;
$scope.updateStatusError = null;
$scope.updatingTxHistoryProgress = 0;
$scope.wallet = null;
$scope.walletId = '';
$scope.walletNotRegistered = false;
var channel = "ga";
if (platformInfo.isCordova) {
channel = "firebase";
var channel = "firebase";
if (platformInfo.isNW) {
channel = "ga";
}
var log = new window.BitAnalytics.LogEvent("wallet_details_open", [], [channel]);
window.BitAnalytics.LogEventHandlers.postEvent(log);
$scope.amountIsCollapsible = !$scope.isAndroid;
$scope.openExternalLink = function(url, target) {
externalLinkService.open(url, target);
};
var setPendingTxps = function(txps) {
/* Uncomment to test multiple outputs */
// var txp = {
// message: 'test multi-output',
// fee: 1000,
// createdOn: new Date() / 1000,
// outputs: [],
// wallet: $scope.wallet
// };
//
// function addOutput(n) {
// txp.outputs.push({
// amount: 600,
// toAddress: '2N8bhEwbKtMvR2jqMRcTCQqzHP6zXGToXcK',
// message: 'output #' + (Number(n) + 1)
// });
// };
// lodash.times(15, addOutput);
// txps.push(txp);
if (!txps) {
$scope.txps = [];
return;
@ -86,7 +73,6 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun
$scope.updatingStatus = true;
$scope.updateStatusError = null;
$scope.walletNotRegistered = false;
$scope.vm.fetchedAllTxHistory = false;
walletService.getStatus($scope.wallet, {
force: !!force,
@ -170,97 +156,68 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun
if (err) return;
$timeout(function() {
walletService.startScan($scope.wallet, function() {
$scope.updateAll(true, true);
$scope.updateAll();
$scope.$apply();
});
});
});
};
var updateTxHistory = function(cb) {
if (!cb) cb = function() {};
$scope.updateTxHistoryError = false;
$scope.updatingTxHistoryProgress = 0;
feeService.getFeeLevels($scope.wallet.coin, function(err, levels) {
walletService.getTxHistory($scope.wallet, {
feeLevels: levels
}, function(err, txHistory) {
$scope.updatingTxHistory = false;
if (err) {
$scope.txHistory = null;
$scope.updateTxHistoryError = true;
return;
}
applyCurrencyAliases(txHistory);
var config = configService.getSync();
var fiatCode = config.wallet.settings.alternativeIsoCode;
lodash.each(txHistory, function(t) {
var r = rateService.toFiat(t.amount, fiatCode, $scope.wallet.coin);
t.alternativeAmountStr = r.toFixed(2) + ' ' + fiatCode;
});
$scope.completeTxHistory = txHistory;
$scope.showHistory();
$timeout(function() {
$scope.$apply();
});
return cb();
});
});
};
function applyCurrencyAliases(txHistory) {
var defaults = configService.getDefaults();
var configCache = configService.getSync();
lodash.each(txHistory, function onTx(tx) {
tx.amountUnitStr = $scope.wallet.coin == 'btc'
lodash.each(txHistory, function(t) {
t.amountUnitStr = $scope.wallet.coin == 'btc'
? (configCache.bitcoinAlias || defaults.bitcoinAlias)
: (configCache.bitcoinCashAlias || defaults.bitcoinCashAlias);
tx.amountUnitStr = tx.amountUnitStr.toUpperCase();
t.amountUnitStr = t.amountUnitStr.toUpperCase();
});
}
function formatTxHistoryForDisplay(txHistory) {
applyCurrencyAliases(txHistory);
var config = configService.getSync();
var fiatCode = config.wallet.settings.alternativeIsoCode;
lodash.each(txHistory, function(t) {
var r = rateService.toFiat(t.amount, fiatCode, $scope.wallet.coin);
t.alternativeAmountStr = r.toFixed(2) + ' ' + fiatCode;
});
}
function updateTxHistoryFromCachedData() {
$scope.vm.gettingCachedHistory = true;
walletHistoryService.getCachedTxHistory($scope.wallet.id, function onGetCachedTxHistory(err, txHistory){
$scope.vm.gettingCachedHistory = false;
if (err) {
// Don't display an error because we are also requesting the history.
$log.error('Error getting cached tx history.', err);
return;
}
if (!txHistory) {
$log.debug('No cached tx history.');
return;
}
formatTxHistoryForDisplay(txHistory);
completeTxHistory = txHistory;
showHistory(false);
$scope.$apply();
});
}
function fetchAndShowTxHistory(getLatest, flushCacheOnNew) {
$scope.vm.updatingTxHistory = true;
walletHistoryService.updateLocalTxHistoryByPage($scope.wallet, getLatest, flushCacheOnNew, function onUpdateLocalTxHistoryByPage(err, txHistory, fetchedAllTransactions) {
$scope.vm.gettingInitialHistory = false;
$scope.vm.updatingTxHistory = false;
$scope.$broadcast('scroll.infiniteScrollComplete');
if (err) {
console.error('pagination Failed to get history.', err);
$scope.vm.updateTxHistoryFailed = true;
return;
}
if (fetchedAllTransactions) {
$scope.vm.fetchedAllTxHistory = true;
}
formatTxHistoryForDisplay(txHistory);
completeTxHistory = txHistory;
showHistory(true);
$scope.$apply();
});
}
function showHistory(showAll) {
if (completeTxHistory) {
$scope.txHistory = showAll ? completeTxHistory : completeTxHistory.slice(0, (currentTxHistoryDisplayPage + 1) * DISPLAY_PAGE_SIZE);
$scope.vm.allowInfiniteScroll = !$scope.vm.fetchedAllTxHistory && !(completeTxHistory.length === $scope.txHistory.length && $scope.vm.gettingInitialHistory);
} else {
$scope.vm.allowInfiniteScroll = false;
$scope.showHistory = function() {
if ($scope.completeTxHistory) {
$scope.txHistory = $scope.completeTxHistory.slice(0, (currentTxHistoryPage + 1) * HISTORY_SHOW_LIMIT);
$scope.txHistoryShowMore = $scope.completeTxHistory.length > $scope.txHistory.length;
}
}
};
$scope.getDate = function(txCreated) {
var date = new Date(txCreated * 1000);
@ -299,35 +256,24 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun
return !tx.confirmations || tx.confirmations === 0;
};
// on-infinite="showMore()"
$scope.showMore = function() {
// Check if we have more than we are displaying
if (completeTxHistory.length > $scope.txHistory.length) {
currentTxHistoryDisplayPage++;
showHistory(false);
$timeout(function() {
currentTxHistoryPage++;
$scope.showHistory();
$scope.$broadcast('scroll.infiniteScrollComplete');
return;
}
if ($scope.vm.updatingTxHistory) {
return;
}
fetchAndShowTxHistory(false, false);
}, 100);
};
// on-refresh="onRefresh()"
$scope.onRefresh = function() {
$timeout(function() {
$scope.$broadcast('scroll.refreshComplete');
}, 300);
$scope.updateAll(true, false);
$scope.updateAll(true);
};
$scope.updateAll = function(forceStatusUpdate, flushTxCacheOnNew)  {
updateStatus(forceStatusUpdate);
//updateTxHistory(cb);
fetchAndShowTxHistory(true, flushTxCacheOnNew);
$scope.updateAll = function(force, cb)  {
updateStatus(force);
updateTxHistory(cb);
};
$scope.hideToggle = function() {
@ -337,36 +283,97 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun
};
var prevPos;
$scope.txHistoryPaddingBottom = 0;
function getScrollPosition() {
var scrollPosition = $ionicScrollDelegate.getScrollPosition();
$timeout(function() {
getScrollPosition();
}, 200);
if (!scrollPosition) {
$window.requestAnimationFrame(function() {
getScrollPosition();
});
return;
}
var pos = scrollPosition.top;
if (pos > 0) {
$scope.txHistoryPaddingBottom = "200px";
}
if (pos === prevPos) {
$window.requestAnimationFrame(function() {
getScrollPosition();
});
return;
}
prevPos = pos;
$scope.scrollPosition = pos;
refreshAmountSection(pos);
};
function refreshAmountSection(scrollPos) {
$scope.showBalanceButton = false;
if ($scope.status) {
$scope.showBalanceButton = ($scope.status.totalBalanceSat != $scope.status.spendableAmount);
}
if (!$scope.amountIsCollapsible) {
var t = ($scope.showBalanceButton ? 15 : 45);
$scope.amountScale = 'translateY(' + t + 'px)';
return;
}
scrollPos = scrollPos || 0;
var amountHeight = 210 - scrollPos;
if (amountHeight < 80) {
amountHeight = 80;
}
var contentMargin = amountHeight;
if (contentMargin > 210) {
contentMargin = 210;
}
var amountScale = (amountHeight / 210);
if (amountScale < 0.5) {
amountScale = 0.5;
}
if (amountScale > 1.1) {
amountScale = 1.1;
}
var s = amountScale;
// Make space for the balance button when it needs to display.
var TOP_NO_BALANCE_BUTTON = 115;
var TOP_BALANCE_BUTTON = 30;
var top = TOP_NO_BALANCE_BUTTON;
if ($scope.showBalanceButton) {
top = TOP_BALANCE_BUTTON;
}
var amountTop = ((amountScale - 0.7) / 0.7) * top;
if (amountTop < -10) {
amountTop = -10;
}
if (amountTop > top) {
amountTop = top;
}
var t = amountTop;
$scope.altAmountOpacity = (amountHeight - 100) / 80;
$window.requestAnimationFrame(function() {
$scope.amountHeight = amountHeight + 'px';
$scope.contentMargin = contentMargin + 'px';
$scope.amountScale = 'scale3d(' + s + ',' + s + ',' + s + ') translateY(' + t + 'px)';
$scope.$digest();
getScrollPosition();
});
}
var scrollWatcherInitialized;
$scope.$on("$ionicView.enter", function(event, data) {
if ($scope.isCordova && $scope.isAndroid) setAndroidStatusBarColor();
if (scrollWatcherInitialized || !$scope.amountIsCollapsible) {
return;
}
scrollWatcherInitialized = true;
});
$scope.$on("$ionicView.beforeEnter", function(event, data) {
configService.whenAvailable(function (config) {
$scope.selectedPriceDisplay = config.wallet.settings.priceDisplay;
@ -380,7 +387,7 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun
if (!$scope.wallet) return;
$scope.requiresMultipleSignatures = $scope.wallet.credentials.m > 1;
$scope.vm.gettingInitialHistory = true;
$scope.updatingTxHistory = true;
addressbookService.list(function(err, ab) {
if (err) $log.error(err);
@ -390,25 +397,21 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun
listeners = [
$rootScope.$on('bwsEvent', function(e, walletId) {
if (walletId == $scope.wallet.id && e.type != 'NewAddress')
$scope.updateAll(false, false);
$scope.updateAll();
}),
$rootScope.$on('Local/TxAction', function(e, walletId) {
if (walletId == $scope.wallet.id)
$scope.updateAll(false, false);
$scope.updateAll();
}),
];
});
var refreshInterval;
$scope.$on("$ionicView.afterEnter", function onAfterEnter(event, data) {
updateTxHistoryFromCachedData();
$scope.updateAll(true, true);
// refreshAmountSection();
$scope.$on("$ionicView.afterEnter", function(event, data) {
$scope.updateAll();
refreshAmountSection();
refreshInterval = $interval($scope.onRefresh, 10 * 1000);
$timeout(function() {
getScrollPosition();
}, 1000);
});
$scope.$on("$ionicView.afterLeave", function(event, data) {
@ -466,30 +469,4 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun
function rgbToHex(r, g, b) {
return "#" + componentToHex(r) + componentToHex(g) + componentToHex(b);
}
$scope.goToSend = function() {
sendFlowService.start({
fromWalletId: $scope.wallet.id
});
};
$scope.goToReceive = function() {
$state.go('tabs.home', {
walletId: $scope.wallet.id
}).then(function () {
$ionicHistory.clearHistory();
$state.go('tabs.receive', {
walletId: $scope.wallet.id
});
});
};
$scope.goToBuy = function() {
$state.go('tabs.home', {
walletId: $scope.wallet.id
}).then(function () {
$ionicHistory.clearHistory();
$state.go('tabs.buyandsell');
});
};
});

View file

@ -1,198 +0,0 @@
'use strict';
(function(){
/**
* @desc amount directive that can be used to display formatted financial values
* size-equal attribute is optional, defaults to false.
* @example fee = {
* value: 12.49382901,
* currency: 'BCH'
* }
* @example <formatted-amount value="fee.value" currency="fee.currency"></formatted-amount>
* @example <formatted-amount value="fee.value" currency="fee.currency" size-equal="true"></formatted-amount>
*/
angular
.module('bitcoincom.directives')
.directive('formattedAmount', function() {
return {
restrict: 'E',
scope: {
value: '@',
currency: '@',
sizeEqual: '@'
},
templateUrl: 'views/includes/formatted-amount.html',
controller: formattedAmountController
}
});
function formattedAmountController($scope, uxLanguage) {
$scope.vm = {};
var vm = $scope.vm;
vm.currency = '';
vm.value = '';
$scope.canShow = false
$scope.displaySizeEqual = !!$scope.sizeEqual;
var decimalPlaces = {
'0': ['BIF', 'CLP', 'DJF', 'GNF', 'ILS', 'JPY', 'KMF', 'KRW', 'MGA', 'PYG', 'RWF', 'UGX', 'VND', 'VUV', 'XAF', 'XOF', 'XPF'],
'3': ['BHD', 'IQD', 'JOD', 'KWD', 'OMR', 'TND'],
'8': ['BCH', 'BTC']
};
$scope.$watch('value', function onFormattedAmountWatch() {
formatNumbers();
});
function buildAmount(start, middle, end) {
$scope.start = start;
$scope.middle = middle;
$scope.end = end;
};
/**
* On Android 4.4, toLocaleString() only returns 3 fractional digits when 8 is specified.
*/
function ensureEnoughFractionDigits(localizedString, number, desiredFractionDigits) {
if (desiredFractionDigits === 0) {
// Assume it is OK
return localizedString;
}
var fractionalRe = /^-*(\d*\D)(\d+)$/;
var match = fractionalRe.exec(localizedString);
if (!match || match.length !== 3) {
// Don't know what's happening, just return what we have
return localizedString;
}
var decimals = match[2];
var decimalCount = decimals.length;
if (decimalCount >= desiredFractionDigits) {
// Everything is OK.
return localizedString;
}
if (typeof number !== 'number') {
number = parseFloat(number);
}
var fixed = number.toFixed(desiredFractionDigits);
var fixedMatch = fractionalRe.exec(fixed);
if (!fixedMatch || fixedMatch.length !== 3) {
// Don't know what's happening, just return what we have
return localizedString;
}
// Keeps locale decimal separator.
var enough = match[1] + fixedMatch[2];
return enough;
}
function formatNumbers() {
// Might get "< 0.01 USD" being passed in.
// During watch, may be changed from having a separate currency value,
// to both being in value. Don't want to use previous currency value.
// Try to extract currency from value..
if (!$scope.currency || $scope.currency.length === 0) {
var currencySplit = $scope.value.split(" ");
if (currencySplit.length >= 2) {
vm.currency = currencySplit[currencySplit.length - 1];
}
} else {
vm.currency = $scope.currency;
}
// Redo this when we have proper formatting for low fees
if ($scope.value.indexOf("<") === 0) {
buildAmount($scope.value, '', '');
vm.currency = '';
$scope.canShow = true;
return;
}
// Remove thousands separators for parseFloat()
$scope.value = $scope.value.replace(',', '');
var parsed = parseFloat($scope.value);
var valueFormatted = '';
var valueProcessing = '';
switch (getDecimalPlaces(vm.currency)) {
case '0':
if (isNaN(parsed)) {
buildAmount('-', '', '');
} else {
valueFormatted = localizeNumbers(Math.round(parsed), 0);
buildAmount(valueFormatted, '', '');
}
break;
case '3':
if (isNaN(parsed)) {
buildAmount('-' + getDecimalSeparator() + '---', '', '');
} else {
valueProcessing = parsed.toFixed(3);
valueFormatted = localizeNumbers(valueProcessing, 3);
buildAmount(valueFormatted, '', '');
}
break;
case '8':
if (isNaN(parsed)) {
buildAmount('-' + getDecimalSeparator() + '---', '', '');
} else if (parsed === 0) {
buildAmount('0', '', '');
} else {
valueFormatted = parsed.toFixed(8);
valueFormatted = localizeNumbers(valueFormatted, 8);
var start = valueFormatted.slice(0, -5);
var middle = valueFormatted.slice(-5, -2);
var end = valueFormatted.substr(valueFormatted.length - 2);
buildAmount(start, middle, end);
}
break;
default: // 2
if (isNaN(parsed)) {
buildAmount('-' + getDecimalSeparator() + '--', '', '');
} else {
valueProcessing = parseFloat(parsed.toFixed(2));
valueFormatted = localizeNumbers(valueProcessing, 2);
buildAmount(valueFormatted, '', '');
}
break;
}
$scope.canShow = true;
};
function getDecimalPlaces(currency) {
if (decimalPlaces['0'].indexOf(currency.toUpperCase()) > -1) return '0';
if (decimalPlaces['3'].indexOf(currency.toUpperCase()) > -1) return '3';
if (decimalPlaces['8'].indexOf(currency.toUpperCase()) > -1) return '8';
return '2';
};
function getDecimalSeparator() {
var testNum = 1.5;
var testString = testNum.toLocaleString(uxLanguage.getCurrentLanguage());
// Some environments let you set decimal separators that are more than one character
var separator = /^1(.+)5$/.exec(testString)[1]
return separator;
};
function localizeNumbers(x, minimumFractionDigits) {
var parsed = parseFloat(x);
var opts = {
minimumFractionDigits: minimumFractionDigits,
useGrouping: true
};
var lang = uxLanguage.getCurrentLanguage();
var localized = parsed.toLocaleString(lang, opts);
var corrected = ensureEnoughFractionDigits(localized, x, minimumFractionDigits);
return corrected;
};
}
})();

View file

@ -1,28 +1,23 @@
'use strict';
angular.module('copayApp.directives')
.directive('incomingDataMenu', function($timeout, $rootScope, $state, externalLinkService, sendFlowService, bitcoinCashJsService) {
.directive('incomingDataMenu', function($timeout, $rootScope, $state, externalLinkService) {
return {
restrict: 'E',
templateUrl: 'views/includes/incomingDataMenu.html',
link: function(scope, element, attrs) {
$rootScope.$on('incomingDataMenu.showMenu', function(event, data) {
$timeout(function() {
scope.data = data;
if (scope.data.parsed.privateKey) {
scope.type = "privateKey";
} else if (scope.data.parsed.url) {
scope.type = "url";
} else if (scope.data.parsed.publicAddress) {
scope.type = "bitcoinAddress";
var prefix = scope.data.parsed.isTestnet ? 'bchtest:' : 'bitcoincash:';
scope.data.toAddress = (prefix + scope.data.parsed.publicAddress.cashAddr) || scope.data.parsed.publicAddress.legacy || scope.data.parsed.publicAddress.bitpay;
} else {
scope.type = "text";
}
scope.data = data.data;
scope.type = data.type;
scope.showMenu = true;
scope.https = false;
if (scope.type === 'url') {
if (scope.data.indexOf('https://') === 0) {
scope.https = true;
}
}
});
});
scope.hide = function() {
@ -33,9 +28,18 @@ angular.module('copayApp.directives')
externalLinkService.open(url);
};
scope.sendPaymentToAddress = function(bitcoinAddress) {
var noPrefixInAddress = 0;
if (bitcoinAddress.toLowerCase().indexOf('bitcoin') < 0) {
noPrefixInAddress = 1;
}
scope.showMenu = false;
sendFlowService.start({
data: bitcoinAddress
$state.go('tabs.send').then(function() {
$timeout(function() {
$state.transitionTo('tabs.send.amount', {
toAddress: bitcoinAddress,
noPrefix: noPrefixInAddress
});
}, 50);
});
};
scope.addToAddressBook = function(bitcoinAddress) {

View file

@ -1,6 +1,6 @@
'use strict';
angular.module('copayApp.directives').directive('shapeshiftCoinTrader', function($interval, shapeshiftApiService, profileService, incomingDataService, ongoingProcess) {
angular.module('copayApp.directives').directive('shapeshiftCoinTrader', function($interval, shapeshiftApiService, profileService, incomingData, ongoingProcess) {
return {
restrict: 'E',
transclude: true,
@ -111,8 +111,7 @@ angular.module('copayApp.directives').directive('shapeshiftCoinTrader', function
orderId: $scope.depositInfo.orderId
};
// How to handle this
if (incomingDataService.redir(sendAddress, 'shapeshift', shapeshiftData)) {
if (incomingData.redir(sendAddress, shapeshiftData)) {
ongoingProcess.set('connectingShapeshift', false);
return;
}

View file

@ -116,8 +116,7 @@ angular.module('copayApp.directives')
function getTransformStyle(translatePct) {
return {
'transform': 'translateX(' + translatePct + '%)',
'-webkit-transform': 'translateX(' + translatePct + '%)'
'transform': 'translateX(' + translatePct + '%)'
};
}

View file

@ -9,12 +9,12 @@ angular.module('copayApp.directives')
scope: {
isShown: '=slideSuccessShow',
onConfirm: '&slideSuccessOnConfirm',
hideOnConfirm: '=slideSuccessHideOnConfirm',
onShare: '=slideSuccessOnShare',
hideOnConfirm: '=slideSuccessHideOnConfirm'
},
link: function(scope, element, attrs) {
scope.isCordova = platformInfo.isCordova;
scope.hasShareFunction = typeof scope.onShare === 'function';
scope.isWindowsPhoneApp = platformInfo.isCordova && platformInfo.isWP;
var elm = element[0];
elm.style.display = 'none';
scope.$watch('isShown', function() {
@ -32,9 +32,6 @@ angular.module('copayApp.directives')
elm.style.display = 'none';
}
};
scope.onShareButtonClick = function() {
scope.onShare();
}
}
};
});

View file

@ -1,131 +0,0 @@
'use strict';
(function(){
angular
.module('bitcoincom.directives')
.directive('walletBalance', function() {
return {
restrict: 'E',
scope: {
displayAsFiat: '@',
totalBalanceSat: '@',
// The Wallet object is sometimes not stringify()-able, so not interpolatable,
// so can't be passed to a directive.
walletCoin: '@',
walletStatus: '@',
walletCachedBalance: '@',
walletCachedBalanceUpdatedOn: '@',
walletCachedStatus: '@'
},
templateUrl: 'views/includes/wallet-balance.html',
controller: walletBalanceController
}
});
function walletBalanceController($log, $scope, txFormatService) {
var cryptoBalanceHasBeenDisplayed = false;
formatBalance();
$scope.$watchGroup(['displayAsFiat', 'totalBalanceSat'], function onWalletBalanceWatch() {
formatBalance();
});
function displayCryptoBalance(walletStatus, walletCachedBalance, walletCachedBalanceUpdatedOn, walletCachedStatus) {
if (walletStatus && walletStatus.isValid && walletStatus.totalBalanceStr) {
setDisplay(walletStatus.totalBalanceStr, '');
cryptoBalanceHasBeenDisplayed = true;
return;
}
if (walletCachedBalance) {
setDisplay(walletCachedBalance, walletCachedBalanceUpdatedOn);
return;
}
if (walletCachedStatus && walletCachedStatus.isValid && walletCachedStatus.totalBalanceStr) {
setDisplay(walletCachedStatus.totalBalanceStr, '');
return;
}
setDisplay('', '');
}
function displayFiatBalance(walletStatus, walletCachedStatus, walletCoin) {
var displayAmount = '';
if (walletStatus && walletStatus.isValid && walletStatus.alternativeBalanceAvailable) {
displayAmount = walletStatus.totalBalanceAlternative + ' ' + walletStatus.alternativeIsoCode;
setDisplay(displayAmount, '');
return;
}
if (walletCachedStatus && walletCachedStatus.isValid && walletCachedStatus.alternativeBalanceAvailable) {
displayAmount = walletCachedStatus.totalBalanceAlternative + ' ' + walletCachedStatus.alternativeIsoCode;
setDisplay(displayAmount, '');
return;
}
getFiatBalance(walletStatus, walletCachedStatus, walletCoin);
}
function formatBalance() {
var displayAsFiat = $scope.displayAsFiat === 'true';
var walletStatusObj = null;
var walletCachedBalance = null;
var walletCachedBalanceUpdatedOn = null;
var walletCachedStatusObj = null;
try {
walletStatusObj = JSON.parse($scope.walletStatus);
} catch (e) {
$log.warn('Failed to parse walletStatus.', e);
}
try {
walletCachedStatusObj = JSON.parse($scope.walletCachedStatus);
} catch (e) {
$log.warn('Failed to parse walletCachedStatus.', e);
}
if (!displayAsFiat || displayAsFiat && !cryptoBalanceHasBeenDisplayed) {
displayCryptoBalance(walletStatusObj, walletCachedBalance, walletCachedBalanceUpdatedOn, walletCachedStatusObj);
}
if (displayAsFiat) {
displayFiatBalance(walletStatusObj, walletCachedStatusObj, $scope.walletCoin);
}
}
function getFiatBalance(walletStatus, walletCachedStatus, walletCoin) {
var totalBalanceSat = null;
if (walletStatus && walletStatus.isValid) {
totalBalanceSat = walletStatus.totalBalanceSat
} else if (walletCachedStatus && walletCachedStatus.isValid) {
totalBalanceSat = walletCachedStatus.totalBalanceSat
}
// 0 is valid
if (totalBalanceSat === null) {
$log.warn('Abandoning call to get fiat balance, because no valid wallet status (cached or otherwise).');
return;
}
txFormatService.formatAlternativeStr(walletCoin, totalBalanceSat, function onFormatAlernativeStr(formatted) {
if (formatted) {
setDisplay(formatted, '');
} else {
$log.error('Failed to format fiat balance of wallet.');
}
});
}
function setDisplay(amount, cachedBalanceUpdatedOn) {
$scope.displayAmount = amount;
$scope.cachedBalanceUpdatedOn = cachedBalanceUpdatedOn;
}
}
})();

View file

@ -236,7 +236,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
}
})
.state('tabs.receive', {
url: '/receive/:walletId',
url: '/receive',
views: {
'tab-receive': {
controller: 'tabReceiveController',
@ -287,44 +287,16 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
*/
.state('tabs.send.amount', {
url: '/amount',
url: '/amount/:recipientType/:toAddress/:toName/:toEmail/:toColor/:coin/:fixedUnit/:fromWalletId/:minShapeshiftAmount/:maxShapeshiftAmount/:shapeshiftOrderId/:displayAddress/:noPrefix',
views: {
'tab-send@tabs': {
controller: 'amountController',
controllerAs: 'vm',
templateUrl: 'views/amount.html'
}
}
})
.state('tabs.send.wallet-to-wallet', {
url: '/wallet-to-wallet',
views: {
'tab-send@tabs': {
controller: 'walletSelectorController',
templateUrl: 'views/walletSelector.html'
}
}
})
.state('tabs.send.origin', {
url: '/origin',
views: {
'tab-send@tabs': {
controller: 'walletSelectorController',
templateUrl: 'views/walletSelector.html',
}
}
})
.state('tabs.send.destination', {
url: '/destination',
views: {
'tab-send@tabs': {
controller: 'walletSelectorController',
templateUrl: 'views/walletSelector.html',
}
}
})
.state('tabs.send.confirm', {
url: '/confirm',
url: '/confirm/:recipientType/:toAddress/:toName/:toAmount/:toEmail/:toColor/:description/:coin/:useSendMax/:fromWalletId/:displayAddress/:requiredFeeRate',
views: {
'tab-send@tabs': {
controller: 'confirmController',
@ -344,19 +316,6 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
}
}
})
.state('tabs.send.review', {
url: '/review/:thirdParty/:amount/:fromWalletId/:sendMax/:toAddress/:toWalletId',
views: {
'tab-send@tabs': {
controller: 'reviewController',
controllerAs: 'vm',
templateUrl: 'views/review.html'
}
},
params: {
paypro: null
}
})
/*
*
@ -736,17 +695,16 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
})
.state('tabs.paymentRequest.amount', {
url: '/amount/:toWalletId',
url: '/amount/:coin',
views: {
'tab-receive@tabs': {
controller: 'amountController',
controllerAs: 'vm',
templateUrl: 'views/amount.html'
}
}
})
.state('tabs.paymentRequest.confirm', {
url: '/confirm/:amount/:toWalletId',
url: '/confirm/:amount/:currency/:coin',
views: {
'tab-receive@tabs': {
controller: 'customAmountController',
@ -887,7 +845,6 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
views: {
'tab-home@tabs': {
controller: 'amountController',
controllerAs: 'vm',
templateUrl: 'views/amount.html'
}
}
@ -953,7 +910,6 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
views: {
'tab-home@tabs': {
controller: 'amountController',
controllerAs: 'vm',
templateUrl: 'views/amount.html'
}
}
@ -1012,7 +968,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
/* Shapeshift */
.state('tabs.shapeshift', {
url: '/shapeshift/:fromWalletId/:toWalletId',
url: '/shapeshift',
views: {
'tab-home@tabs': {
controller: 'shapeshiftController',
@ -1073,7 +1029,6 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
views: {
'tab-home@tabs': {
controller: 'amountController',
controllerAs: 'vm',
templateUrl: 'views/amount.html'
}
},
@ -1126,7 +1081,6 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
views: {
'tab-home@tabs': {
controller: 'amountController',
controllerAs: 'vm',
templateUrl: 'views/amount.html'
}
},
@ -1183,7 +1137,6 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
views: {
'tab-home@tabs': {
controller: 'amountController',
controllerAs: 'vm',
templateUrl: 'views/amount.html'
}
}
@ -1207,7 +1160,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
}
});
})
.run(function($rootScope, $state, $location, $log, $timeout, startupService, ionicToast, fingerprintService, $ionicHistory, $ionicPlatform, $window, appConfigService, lodash, platformInfo, profileService, uxLanguage, gettextCatalog, openURLService, storageService, scannerService, configService, emailService, /* plugins START HERE => */ buydotbitcoindotcomService, pushNotificationsService, glideraService, amazonService, bitpayCardService, applicationService, mercadoLibreService, rateService) {
.run(function($rootScope, $state, $location, $log, $timeout, startupService, ionicToast, fingerprintService, $ionicHistory, $ionicPlatform, $window, appConfigService, lodash, platformInfo, profileService, uxLanguage, gettextCatalog, openURLService, storageService, scannerService, configService, emailService, /* plugins START HERE => */ buydotbitcoindotcomService, glideraService, amazonService, bitpayCardService, applicationService, mercadoLibreService, rateService) {
$ionicPlatform.ready(function() {
@ -1231,14 +1184,9 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
}
});
configService.whenAvailable(function(config) {
pushNotificationsService.init();
});
//firebaseEventsService.init();
var channel = "ga";
if (platformInfo.isCordova) {
channel = "firebase";
var channel = "firebase";
if (platformInfo.isNW) {
channel = "ga";
}
// Send a log to test
@ -1277,13 +1225,6 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
});
window.BitAnalytics.ActionHandlers.trackAction(actionTabOpen);
var actionShapeShiftStart = new window.BitAnalytics.ActionFactory.createAction('click', {
name: 'shapeshift_start_click',
class: 'track_shapeshift_start_click',
channels: [channel]
});
window.BitAnalytics.ActionHandlers.trackAction(actionShapeShiftStart);
// Init language
uxLanguage.init(function (lang) {
@ -1323,7 +1264,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
if (screen.width < 768 && platformInfo.isCordova)
screen.lockOrientation('portrait');
if (ionic.Platform.isAndroid() && platformInfo.isCordova && StatusBar) {
if (ionic.Platform.isAndroid() && StatusBar) {
StatusBar.backgroundColorByHexString('#000000');
}

View file

@ -1,416 +0,0 @@
'use strict';
// https://github.com/bitcoin/bips/blob/master/bip-0021.mediawiki
// https://github.com/bitcoin/bips/blob/master/bip-0072.mediawiki
(function(){
angular
.module('bitcoincom.services')
.factory('bitcoinUriService', bitcoinUriService);
function bitcoinUriService(bitcoinCashJsService, bwcService, $log) {
var bch = bitcoinCashJsService.getBitcoinCashJs();
var bitcore = bwcService.getBitcore();
var service = {
parse: parse
};
return service;
function bitpayAddrOnMainnet(address) {
var Address = bch.Address;
var BitpayFormat = Address.BitpayFormat;
var mainnet = bch.Networks.mainnet;
var result = null;
if (address[0] == 'C') {
try {
result = Address.fromString(address, mainnet, 'pubkeyhash', BitpayFormat);
} catch (e) {};
} else if (address[0] == 'H') {
try {
result = Address.fromString(address, mainnet, 'scripthash', BitpayFormat);
} catch (e) {};
}
return result;
}
function cashAddrOnMainnet(address) {
var Address = bch.Address;
var CashAddrFormat = Address.CashAddrFormat;
var mainnet = bch.Networks.mainnet;
var prefixed = 'bitcoincash:' + address;
var result = null;
if (address[0] == 'q') {
try {
result = Address.fromString(prefixed, mainnet, 'pubkeyhash', CashAddrFormat);
} catch (e) {};
} else if (address[0] == 'p') {
try {
result = Address.fromString(prefixed, mainnet, 'scripthash', CashAddrFormat);
} catch (e) {};
}
return result;
}
function cashAddrOnTestnet(address) {
var Address = bch.Address;
var CashAddrFormat = Address.CashAddrFormat;
var testnet = bch.Networks.testnet;
var prefixed = 'bchtest:' + address;
var result = null;
if (address[0] == 'q') {
try {
result = Address.fromString(prefixed, testnet, 'pubkeyhash', CashAddrFormat);
} catch (e) {};
} else if (address[0] == 'p') {
try {
result = Address.fromString(prefixed, testnet, 'scripthash', CashAddrFormat);
} catch (e) {};
}
return result;
}
function infoFromWalletImportText(data) {
var split = data.split('|');
// Copay seems to use extra parameter for coin.
if (split.length < 5 || split.length > 6) {
return null;
}
var type = parseInt(split[0], 10);
if (isNaN(type)) {
return null;
}
var data = split[1];
var network = split[2];
if (!(network === 'livenet' || network === 'testnet')) {
return null;
}
var isTestnet = network === 'testnet';
var derivationPath = split[3];
if (!/^m\/\d+'\/\d+'\/\d+'$/.test(derivationPath)) {
return null;
}
var hasPassphraseText = split[4];
if (!(hasPassphraseText === 'true' || hasPassphraseText === 'false')) {
return null;
}
var hasPassphrase = hasPassphraseText === 'true';
var coin; // Intentionally undefined as may not be present
if (split.length > 5) {
var coinText = split[5];
if (!(coinText === 'bch' || coinText === 'btc')) {
return null;
}
coin = coinText;
}
return {
type: type,
data: data,
isTestnet: isTestnet,
derivationPath: derivationPath,
hasPassphrase: hasPassphrase,
coin: coin
};
}
/*
For parsing:
BIP21
BIP72
returns:
{
amount: '',
amountInSatoshis: 0,
bareUrl: '',
coin: '',
copayInvitation: '',
import: { // testnet info in root, coin info in root if available
data: '',
derivationPath: '',
hasPassphrase: false,
type: 1,
},
isValid: false,
label: '',
message: '',
other: {
somethingIDontUnderstand: 'Its value'
},
privateKey: {
encrypted: '',
wif: ''
}'',
publicAddress: {
bitpay: '',
cashAddr: '',
legacy: '',
},
req: {
"req-param0": '',
"req-param1": ''
},
testnet: false,
url: '' // For BIP70
}
Only fields that are present in the data are defined in the returned object. Both privateKey and publicAddress only have 1 field defined, if they exist at all.
The exception to this is the coin property, which is determined from other data, such as the prefix or address type.
*/
function parse(data) {
var parsed = {
isValid: false
};
if (typeof data !== 'string') {
return parsed;
}
// Identify prefix
var trimmed = data.trim();
var colonSplit = /^([\w-]*):?(.*)$/.exec(trimmed);
if (!colonSplit) {
return parsed;
}
var addressAndParams = '';
var preColonLower = colonSplit[1].toLowerCase();
if (preColonLower === 'bitcoin') {
parsed.coin = 'btc';
addressAndParams = colonSplit[2].trim();
console.log('Is btc');
} else if (/^(?:bitcoincash)|(?:bitcoin-cash)$/.test(preColonLower)) {
parsed.coin = 'bch';
parsed.test = false;
addressAndParams = colonSplit[2].trim();
console.log('Is bch');
} else if (/^(?:bchtest)$/.test(preColonLower)) {
parsed.coin = 'bch';
parsed.isTestnet = true;
addressAndParams = colonSplit[2].trim();
console.log('Is bch');
} else if (colonSplit[2] === '') {
// No colon and no coin specifier.
addressAndParams = colonSplit[1].trim();
console.log('No prefix.');
} else if (/^https?$/.test(colonSplit[1])) { // Plain URL
addressAndParams = trimmed;
} else if (colonSplit[2].indexOf('|') == 0) { // Import
addressAndParams = trimmed
} else {
// Something we don't recognise
return parsed;
}
// Remove erroneous leading slashes
//var leadingSlashes = /^\/*([^\/]+(?:.*))$/.exec(addressAndParams);
var leadingSlashes = /^\/*(.*)$/.exec(addressAndParams);
if (!leadingSlashes) {
return parsed;
}
addressAndParams = leadingSlashes[1];
var questionMarkSplit = /^([^\?]*)\??([^\?]*)$/.exec(addressAndParams);
if (!questionMarkSplit) {
return parsed;
}
var address = questionMarkSplit[1];
var params = questionMarkSplit[2];
if (params.length > 0) {
var paramsSplit = params.split('&');
var others;
var req;
var paramCount = paramsSplit.length;
for(var i = 0; i < paramCount; i++) {
var param = paramsSplit[i];
var valueSplit = param.split('=');
if (valueSplit.length !== 2) {
return parsed;
}
var key = valueSplit[0];
var value = valueSplit[1];
var decodedValue = decodeURIComponent(value);
switch(key) {
case 'amount':
var amount = parseFloat(decodedValue);
if (amount) { // Checking for NaN, or no numbers at all etc. & convert to satoshi
parsed.amount = decodedValue; // Need to check if a currency is precised
parsed.amountInSatoshis = amount * 100000000
} else {
return parsed;
}
break;
case 'label':
parsed.label = decodedValue;
break;
case 'message':
parsed.message = decodedValue;
break;
case 'r':
// Could use a more comprehesive regex to test URL validity, but then how would we know
// which part of the validation it failed?
if (decodedValue.startsWith('https://')) {
parsed.url = decodedValue;
} else {
return parsed;
}
break;
default:
if (key.startsWith('req-')) {
req = req || {};
req[key] = decodedValue;
} else {
others = others || {};
others[key] = decodedValue;
}
}
};
}
parsed.others = others;
parsed.req = req;
if (address) {
var addressLowerCase = address.toLowerCase();
var copayInvitationRe = /^[0-9A-HJ-NP-Za-km-z]{70,80}$/;
//var legacyRe = /^[13][a-km-zA-HJ-NP-Z1-9]{25,34}$/;
//var legacyTestnetRe = /^[mn][a-km-zA-HJ-NP-Z1-9]{25,34}$/;
var privateKeyEncryptedRe = /^6P[1-9A-HJ-NP-Za-km-z]{56}$/;
var privateKeyForUncompressedPublicKeyRe = /^5[1-9A-HJ-NP-Za-km-z]{50}$/;
var privateKeyForUncompressedPublicKeyTestnetRe = /^9[1-9A-HJ-NP-Za-km-z]{50}$/;
var privateKeyForCompressedPublicKeyRe = /^[KL][1-9A-HJ-NP-Za-km-z]{51}$/;
var privateKeyForCompressedPublicKeyTestnetRe = /^[c][1-9A-HJ-NP-Za-km-z]{51}$/;
var urlRe = /^https?:\/\/.+/;
var bitpayAddrMainnet = bitpayAddrOnMainnet(address);
var cashAddrTestnet = cashAddrOnTestnet(addressLowerCase);
var cashAddrMainnet = cashAddrOnMainnet(addressLowerCase);
var importInfo = infoFromWalletImportText(address);
var privateKey = '';
if (parsed.isTestnet && cashAddrTestnet) {
parsed.address = addressLowerCase;
parsed.coin = 'bch';
parsed.publicAddress = {
cashAddr: addressLowerCase
};
parsed.isValid = true;
} else if (cashAddrMainnet) {
parsed.coin = 'bch';
parsed.publicAddress = {
cashAddr: addressLowerCase
};
parsed.isTestnet = false;
parsed.isValid = true;
} else if (bitcore.Address.isValid(address, 'livenet')) {
parsed.publicAddress = {
legacy: address
};
parsed.isTestnet = false;
parsed.isValid = true;
} else if (bitcore.Address.isValid(address, 'testnet')) {
parsed.publicAddress = {
legacy: address
};
parsed.isTestnet = true;
parsed.isValid = true;
} else if (bitpayAddrMainnet) {
parsed.coin = 'bch';
parsed.publicAddress = {
bitpay: address
};
parsed.isTestnet = false;
parsed.isValid = true;
} else if (copayInvitationRe.test(address) ) {
parsed.copayInvitation = address;
parsed.isValid = true;
} else if (privateKeyForUncompressedPublicKeyRe.test(address) || privateKeyForCompressedPublicKeyRe.test(address)) {
privateKey = address;
try {
new bitcore.PrivateKey(privateKey, 'livenet');
parsed.privateKey = { wif: privateKey };
parsed.isTestnet = false;
parsed.isValid = true;
} catch (e) {}
} else if (privateKeyForUncompressedPublicKeyTestnetRe.test(address) || privateKeyForCompressedPublicKeyTestnetRe.test(address)) {
privateKey = address;
try {
new bitcore.PrivateKey(privateKey, 'testnet');
parsed.privateKey = { wif: privateKey };
parsed.isTestnet = true;
parsed.isValid = true;
} catch (e) {}
} else if (privateKeyEncryptedRe.test(address)) {
parsed.privateKey = { encrypted: address };
parsed.isValid = true;
} else if (urlRe.test(address)) {
parsed.bareUrl = trimmed;
parsed.isValid = true;
} else if (importInfo) {
parsed.import = {
type: importInfo.type,
data: importInfo.data,
derivationPath: importInfo.derivationPath,
hasPassphrase: importInfo.hasPassphrase
};
parsed.coin = importInfo.coin;
parsed.isTestnet = importInfo.isTestnet;
parsed.isValid = true;
}
} else {
parsed.isValid = !!parsed.url; // BIP72
}
return parsed;
}
}
})();

View file

@ -1,429 +0,0 @@
describe('bitcoinUriService', function() {
var bitcoinUriService;
beforeEach(function() {
module('bitcoinCashJsModule');
module('bitcoincom.services');
module('bwcModule');
inject(function($injector){
bitcoinUriService = $injector.get('bitcoinUriService');
});
});
it('Bitcoin BIP72', function() {
var parsed = bitcoinUriService.parse('bitcoin:?r=https://bitpay.com/i/CwzbKP3k3JNgXJBfuoerDr');
expect(parsed.isValid).toBe(true);
expect(parsed.coin).toBe('btc');
expect(parsed.isTestnet).toBeUndefined();
expect(parsed.publicAddress).toBeUndefined();
expect(parsed.url).toBe('https://bitpay.com/i/CwzbKP3k3JNgXJBfuoerDr');
});
it('Bitcoin Cash BIP72', function() {
var parsed = bitcoinUriService.parse('bitcoincash:?r=https://bitpay.com/i/SmHdie5dvBnG5kouZzEPzu');
expect(parsed.isValid).toBe(true);
expect(parsed.coin).toBe('bch');
expect(parsed.publicAddress).toBeUndefined();
expect(parsed.isTestnet).toBeUndefined();
expect(parsed.url).toBe('https://bitpay.com/i/SmHdie5dvBnG5kouZzEPzu');
});
it('Bitcoin Cash prefix with legacy address', function() {
var parsed = bitcoinUriService.parse('bitcoincash:1G9FA9fFnHfTYxvmXeAbBD9FwzPAVMbd3j');
expect(parsed.isValid).toBe(true);
expect(parsed.coin).toBe('bch');
expect(parsed.publicAddress.legacy).toBe('1G9FA9fFnHfTYxvmXeAbBD9FwzPAVMbd3j');
expect(parsed.isTestnet).toBe(false);
});
it('Bitcoin Cash prefix with legacy address on testnet', function() {
var parsed = bitcoinUriService.parse('bitcoincash:mkDQrKfSFD441JxrD1iPBsJFExgkvrPGQn');
expect(parsed.isValid).toBe(true);
expect(parsed.coin).toBe('bch');
expect(parsed.publicAddress.legacy).toBe('mkDQrKfSFD441JxrD1iPBsJFExgkvrPGQn');
expect(parsed.isTestnet).toBe(true);
});
it('Bitcoin Cash uri with extended params', function() {
var parsed = bitcoinUriService.parse('bitcoincash:qr8v2vqnzntykakht43rqmxq8cdjzjp795fc3vsjgc?unknown=something&mystery=Melton%20probang&req-one=ichi&req-beta=Ni%20san');
expect(parsed.isValid).toBe(true);
expect(parsed.coin).toBe('bch');
expect(parsed.others.mystery).toBe('Melton probang');
expect(parsed.others.unknown).toBe('something');
expect(parsed.publicAddress.cashAddr).toBe('qr8v2vqnzntykakht43rqmxq8cdjzjp795fc3vsjgc');
expect(parsed.req['req-beta']).toBe('Ni san');
expect(parsed.req['req-one']).toBe('ichi');
expect(parsed.isTestnet).toBe(false);
});
it('Bitcoin Cash uri with invalid amount', function() {
var parsed = bitcoinUriService.parse('bitcoincash:qq0knhwj4d5zy3kdph24w6etq58vwzua6sm7lhcmuk?amount=three');
expect(parsed.isValid).toBe(false);
});
it('Bitcoin testnet address', function() {
var parsed = bitcoinUriService.parse('mtWcoToWhbtPoCby5fvs8xdBujT5GGenD4');
expect(parsed.isValid).toBe(true);
expect(parsed.coin).toBeUndefined();
expect(parsed.publicAddress.legacy).toBe('mtWcoToWhbtPoCby5fvs8xdBujT5GGenD4');
expect(parsed.isTestnet).toBe(true);
});
it('Bitcoin uri', function() {
var parsed = bitcoinUriService.parse('bitcoin:15yCdKWVKRvfXMJpPYZBqMhiGKwjKzZdLN');
expect(parsed.isValid).toBe(true);
expect(parsed.coin).toBe('btc');
expect(parsed.publicAddress.legacy).toBe('15yCdKWVKRvfXMJpPYZBqMhiGKwjKzZdLN');
expect(parsed.isTestnet).toBe(false);
});
it('Bitcoin uri with encoded label', function() {
var parsed = bitcoinUriService.parse('bitcoin:1MxudKDEBWZ1yjizUSf6htacenNtb3DWbT?label=Mr.%20Smith');
expect(parsed.isValid).toBe(true);
expect(parsed.coin).toBe('btc');
expect(parsed.label).toBe('Mr. Smith');
expect(parsed.publicAddress.legacy).toBe('1MxudKDEBWZ1yjizUSf6htacenNtb3DWbT');
expect(parsed.isTestnet).toBe(false);
});
it('Bitcoin uri with params', function() {
var parsed = bitcoinUriService.parse('bitcoin:12nCRhMDfxVnuF3uYMXv2fNxBohNmacfWu?amount=20.3&label=Luke-Jr&message=Donation%20for%20project%20xyz');
expect(parsed.isValid).toBe(true);
expect(parsed.amount).toBe('20.3');
expect(parsed.amountInSatoshis).toBe(2030000000);
expect(parsed.coin).toBe('btc');
expect(parsed.label).toBe('Luke-Jr');
expect(parsed.publicAddress.legacy).toBe('12nCRhMDfxVnuF3uYMXv2fNxBohNmacfWu');
expect(parsed.message).toBe('Donation for project xyz');
expect(parsed.isTestnet).toBe(false);
});
it('Bitcoin uri with slash', function() {
var parsed = bitcoinUriService.parse('bitcoin:/1GhpYmbRaf73AZRxDwAGr6653iZBGzdgeA');
expect(parsed.isValid).toBe(true);
expect(parsed.coin).toBe('btc');
expect(parsed.publicAddress.legacy).toBe('1GhpYmbRaf73AZRxDwAGr6653iZBGzdgeA');
expect(parsed.isTestnet).toBe(false);
});
it('Bitcoin uri with slashes', function() {
var parsed = bitcoinUriService.parse('bitcoin://18PCPhgZJjLxe9g3Q1BXLpL5aVut1fW3aX');
expect(parsed.isValid).toBe(true);
expect(parsed.coin).toBe('btc');
expect(parsed.publicAddress.legacy).toBe('18PCPhgZJjLxe9g3Q1BXLpL5aVut1fW3aX');
expect(parsed.isTestnet).toBe(false);
});
it('Bitcoin uri with space', function() {
var parsed = bitcoinUriService.parse('bitcoin: 19cPoKU5ZazY8NkLEsxK7drBqJnpGkax3d');
expect(parsed.isValid).toBe(true);
expect(parsed.coin).toBe('btc');
expect(parsed.publicAddress.legacy).toBe('19cPoKU5ZazY8NkLEsxK7drBqJnpGkax3d');
expect(parsed.isTestnet).toBe(false);
});
it('Bitpay without prefix', function() {
var parsed = bitcoinUriService.parse('CJoRov8TirekvajiimQpb5Hk95evA7H2Yz');
expect(parsed.isValid).toBe(true);
expect(parsed.coin).toBe('bch');
expect(parsed.publicAddress.bitpay).toBe('CJoRov8TirekvajiimQpb5Hk95evA7H2Yz');
expect(parsed.isTestnet).toBe(false);
});
it('legacy address', function() {
var parsed = bitcoinUriService.parse('1JXeGEu7bNEAYu6URT6dU6g1Ys6ffSAWYW');
expect(parsed.isValid).toBe(true);
expect(parsed.coin).toBeUndefined();
expect(parsed.publicAddress.legacy).toBe('1JXeGEu7bNEAYu6URT6dU6g1Ys6ffSAWYW');
expect(parsed.isTestnet).toBe(false);
});
it('cashAddr testnet with prefix', function() {
var parsed = bitcoinUriService.parse('bchtest:qpcz6pmurq9ctg5848trzz9zmuuygj4q5qam7ph3gt');
expect(parsed.isValid).toBe(true);
expect(parsed.coin).toBe('bch');
expect(parsed.publicAddress.cashAddr).toBe('qpcz6pmurq9ctg5848trzz9zmuuygj4q5qam7ph3gt');
expect(parsed.isTestnet).toBe(true);
});
it('cashAddr uppercase', function() {
var parsed = bitcoinUriService.parse('BITCOINCASH:QZZG9NMC5VX8GAP6XFATX3TWNSDN2YRMCSSULSMY44');
expect(parsed.isValid).toBe(true);
expect(parsed.coin).toBe('bch');
expect(parsed.publicAddress.cashAddr).toBe('qzzg9nmc5vx8gap6xfatx3twnsdn2yrmcssulsmy44');
expect(parsed.isTestnet).toBe(false);
});
it('cashAddr with dash', function() {
var parsed = bitcoinUriService.parse('bitcoin-cash:qpshfu3dk5s3e7zdcgdcun6xgxtra6uyxs7g580js0');
expect(parsed.isValid).toBe(true);
expect(parsed.coin).toBe('bch');
expect(parsed.publicAddress.cashAddr).toBe('qpshfu3dk5s3e7zdcgdcun6xgxtra6uyxs7g580js0');
expect(parsed.isTestnet).toBe(false);
});
it('cashAddr with prefix', function() {
var parsed = bitcoinUriService.parse('bitcoincash:qrq9p82a247lecv08ldk5p5h6ahtnjzpqcnh8yhq92');
expect(parsed.isValid).toBe(true);
expect(parsed.coin).toBe('bch');
expect(parsed.publicAddress.cashAddr).toBe('qrq9p82a247lecv08ldk5p5h6ahtnjzpqcnh8yhq92');
expect(parsed.isTestnet).toBe(false);
});
it('cashAddr with slash', function() {
var parsed = bitcoinUriService.parse('bitcoincash:/qzdectfmuw0xxztfx7mh045830dqcshj85hr44l35a');
expect(parsed.isValid).toBe(true);
expect(parsed.coin).toBe('bch');
expect(parsed.publicAddress.cashAddr).toBe('qzdectfmuw0xxztfx7mh045830dqcshj85hr44l35a');
expect(parsed.isTestnet).toBe(false);
});
it('cashAddr with slashes', function() {
var parsed = bitcoinUriService.parse('bitcoincash://qpj966w8utue75lqqq3rlgh20zkz3rmydqpq8syv9c');
expect(parsed.isValid).toBe(true);
expect(parsed.coin).toBe('bch');
expect(parsed.publicAddress.cashAddr).toBe('qpj966w8utue75lqqq3rlgh20zkz3rmydqpq8syv9c');
expect(parsed.isTestnet).toBe(false);
});
it('cashAddr with space', function() {
var parsed = bitcoinUriService.parse('bitcoincash: qpar9ldle8z6alcwgclejdhc24ha2xrg0szs5802ce');
expect(parsed.isValid).toBe(true);
expect(parsed.coin).toBe('bch');
expect(parsed.publicAddress.cashAddr).toBe('qpar9ldle8z6alcwgclejdhc24ha2xrg0szs5802ce');
expect(parsed.isTestnet).toBe(false);
});
it('cashAddr with space on testnet', function() {
var parsed = bitcoinUriService.parse('bchtest: qqjxkmtaxk4nv6w9h5ht2fjcj9c7ruh0fu7cnxsx5j');
expect(parsed.isValid).toBe(true);
expect(parsed.coin).toBe('bch');
expect(parsed.publicAddress.cashAddr).toBe('qqjxkmtaxk4nv6w9h5ht2fjcj9c7ruh0fu7cnxsx5j');
expect(parsed.isTestnet).toBe(true);
});
it('cashAddr without prefix', function() {
var parsed = bitcoinUriService.parse('qqen2y3l28dpk0dzsag8w027ds96u7z4pc0uxtl0nq');
expect(parsed.isValid).toBe(true);
expect(parsed.coin).toBe('bch');
expect(parsed.publicAddress.cashAddr).toBe('qqen2y3l28dpk0dzsag8w027ds96u7z4pc0uxtl0nq');
expect(parsed.isTestnet).toBe(false);
});
it('copay invitation', function() {
var parsed = bitcoinUriService.parse('PD5B7rEEj72st9d5nFszyuKxJP6FAGS7idVC2SMqiMxUcWVd8JifZDJw1UgjUctxefUFE3Sz6qLbch');
expect(parsed.isValid).toBe(true);
expect(parsed.copayInvitation).toBe('PD5B7rEEj72st9d5nFszyuKxJP6FAGS7idVC2SMqiMxUcWVd8JifZDJw1UgjUctxefUFE3Sz6qLbch');
});
it ('import BCH wallet no password', function() {
var parsed = bitcoinUriService.parse("1|suggest route obvious broccoli good position hidden tone history around final lobster|livenet|m/44'/0'/0'|false");
expect(parsed.isValid).toBe(true);
expect(parsed.import.type).toBe(1);
expect(parsed.import.data).toBe('suggest route obvious broccoli good position hidden tone history around final lobster');
expect(parsed.isTestnet).toBe(false);
expect(parsed.import.derivationPath).toBe("m/44'/0'/0'");
expect(parsed.import.hasPassphrase).toBe(false);
});
it ('import BCH wallet with passphrase', function() {
var parsed = bitcoinUriService.parse("1|fringe hazard all hobby trap myth fire stand sock empty soon east|livenet|m/44'/0'/0'|true");
expect(parsed.isValid).toBe(true);
expect(parsed.import.type).toBe(1);
expect(parsed.import.data).toBe('fringe hazard all hobby trap myth fire stand sock empty soon east');
expect(parsed.isTestnet).toBe(false);
expect(parsed.import.derivationPath).toBe("m/44'/0'/0'");
expect(parsed.import.hasPassphrase).toBe(true);
});
it ('import BTC wallet testnet', function() {
// From copay
var parsed = bitcoinUriService.parse("1|cat wealth column firm wet sauce tornado era feature monster click eyebrow|testnet|m/44'/1'/0'|false|btc");
expect(parsed.isValid).toBe(true);
expect(parsed.import.type).toBe(1);
expect(parsed.import.data).toBe('cat wealth column firm wet sauce tornado era feature monster click eyebrow');
expect(parsed.isTestnet).toBe(true);
expect(parsed.import.derivationPath).toBe("m/44'/1'/0'");
expect(parsed.import.hasPassphrase).toBe(false);
});
// Invalid addresses from https://github.com/bitcoincashorg/bitcoincash.org/blob/master/spec/cashaddr.md
it('invalid cashAddr style 1', function() {
var parsed = bitcoinUriService.parse('prefix:x64nx6hz');
expect(parsed.isValid).toBe(false);
});
it('invalid cashAddr style 2', function() {
var parsed = bitcoinUriService.parse('p:gpf8m4h7');
expect(parsed.isValid).toBe(false);
});
it('invalid cashAddr style 3', function() {
var parsed = bitcoinUriService.parse('bitcoincash:qpzry9x8gf2tvdw0s3jn54khce6mua7lcw20ayyn');
expect(parsed.isValid).toBe(false);
});
it('invalid cashAddr style 4', function() {
var parsed = bitcoinUriService.parse('bchtest:testnetaddress4d6njnut');
expect(parsed.isValid).toBe(false);
});
it('invalid cashAddr style 5', function() {
var parsed = bitcoinUriService.parse('bchreg:555555555555555555555555555555555555555555555udxmlmrz');
expect(parsed.isValid).toBe(false);
});
it('non-string', function() {
var parsed = bitcoinUriService.parse([1, 2, 3, 4]);
expect(parsed.isValid).toBe(false);
});
it('private key encrypted with BIP38', function() {
var parsed = bitcoinUriService.parse('6PRN5nEDmX842gsBzJryPu8Tw5kcsaQq1GPLcjVQPcEStvbFAtz11JX9pX');
expect(parsed.isValid).toBe(true);
expect(parsed.privateKey.encrypted).toBe('6PRN5nEDmX842gsBzJryPu8Tw5kcsaQq1GPLcjVQPcEStvbFAtz11JX9pX');
});
it('private key for compressed pubkey mainnet', function() {
var parsed = bitcoinUriService.parse('5HueCGU8rMjxEXxiPuD5BDku4MkFqeZyd4dZ1jvhTVqvbTLvyTJ');
expect(parsed.isValid).toBe(true);
expect(parsed.privateKey.wif).toBe('5HueCGU8rMjxEXxiPuD5BDku4MkFqeZyd4dZ1jvhTVqvbTLvyTJ');
expect(parsed.isTestnet).toBe(false);
});
it('private key for compressed pubkey mainnet with wrong checksum', function() {
var parsed = bitcoinUriService.parse('5HueCGU8rMjxEXxiPuD5BDku4MkFqeZyd4dZ1jvhTVqvbTLvyTu');
expect(parsed.isValid).toBe(false);
});
it('private key for compressed pubkey testnet', function() {
var parsed = bitcoinUriService.parse('cNJFgo1driFnPcBdBX8BrJrpxchBWXwXCvNH5SoSkdcF6JXXwHMm');
expect(parsed.isValid).toBe(true);
expect(parsed.privateKey.wif).toBe('cNJFgo1driFnPcBdBX8BrJrpxchBWXwXCvNH5SoSkdcF6JXXwHMm');
expect(parsed.isTestnet).toBe(true);
});
it('private key for compressed pubkey testnet with wrong checksum', function() {
var parsed = bitcoinUriService.parse('cNJFgo1driFnPcBdBX8BrJrpxchBWXwXCvNH5SoSkdcF6JXXwHMM');
expect(parsed.isValid).toBe(false);
});
it('private key for uncompressed pubkey mainnet', function() {
var parsed = bitcoinUriService.parse('L18V3rAhCKEioPnJ4BHLCCsaYa8eSNFrMjNQ2EdwgeAdmBSnTMwx');
expect(parsed.isValid).toBe(true);
expect(parsed.privateKey.wif).toBe('L18V3rAhCKEioPnJ4BHLCCsaYa8eSNFrMjNQ2EdwgeAdmBSnTMwx');
expect(parsed.isTestnet).toBe(false);
});
it('private key for uncompressed pubkey mainnet with wrong checksum', function() {
var parsed = bitcoinUriService.parse('L18V3rAhCKEioPnJ4BHLCCsaYa8eSNFrMjNQ2EdwgeAdmBSnTTwx');
expect(parsed.isValid).toBe(false);
});
it('private key for uncompressed pubkey testnet', function() {
var parsed = bitcoinUriService.parse('92Pg46rUhgTT7romnV7iGW6W1gbGdeezqdbJCzShkCsYNzyyNcc');
expect(parsed.isValid).toBe(true);
expect(parsed.privateKey.wif).toBe('92Pg46rUhgTT7romnV7iGW6W1gbGdeezqdbJCzShkCsYNzyyNcc');
expect(parsed.isTestnet).toBe(true);
});
it('private key for uncompressed pubkey testnet with wrong checksum', function() {
var parsed = bitcoinUriService.parse('92Pg46rUhgTT7romnV7iGW6W1gbGdeezqdbJCzShkCsYNzyyNcC');
expect(parsed.isValid).toBe(false);
});
it('URL only, http', function() {
var parsed = bitcoinUriService.parse('http://paperwallet.bitcoin.com');
expect(parsed.isValid).toBe(true);
expect(parsed.bareUrl).toBe('http://paperwallet.bitcoin.com');
});
it('URL only, https with query', function() {
var parsed = bitcoinUriService.parse('https://purse.io/?one=two&three=four');
expect(parsed.isValid).toBe(true);
expect(parsed.bareUrl).toBe('https://purse.io/?one=two&three=four');
});
});

View file

@ -1,5 +1,5 @@
'use strict';
angular.module('copayApp.services').factory('bitcoincomService', function(gettextCatalog, nextStepsService, platformInfo) {
angular.module('copayApp.services').factory('bitcoincomService', function(platformInfo, nextStepsService) {
var root = {};
var credentials = {};
@ -19,42 +19,42 @@ angular.module('copayApp.services').factory('bitcoincomService', function(gettex
var cashGamesItem = {
name: 'games',
title: gettextCatalog.getString('Bitcoin Cash Games'),
title: 'Bitcoin Cash Games',
icon: 'icon-games',
href: 'https://cashgames.bitcoin.com'
};
var newsItem = {
name: 'news',
title: gettextCatalog.getString('News'),
title: 'News',
icon: 'icon-news',
href: 'https://news.bitcoin.com/?utm_source=WalletApp&utm_medium=' + os + '&utm_campaign=News'
};
var poolItem = {
name: 'pool',
title: gettextCatalog.getString('Mining Pool'),
title: 'Mining Pool',
icon: 'icon-mining',
href: 'https://pool.bitcoin.com/?utm_source=WalletApp&utm_medium=' + os + '&utm_campaign=Pool'
};
var toolsItem = {
name: 'tools',
title: gettextCatalog.getString('Tools'),
title: 'Tools',
icon: 'icon-tools',
href: 'https://tools.bitcoin.com/?utm_source=WalletApp&utm_medium=' + os + '&utm_campaign=Tools'
};
var priceChartItem = {
name: 'pricechart',
title: gettextCatalog.getString('Bitcoin Price Charts'),
title: 'Bitcoin Price Charts',
icon: 'icon-chart',
sref: 'tabs.pricechart',
};
var faucetItem = {
name: 'faucet',
title: gettextCatalog.getString('Free Bitcoin Cash'),
title: 'Free Bitcoin Cash',
icon: 'icon-faucet',
href: 'https://free.bitcoin.com/?utm_source=WalletApp&utm_medium=' + os + '&utm_campaign=Faucet'
};
@ -85,9 +85,7 @@ angular.module('copayApp.services').factory('bitcoincomService', function(gettex
};
var register = function() {
if (!platformInfo.isAndroid) { // To comply with Google Play policies
nextStepsService.register(cashGamesItem);
}
nextStepsService.register(cashGamesItem);
nextStepsService.register(newsItem);
nextStepsService.register(poolItem);
nextStepsService.register(toolsItem);

View file

@ -1,6 +1,6 @@
'use strict';
angular.module('copayApp.services').factory('buyAndSellService', function(gettextCatalog, $log, servicesService, lodash, $ionicScrollDelegate, $timeout) {
angular.module('copayApp.services').factory('buyAndSellService', function($log, servicesService, lodash, $ionicScrollDelegate, $timeout) {
var root = {};
var services = [];
var linkedServices = [];
@ -23,7 +23,7 @@ angular.module('copayApp.services').factory('buyAndSellService', function(gettex
if (linkedServices.length == 0) {
servicesService.register({
title: gettextCatalog.getString('Buy Bitcoin'),
title: 'Buy Bitcoin',
name: 'buyandsell',
icon: 'icon-buy-bitcoin2',
sref: 'tabs.buyandsell',

View file

@ -1,6 +1,6 @@
'use strict';
angular.module('copayApp.services').factory('clipboardService', function ($http, $log, $timeout, platformInfo, nodeWebkitService, gettextCatalog, ionicToast, clipboard) {
angular.module('copayApp.services').factory('clipboardService', function ($http, $log, platformInfo, nodeWebkitService, gettextCatalog, ionicToast, clipboard) {
var root = {};
root.copyToClipboard = function (data) {
@ -11,15 +11,10 @@ angular.module('copayApp.services').factory('clipboardService', function ($http,
cordova.plugins.clipboard.copy(data);
} else if (platformInfo.isNW) {
nodeWebkitService.writeToClipboard(data);
} else if (navigator && navigator.clipboard) {
$log.debug("Use navigator clipboard.")
navigator.clipboard.writeText(data).catch(function onClipboardError(err) {
$log.debug("Clipboard writing is not supported in your browser..");
});
} else if (clipboard.supported) {
clipboard.copyText(data);
} else {
// Not supported
// No supported
return;
}
};
@ -31,9 +26,7 @@ angular.module('copayApp.services').factory('clipboardService', function ($http,
cb(text);
})
} else if (platformInfo.isNW) {
$timeout(function() {
cb(nodeWebkitService.readFromClipboard());
},0);
cb(nodeWebkitService.readFromClipboard());
} else {
navigator.clipboard.readText()
.then(function (text) {

View file

@ -1,5 +1,5 @@
'use strict'
angular.module('copayApp.services').factory('communityService', function(configService, gettextCatalog, $log, lodash) {
angular.module('copayApp.services').factory('communityService', function(configService, $log, lodash) {
var root = {};
var services = [];
@ -37,14 +37,14 @@ angular.module('copayApp.services').factory('communityService', function(configS
var bchRedditItem = {
name: 'bchreddit',
title: gettextCatalog.getString('Bitcoin Cash Reddit'),
title: 'Bitcoin Cash Reddit',
icon: 'icon-reddit-white',
href: 'http://reddit.com/r/btc'
};
var bitcoincomTwitterItem = {
name: 'bitcoincomTwitter',
title: gettextCatalog.getString('Bitcoin.com Twitter'),
title: 'Bitcoin.com Twitter',
icon: 'icon-twitter-white',
href: 'https://twitter.com/BTCTN'
};

View file

@ -18,7 +18,7 @@ angular.module('copayApp.services').factory('configService', function(storageSer
},
bwscash: {
url: 'https://bws.freepages.dk/bws/api'
url: 'https://bwscash.bitcoin.com/bws/api'
},
download: {

View file

@ -12,7 +12,6 @@ angular.module('copayApp.services').factory('feeService', function($log, $timeou
normal: gettext('Normal'),
economy: gettext('Economy'),
superEconomy: gettext('Super Economy'),
// free: gettext('No fee (works only for BCH)'),
custom: gettext('Custom')
};
@ -32,7 +31,6 @@ angular.module('copayApp.services').factory('feeService', function($log, $timeou
root.getFeeRate = function(coin, network, feeLevel, cb) {
if (feeLevel == 'custom') return cb();
// if (feeLevel == 'free') return cb(null, 0);
network = network || 'livenet';
@ -50,8 +48,8 @@ angular.module('copayApp.services').factory('feeService', function($log, $timeou
})
});
}
var feeRate = feeLevelRate.feePerKb;
var feeRate = feeLevelRate.feePerKb;
if (!fromCache) $log.debug('Dynamic fee: ' + feeLevel + '/' + network + ' ' + (feeLevelRate.feePerKb / 1000).toFixed() + ' SAT/B');

View file

@ -1,5 +1,5 @@
'use strict';
angular.module('copayApp.services').factory('firebaseEventsService', function firebaseEventsService($log, platformInfo) {
angular.module('copayApp.services').factory('firebaseEventsService', function firebaseEventsService($log, $state, $ionicHistory, sjcl, platformInfo, lodash, appConfigService, profileService, configService) {
var root = {};
var useEvents = platformInfo.isCordova && !platformInfo.isWP;

View file

@ -1,79 +0,0 @@
'use strict';
/**
* incomingDataService is an intermediate to redirect either to the sendFlow
* or to import/join a wallet.
*/
angular.module('copayApp.services').factory('incomingDataService', function(bitcoinUriService, $log, $state, $rootScope, scannerService, sendFlowService, gettextCatalog) {
var root = {};
root.showMenu = function(data) {
$rootScope.$broadcast('incomingDataMenu.showMenu', data);
};
root.redir = function(data, cbError) {
var parsed = bitcoinUriService.parse(data);
console.log(parsed);
$log.debug(parsed);
if (parsed.isValid) {
if (parsed.isTestnet) {
if (cbError) {
var errorMessage = gettextCatalog.getString('Testnet is not supported.');
cbError(new Error(errorMessage));
}
} else {
scannerService.pausePreview();
/**
* Strategy for the action
*/
if (parsed.copayInvitation) {
$state.go('tabs.home').then(function() {
$state.transitionTo('tabs.add.join', {
url: data
});
});
} else if (parsed.import) {
$state.go('tabs.home').then(function() {
$state.transitionTo('tabs.add.import', {
code: data
});
});
} else if (
!parsed.isValid
|| parsed.privateKey
|| (sendFlowService.state.isEmpty() && !parsed.url && !parsed.amount)
) {
root.showMenu({
original: data,
parsed: parsed
});
} else {
var state = sendFlowService.state.getClone();
state.data = data;
sendFlowService.start(state, function onError(err) {
/**
* OnError, open the menu (link not validated)
*/
root.showMenu({
original: data,
parsed: parsed
});
});
}
}
} else {
if (cbError) {
var errorMessage = gettextCatalog.getString('Data not recognised.');
cbError(new Error(errorMessage));
}
}
};
return root;
});

View file

@ -0,0 +1,434 @@
'use strict';
angular.module('copayApp.services').factory('incomingData', function($log, $state, $timeout, $ionicHistory, bitcore, bitcoreCash, $rootScope, payproService, scannerService, appConfigService, popupService, gettextCatalog, bitcoinCashJsService) {
var root = {};
root.showMenu = function(data) {
$rootScope.$broadcast('incomingDataMenu.showMenu', data);
};
root.redir = function(data, shapeshiftData) {
var originalAddress = null;
var noPrefixInAddress = 0;
if (data.toLowerCase().indexOf('bitcoin') < 0) {
noPrefixInAddress = 1;
}
if (typeof(data) == 'string' && !(/^bitcoin(cash)?:\?r=[\w+]/).exec(data) && (data.toLowerCase().indexOf('bitcoincash:') >= 0 || data[0] == 'q' || data[0] == 'p' || data[0] == 'C' || data[0] == 'H')) {
try {
noPrefixInAddress = 0;
if (data[0] == 'p' || data[0] == 'q') {
data = 'bitcoincash:' + data;
}
var paramString = '';
if (data.indexOf('?') >= 0) {
paramString = data.substring(data.indexOf('?'));
data = data.substring(0, data.indexOf('?'));
}
if (data.indexOf('BITCOINCASH:') >= 0) {
data = data.toLowerCase();
}
originalAddress = data.replace('bitcoincash:', '');
var legacyAddress = bitcoinCashJsService.readAddress(data).legacy;
data = 'bitcoincash:' + legacyAddress + paramString;
} catch (ex) {}
}
$log.debug('Processing incoming data: ' + data);
function sanitizeUri(data) {
// Fixes when a region uses comma to separate decimals
var regex = /[\?\&]amount=(\d+([\,\.]\d+)?)/i;
var match = regex.exec(data);
if (!match || match.length === 0) {
return data;
}
var value = match[0].replace(',', '.');
var newUri = data.replace(regex, value);
// mobile devices, uris like copay://glidera
newUri.replace('://', ':');
return newUri;
}
function getParameterByName(name, url) {
if (!url) return;
name = name.replace(/[\[\]]/g, "\\$&");
var regex = new RegExp("[?&]" + name + "(=([^&#]*)|&|#|$)"),
results = regex.exec(url);
if (!results) return null;
if (!results[2]) return '';
return decodeURIComponent(results[2].replace(/\+/g, " "));
}
function checkPrivateKey(privateKey) {
try {
new bitcore.PrivateKey(privateKey, 'livenet');
} catch (err) {
return false;
}
return true;
}
function goSend(addr, amount, message, coin, shapeshiftData) {
$state.go('tabs.send', {}, {
'reload': true,
'notify': $state.current.name == 'tabs.send' ? false : true
});
// Timeout is required to enable the "Back" button
$timeout(function() {
if (amount) {
$state.transitionTo('tabs.send.confirm', {
toAmount: amount,
toAddress: addr,
displayAddress: originalAddress ? originalAddress : addr,
description: message,
coin: coin
});
} else {
var params = {
toAddress: addr,
coin: coin,
displayAddress: originalAddress ? originalAddress : addr,
noPrefix: noPrefixInAddress
};
if (shapeshiftData) {
params['fromWalletId'] = shapeshiftData.fromWalletId;
params['minShapeshiftAmount'] = shapeshiftData.minAmount;
params['maxShapeshiftAmount'] = shapeshiftData.maxAmount;
params['shapeshiftOrderId'] = shapeshiftData.orderId;
}
$state.transitionTo('tabs.send.amount', params);
}
}, 100);
}
// data extensions for Payment Protocol with non-backwards-compatible request
if ((/^bitcoin(cash)?:\?r=[\w+]/).exec(data)) {
var coin = data.indexOf('bitcoincash') >= 0 ? 'bch' : 'btc';
data = decodeURIComponent(data.replace(/bitcoin(cash)?:\?r=/, ''));
if (coin == 'bch') {
payproService.getPayProDetailsViaHttp(data, function(err, details) {
if (err) {
popupService.showAlert(gettextCatalog.getString('Error'), err)
} else {
handlePayPro(createBchPayProObject(details), coin);
}
});
} else {
payproService.getPayProDetails(data, coin, function(err, details) {
if (err) {
popupService.showAlert(gettextCatalog.getString('Error'), err);
} else {
handlePayPro(details, coin);
}
});
}
return true;
}
data = sanitizeUri(data);
// Bitcoin URL
if (bitcore.URI.isValid(data)) {
var coin = 'btc';
var parsed = new bitcore.URI(data);
var addr = parsed.address ? parsed.address.toString() : '';
var message = parsed.message;
var amount = parsed.amount ? parsed.amount : '';
if (parsed.r) {
payproService.getPayProDetails(parsed.r, coin, function(err, details) {
if (err) {
if (addr && amount) goSend(addr, amount, message, coin, shapeshiftData);
else popupService.showAlert(gettextCatalog.getString('Error'), err);
} else handlePayPro(details, coin);
});
} else {
goSend(addr, amount, message, coin, shapeshiftData);
}
return true;
// Cash URI
} else if (bitcoreCash.URI.isValid(data)) {
var coin = 'bch';
var parsed = new bitcoreCash.URI(data);
var addr = parsed.address ? parsed.address.toString() : '';
var message = parsed.message;
var amount = parsed.amount ? parsed.amount : '';
// paypro not yet supported on cash
if (parsed.r) {
payproService.getPayProDetails(parsed.r, coin, function(err, details) {
if (err) {
if (addr && amount)
goSend(addr, amount, message, coin, shapeshiftData);
else
popupService.showAlert(gettextCatalog.getString('Error'), err);
}
handlePayPro(details, coin);
});
} else {
goSend(addr, amount, message, coin, shapeshiftData);
}
return true;
// Cash URI with bitcoin (btc) address version number?
} else if (bitcore.URI.isValid(data.replace(/^bitcoincash:/,'bitcoin:'))) {
$log.debug('Handling bitcoincash URI with legacy address');
var coin = 'bch';
var parsed = new bitcore.URI(data.replace(/^bitcoincash:/,'bitcoin:'));
var oldAddr = parsed.address ? parsed.address.toString() : '';
if (!oldAddr) return false;
var addr = '';
var a = bitcore.Address(oldAddr).toObject();
addr = bitcoreCash.Address.fromObject(a).toString();
// Translate address
$log.debug('address transalated to:' + addr);
popupService.showConfirm(
gettextCatalog.getString('Bitcoin cash Payment'),
gettextCatalog.getString('Payment address was translated to new Bitcoin Cash address format: ' + addr),
gettextCatalog.getString('OK'),
gettextCatalog.getString('Cancel'),
function(ret) {
if (!ret) return false;
var message = parsed.message;
var amount = parsed.amount ? parsed.amount : '';
// paypro not yet supported on cash
if (parsed.r) {
payproService.getPayProDetails(parsed.r, coin, function(err, details) {
if (err) {
if (addr && amount)
goSend(addr, amount, message, coin, shapeshiftData);
else
popupService.showAlert(gettextCatalog.getString('Error'), err);
}
handlePayPro(details, coin);
});
} else {
goSend(addr, amount, message, coin, shapeshiftData);
}
}
);
return true;
// Plain URL
} else if (/^https?:\/\//.test(data)) {
payproService.getPayProDetails(data, coin, function(err, details) {
if (err) {
if ($state.includes('tabs.scan')) {
root.showMenu({
data: data,
type: 'url'
});
}
return;
}
handlePayPro(details);
return true;
});
// Plain Address
} else if (bitcore.Address.isValid(data, 'livenet') || bitcore.Address.isValid(data, 'testnet')) {
if ($state.includes('tabs.scan')) {
root.showMenu({
data: data,
type: 'bitcoinAddress'
});
} else {
goToAmountPage(data);
}
} else if (bitcoreCash.Address.isValid(data, 'livenet')) {
if ($state.includes('tabs.scan')) {
root.showMenu({
data: data,
type: 'bitcoinAddress',
coin: 'bch',
});
} else {
goToAmountPage(data, 'bch');
}
} else if (data && data.indexOf(appConfigService.name + '://glidera') === 0) {
var code = getParameterByName('code', data);
$ionicHistory.nextViewOptions({
disableAnimate: true
});
$state.go('tabs.home', {}, {
'reload': true,
'notify': $state.current.name == 'tabs.home' ? false : true
}).then(function() {
$ionicHistory.nextViewOptions({
disableAnimate: true
});
$state.transitionTo('tabs.buyandsell.glidera', {
code: code
});
});
return true;
} else if (data && data.indexOf(appConfigService.name + '://coinbase') === 0) {
var code = getParameterByName('code', data);
$ionicHistory.nextViewOptions({
disableAnimate: true
});
$state.go('tabs.home', {}, {
'reload': true,
'notify': $state.current.name == 'tabs.home' ? false : true
}).then(function() {
$ionicHistory.nextViewOptions({
disableAnimate: true
});
$state.transitionTo('tabs.buyandsell.coinbase', {
code: code
});
});
return true;
// BitPayCard Authentication
} else if (data && data.indexOf(appConfigService.name + '://') === 0) {
// Disable BitPay Card
if (!appConfigService._enabledExtensions.debitcard) return false;
var secret = getParameterByName('secret', data);
var email = getParameterByName('email', data);
var otp = getParameterByName('otp', data);
var reason = getParameterByName('r', data);
$state.go('tabs.home', {}, {
'reload': true,
'notify': $state.current.name == 'tabs.home' ? false : true
}).then(function() {
switch (reason) {
default:
case '0':
/* For BitPay card binding */
$state.transitionTo('tabs.bitpayCardIntro', {
secret: secret,
email: email,
otp: otp
});
break;
}
});
return true;
// Join
} else if (data && data.match(/^copay:[0-9A-HJ-NP-Za-km-z]{70,80}$/)) {
$state.go('tabs.home', {}, {
'reload': true,
'notify': $state.current.name == 'tabs.home' ? false : true
}).then(function() {
$state.transitionTo('tabs.add.join', {
url: data
});
});
return true;
// Old join
} else if (data && data.match(/^[0-9A-HJ-NP-Za-km-z]{70,80}$/)) {
$state.go('tabs.home', {}, {
'reload': true,
'notify': $state.current.name == 'tabs.home' ? false : true
}).then(function() {
$state.transitionTo('tabs.add.join', {
url: data
});
});
return true;
} else if (data && (data.substring(0, 2) == '6P' || checkPrivateKey(data))) {
root.showMenu({
data: data,
type: 'privateKey'
});
} else if (data && ((data.substring(0, 2) == '1|') || (data.substring(0, 2) == '2|') || (data.substring(0, 2) == '3|'))) {
$state.go('tabs.home').then(function() {
$state.transitionTo('tabs.add.import', {
code: data
});
});
return true;
} else {
if ($state.includes('tabs.scan')) {
root.showMenu({
data: data,
type: 'text'
});
}
}
return false;
};
function goToAmountPage(toAddress, coin) {
$state.go('tabs.send', {}, {
'reload': true,
'notify': $state.current.name == 'tabs.send' ? false : true
});
$timeout(function() {
$state.transitionTo('tabs.send.amount', {
toAddress: toAddress,
coin: coin,
noPrefix: 1
});
}, 100);
}
function createBchPayProObject(payProData) {
var displayAddr = payProData.outputs[0].address;
var toAddr = bitcoinCashJsService.readAddress('bitcoincash:' + displayAddr).legacy;
return {
amount: payProData.outputs[0].amount,
caTrusted: true,
domain: 'bitpay.com',
expires: Math.floor(new Date(payProData.expires).getTime() / 1000),
memo: payProData.memo,
network: 'livenet',
requiredFeeRate: payProData.requiredFeeRate,
selfSigned: 0,
time: Math.ceil(new Date(payProData.time).getTime() / 1000),
displayAddress: displayAddr,
toAddress: toAddr,
url: payProData.paymentUrl,
verified: true
};
}
function handlePayPro(payProDetails, coin) {
var stateParams = {
toAmount: payProDetails.amount,
toAddress: payProDetails.toAddress,
description: payProDetails.memo,
paypro: payProDetails,
coin: coin,
};
// fee
if (payProDetails.requiredFeeRate) {
stateParams.requiredFeeRate = payProDetails.requiredFeeRate * 1024;
}
scannerService.pausePreview();
$state.go('tabs.send', {}, {
'reload': true,
'notify': $state.current.name == 'tabs.send' ? false : true
}).then(function() {
$timeout(function() {
$state.transitionTo('tabs.send.confirm', stateParams);
});
});
}
return root;
});

View file

@ -1,180 +0,0 @@
'use strict';
(function() {
angular
.module('bitcoincom.services')
.factory('latestReleaseService', latestReleaseService);
function latestReleaseService($log, $http, $ionicPopup, configService, externalLinkService, gettextCatalog, platformInfo) {
var service = {
// Functions
checkLatestRelease: checkLatestRelease,
requestLatestRelease: requestLatestRelease,
showUpdatePopup: showUpdatePopup
};
return service;
function checkLatestRelease(cb) {
var releaseURL = configService.getDefaults().release.url;
requestLatestRelease(releaseURL, function (err, releaseData) {
if (err) return cb(err);
var currentVersion = window.version;
var latestVersion = releaseData.tag_name;
if (!verifyTagFormat(currentVersion))
return cb('Cannot verify the format of version tag: ' + currentVersion);
if (!verifyTagFormat(latestVersion))
return cb('Cannot verify the format of latest release tag: ' + latestVersion);
var current = formatTagNumber(currentVersion);
var latest = formatTagNumber(latestVersion);
if (latest.major < current.major || (latest.major === current.major && latest.minor <= current.minor)) {
return cb(null, false);
}
var releaseSearchTerm = "";
if (platformInfo.isNW) { // XX SP: DESKTOP: Check if the latest release is already available for current OS
var platform = process.platform;
if (platform === "darwin") {
releaseSearchTerm = "osx";
} else if (platform === "win32") {
releaseSearchTerm = "win";
} else if (platform === "linux") {
releaseSearchTerm = "linux";
}
var foundNewVersion = false;
for (var i in releaseData.assets) {
if (releaseData.assets[i].name.indexOf(releaseSearchTerm) !== -1) {
foundNewVersion = true;
break;
}
}
}
$log.debug('A new version is available: ' + latestVersion);
var releaseNotes = false;
if (releaseData.body) {
var releaseLines = releaseData.body.split('\n');
for (var lineNum in releaseLines) {
if (releaseLines[lineNum].substring(0, 2) === "# ") {
releaseLines[lineNum] = "<strong>" + releaseLines[lineNum].substring(2) + "</strong>";
} else if (releaseLines[lineNum].substring(0, 2) === "- ") {
releaseLines[lineNum] = "&bull; " + releaseLines[lineNum].substring(2);
}
}
releaseNotes = releaseLines.join('\n');
}
return cb(null, {latestVersion: latestVersion, releaseNotes: releaseNotes});
});
function verifyTagFormat(tag) {
var regex = /^v?\d+\.\d+(\.\d+)?(-rc\d)?$/i;
return regex.exec(tag);
}
function formatTagNumber(tag) {
var label = false;
if (tag.split("-")[1]) { // Move postfixes like "-rc2" to a variable
label = tag.split("-")[1];
tag = tag.split("-")[0];
}
var formattedNumber = tag.replace(/^v/i, '').split('.');
return {
major: +(formattedNumber[0] ? +formattedNumber[0] : 0),
minor: +(formattedNumber[1] ? +formattedNumber[1] : 0),
patch: +(formattedNumber[2] ? +formattedNumber[2] : 0),
label: label /* XX SP: Maybe we can use this in a later stage (with for example 1.0.0-rc2 the value will be "rc2" and false if there is no label) */
};
}
}
function requestLatestRelease(releaseURL, cb) {
$log.debug('Retrieving latest release information...');
var request = {
url: releaseURL,
method: 'GET',
json: true
};
$http(request).then(function (release) {
$log.debug('Latest release: ' + release.data.name);
return cb(null, release.data);
}, function (err) {
return cb('Cannot get the release information: ' + err);
});
}
function showUpdatePopup() {
var buttons = [];
if (!platformInfo.isIOS) { // There is no GitHub-release for iPhone
buttons.push({
text: "GitHub",
type: 'button-positive',
onTap: function () {
var url = 'https://github.com/Bitcoin-com/Wallet/releases/latest';
externalLinkService.open(url, false);
}
});
}
if (platformInfo.isAndroid) {
buttons.unshift({
text: "Google Play Store",
type: 'button-positive',
onTap: function () {
var url = 'https://play.google.com/store/apps/details?id=com.bitcoin.mwallet';
externalLinkService.open(url, false);
}
});
}
if (platformInfo.isIOS) {
buttons.unshift({
text: "App Store",
type: 'button-positive',
onTap: function () {
var url = 'https://itunes.apple.com/app/id1252903728';
externalLinkService.open(url, false);
}
});
} else if (platformInfo.isNW) {
if (process.platform === 'darwin') {
buttons.unshift({
text: "Mac App Store",
type: 'button-positive',
onTap: function () {
var url = 'https://itunes.apple.com/app/bitcoin-com-wallet/id1383072453';
externalLinkService.open(url, false);
}
});
}
}
if (buttons.length === 1) { // There is only one source to download (probably on desktop, so open GitHub release page..)
buttons[0].onTap();
} else {
buttons.push({
text: gettextCatalog.getString('Go Back'),
type: 'button-positive',
onTap: function () {
return true;
}
});
$ionicPopup.show({
title: gettextCatalog.getString('Update Available'),
subTitle: gettextCatalog.getString('An update to this app is available. For your security, please update to the latest version.'),
cssClass: 'popup-update',
buttons: buttons
});
}
}
}
})();

View file

@ -0,0 +1,63 @@
'use strict';
angular.module('copayApp.services')
.factory('latestReleaseService', function latestReleaseServiceFactory($log, $http, configService) {
var root = {};
root.checkLatestRelease = function(cb) {
var releaseURL = configService.getDefaults().release.url;
requestLatestRelease(releaseURL, function(err, release) {
if (err) return cb(err);
var currentVersion = window.version;
var latestVersion = release.data.tag_name;
if (!verifyTagFormat(currentVersion))
return cb('Cannot verify the format of version tag: ' + currentVersion);
if (!verifyTagFormat(latestVersion))
return cb('Cannot verify the format of latest release tag: ' + latestVersion);
var current = formatTagNumber(currentVersion);
var latest = formatTagNumber(latestVersion);
if (latest.major < current.major || (latest.major == current.major && latest.minor <= current.minor))
return cb(null, false);
$log.debug('A new version is available: ' + latestVersion);
return cb(null, true);
});
function verifyTagFormat(tag) {
var regex = /^v?\d+\.\d+\.\d+$/i;
return regex.exec(tag);
};
function formatTagNumber(tag) {
var formattedNumber = tag.replace(/^v/i, '').split('.');
return {
major: +formattedNumber[0],
minor: +formattedNumber[1],
patch: +formattedNumber[2]
};
};
};
function requestLatestRelease(releaseURL, cb) {
$log.debug('Retrieving latest relsease information...');
var request = {
url: releaseURL,
method: 'GET',
json: true
};
$http(request).then(function(release) {
$log.debug('Latest release: ' + release.data.name);
return cb(null, release);
}, function(err) {
return cb('Cannot get the release information: ' + err);
});
};
return root;
});

View file

@ -52,7 +52,11 @@ angular.module('copayApp.services').factory('ongoingProcess', function($log, $ti
root.clear = function() {
ongoingProcess = {};
$ionicLoading.hide();
if (isCordova && !isWindowsPhoneApp) {
window.plugins.spinnerDialog.hide();
} else {
$ionicLoading.hide();
}
};
root.get = function(processName) {
@ -74,21 +78,28 @@ angular.module('copayApp.services').factory('ongoingProcess', function($log, $ti
root.onGoingProcessName = name;
var showName = $filter('translate')(processNames[name] || name);
if (root.onGoingProcessName) {
var tmpl;
if (isWindowsPhoneApp) tmpl = '<div>' + showName + '</div>';
else tmpl = '<div class="item-icon-left">' + showName + '<ion-spinner class="spinner-stable" icon="lines"></ion-spinner></div>';
$ionicLoading.show({
template: tmpl,
});
} else {
$ionicLoading.hide();
}
if (customHandler) {
customHandler(processName, showName, isOn);
}
} else if (root.onGoingProcessName) {
if (isCordova && !isWindowsPhoneApp) {
window.plugins.spinnerDialog.show(null, showName, root.clear);
} else {
var tmpl;
if (isWindowsPhoneApp) tmpl = '<div>' + showName + '</div>';
else tmpl = '<div class="item-icon-left">' + showName + '<ion-spinner class="spinner-stable" icon="lines"></ion-spinner></div>';
$ionicLoading.show({
template: tmpl
});
}
} else {
if (isCordova && !isWindowsPhoneApp) {
window.plugins.spinnerDialog.hide();
} else {
$ionicLoading.hide();
}
}
};
return root;

View file

@ -1,6 +1,6 @@
'use strict';
angular.module('copayApp.services').factory('openURLService', function($rootScope, $ionicHistory, $document, $log, $state, platformInfo, lodash, profileService, incomingDataService, appConfigService) {
angular.module('copayApp.services').factory('openURLService', function($rootScope, $ionicHistory, $document, $log, $state, platformInfo, lodash, profileService, incomingData, appConfigService) {
var root = {};
var handleOpenURL = function(args) {
@ -23,12 +23,9 @@ angular.module('copayApp.services').factory('openURLService', function($rootScop
document.addEventListener('handleopenurl', handleOpenURL, false);
incomingDataService.redir(url, function onError(err) {
if (err) {
$log.warn('Unknown URL! : ' + url);
popupService.showAlert(gettextCatalog.getString('Error'), err.message);
}
});
if (!incomingData.redir(url)) {
$log.warn('Unknown URL! : ' + url);
}
};
var handleResume = function() {

View file

@ -1,78 +0,0 @@
'use strict';
// For BIP70 Payment Protocol
angular
.module('copayApp.services')
.factory('payproService', payproService);
function payproService(gettextCatalog, $http, $log, ongoingProcess, platformInfo, profileService) {
var service = {
getPayProDetails: getPayProDetails,
getPayProDetailsViaHttp: getPayProDetailsViaHttp,
broadcastBchTx: broadcastBchTx
};
return service;
function getPayProDetails(uri, coin, cb, disableLoader) {
if (!cb) cb = function() {};
var wallet = profileService.getWallets({
onlyComplete: true,
coin: coin
})[0];
if (!wallet) return cb();
if (platformInfo.isChromeApp) {
return cb(gettextCatalog.getString('Payment Protocol not supported on Chrome App'));
}
$log.debug('Fetch PayPro Request...', uri);
if (!disableLoader) ongoingProcess.set('fetchingPayPro', true);
wallet.fetchPayPro({
payProUrl: uri,
}, function(err, paypro) {
if (!disableLoader) ongoingProcess.set('fetchingPayPro', false);
if (err) return cb(gettextCatalog.getString('Could Not Fetch Payment: Check if it is still valid'));
else if (!paypro.verified) {
$log.warn('Failed to verify payment protocol signatures');
return cb(gettextCatalog.getString('Payment Protocol Invalid'));
}
return cb(null, paypro);
});
}
function getPayProDetailsViaHttp(uri, cb) {
var config = {
headers: {'Accept': 'application/payment-request'}
};
$http.get(uri, config).then(function onGetPayProDetailsSuccess(response) {
return cb(null, response.data);
}, function onGetPayProDetailsError(error) {
return cb(error, null);
});
}
function broadcastBchTx(signedTxp, cb) {
var config = {
headers: {'Content-Type': 'application/payment'}
};
var data = {
currency: 'BCH',
transactions: [signedTxp.raw]
};
$http.post(signedTxp.payProUrl, data, config).then(function(response) {
signedTxp.response = response.data;
return cb(null, signedTxp);
}, function(error) {
return cb(error.data, null);
});
}
}

View file

@ -0,0 +1,69 @@
'use strict';
angular.module('copayApp.services').factory('payproService',
function(profileService, platformInfo, gettextCatalog, ongoingProcess, $log, $http) {
var ret = {};
ret.getPayProDetails = function(uri, coin, cb, disableLoader) {
if (!cb) cb = function() {};
var wallet = profileService.getWallets({
onlyComplete: true,
coin: coin
})[0];
if (!wallet) return cb();
if (platformInfo.isChromeApp) {
return cb(gettextCatalog.getString('Payment Protocol not supported on Chrome App'));
}
$log.debug('Fetch PayPro Request...', uri);
if (!disableLoader) ongoingProcess.set('fetchingPayPro', true);
wallet.fetchPayPro({
payProUrl: uri,
}, function(err, paypro) {
if (!disableLoader) ongoingProcess.set('fetchingPayPro', false);
if (err) return cb(gettextCatalog.getString('Could Not Fetch Payment: Check if it is still valid'));
else if (!paypro.verified) {
$log.warn('Failed to verify payment protocol signatures');
return cb(gettextCatalog.getString('Payment Protocol Invalid'));
}
return cb(null, paypro);
});
};
ret.getPayProDetailsViaHttp = function(uri, cb) {
var config = {
headers: {'Accept': 'application/payment-request'}
};
$http.get(uri, config).then(function(response) {
return cb(null, response.data);
}, function(error) {
return cb(error, null);
});
}
ret.broadcastBchTx = function(signedTxp, cb) {
var config = {
headers: {'Content-Type': 'application/payment'}
};
var data = {
currency: 'BCH',
transactions: [signedTxp.raw]
};
$http.post(signedTxp.payProUrl, data, config).then(function(response) {
signedTxp.response = response.data;
return cb(null, signedTxp);
}, function(error) {
return cb(error.data, null);
});
}
return ret;
});

View file

@ -427,9 +427,9 @@ angular.module('copayApp.services')
}, function(err, secret) {
if (err) return bwcError.cb(err, gettextCatalog.getString('Error creating wallet'), cb);
var channel = "ga";
if (platformInfo.isCordova) {
channel = "firebase";
var channel = "firebase";
if (platformInfo.isNW) {
channel = "ga";
}
var log = new window.BitAnalytics.LogEvent("wallet_created", [{
"coin": opts.coin
@ -847,13 +847,6 @@ angular.module('copayApp.services')
});
}
if (opts.hasNoFunds) {
ret = lodash.filter(ret, function(w) {
if (!w.status) return;
return (w.status.availableBalanceSat === 0);
});
}
if (opts.minAmount) {
ret = lodash.filter(ret, function(w) {
if (!w.status) return;

View file

@ -1,4 +1,4 @@
xdescribe('secureStorageService in browser', function(){
describe('secureStorageService in browser', function(){
var localStorage,
sss;
@ -100,7 +100,7 @@ xdescribe('secureStorageService in browser', function(){
});
xdescribe('secureStorageService on desktop', function(){
describe('secureStorageService on desktop', function(){
var desktopSss,
sss;
@ -202,7 +202,7 @@ xdescribe('secureStorageService on desktop', function(){
});
xdescribe('secureStorageService on mobile', function(){
describe('secureStorageService on mobile', function(){
var mobileSss,
sss;

View file

@ -1,85 +0,0 @@
'use strict';
(function(){
angular
.module('bitcoincom.services')
.factory('sendFlowRouterService', sendFlowRouterService);
function sendFlowRouterService(
sendFlowStateService
, $state, $ionicHistory, $timeout
) {
var service = {
// Functions
start: start,
goNext: goNext,
goBack: goBack,
};
return service;
/**
* Start new send flow
*/
function start() {
var state = sendFlowStateService.state;
if (state.isRequestAmount) {
$state.go('tabs.paymentRequest.amount');
} else {
if ($state.current.name != 'tabs.send') {
$state.go('tabs.home').then(function () {
$ionicHistory.clearHistory();
$state.go('tabs.send').then(function () {
$timeout(function () {
goNext();
}, 60);
});
});
} else {
goNext();
}
}
}
/**
* Go to the next page
* Routing strategy : https://bitcoindotcom.atlassian.net/wiki/x/BQDWKQ
*/
function goNext() {
var state = sendFlowStateService.state;
var needsDestination = !state.toWalletId && !state.toAddress;
var needsOrigin = !state.fromWalletId;
var needsAmount = !state.amount && !state.sendMax;
if (needsDestination) {
if (!state.isWalletTransfer && !state.thirdParty) {
$state.go('tabs.send');
return;
} else if (!needsOrigin) {
$state.go('tabs.send.destination');
return;
}
}
if (needsOrigin) {
$state.go('tabs.send.origin');
} else if (needsAmount) {
$state.go('tabs.send.amount');
} else {
$state.go('tabs.send.review');
}
}
/**
* Go to the previous page
*/
function goBack() {
$ionicHistory.goBack();
}
};
})();

View file

@ -1,142 +0,0 @@
'use strict';
(function(){
angular
.module('bitcoincom.services')
.factory('sendFlowStateService', sendFlowStateService);
function sendFlowStateService($log) {
var service = {
// Variables
state: {
amount: 0,
displayAddress: null,
fromWalletId: '',
sendMax: false,
thirdParty: null,
toAddress: '',
toWalletId: '',
coin: '',
isRequestAmount: false,
isWalletTransfer: false
},
previousStates: [],
// Functions
init: init,
clear: clear,
getClone: getClone,
map: map,
pop: pop,
push: push,
isEmpty: isEmpty
};
return service;
/**
* Init state & stack
* @param {Object} params
*/
function init(params) {
$log.debug("send-flow-state init()");
clear();
if (params) {
push(params);
}
}
/**
* Clear a state & stack
*/
function clear() {
$log.debug("send-flow-state clear()");
clearCurrent();
service.previousStates = [];
}
/**
* Clear current state only
*/
function clearCurrent() {
$log.debug("send-flow-state clearCurrent()");
service.state = {
amount: 0,
displayAddress: null,
fromWalletId: '',
sendMax: false,
thirdParty: null,
toAddress: '',
toWalletId: '',
coin: '',
isRequestAmount: false,
isWalletTransfer: false
}
}
/**
* Get a clone of the current state
*/
function getClone() {
var currentState = {};
Object.keys(service.state).forEach(function forCurrentParam(key) {
if (typeof service.state[key] !== 'function' && key !== 'previousStates') {
currentState[key] = service.state[key];
}
});
return currentState;
}
/**
* Fill in the current state from the params
* @param {Object} params
*/
function map(params) {
Object.keys(params).forEach(function forNewParam(key) {
service.state[key] = params[key];
});
}
/**
* Pop state
*/
function pop() {
$log.debug('send-flow-state pop');
if (service.previousStates.length) {
var params = service.previousStates.pop();
clearCurrent();
map(params);
} else {
clear();
}
}
/**
* Push state
* @param {Object} params
*/
function push(params) {
$log.debug('send-flow-state push');
var currentParams = getClone();
service.previousStates.push(currentParams);
clearCurrent();
map(params);
}
/**
* Is empty stack
*/
function isEmpty() {
return service.previousStates.length == 0;
}
};
})();

View file

@ -1,148 +0,0 @@
'use strict';
(function(){
angular
.module('bitcoincom.services')
.factory('sendFlowService', sendFlowService);
function sendFlowService(
sendFlowStateService, sendFlowRouterService
, bitcoinUriService, payproService, bitcoinCashJsService
, popupService, gettextCatalog
, $state, $log
) {
var service = {
// Variables
state: sendFlowStateService,
router: sendFlowRouterService,
// Functions
start: start,
goNext: goNext,
goBack: goBack
};
return service;
/**
* Start a new send flow
* @param {Object} params
* @param {Function} onError
*/
function start(params, onError) {
$log.debug('send-flow start()');
if (params && params.data) {
var res = bitcoinUriService.parse(params.data);
if (res.isValid) {
// If BIP70 (url)
if (res.url) {
var url = res.url;
var coin = res.coin || '';
payproService.getPayProDetails(url, coin, function onGetPayProDetails(err, payProData) {
if (err) {
popupService.showAlert(gettextCatalog.getString('Error'), err);
} else {
var name = payProData.domain;
// Detect some merchant that we know
if (payProData.memo.indexOf('eGifter') > -1) {
name = 'eGifter'
} else if (paymentUrl.indexOf('https://bitpay.com') > -1) {
name = 'BitPay';
}
// Init thirdParty
var thirdPartyData = {
id: 'bip70',
caTrusted: true,
name: name,
domain: payProData.domain,
expires: payProData.expires,
memo: payProData.memo,
network: 'livenet',
requiredFeeRate: payProData.requiredFeeRate,
selfSigned: 0,
time: payProData.time,
url: payProData.url,
verified: true
};
// Fill in params
params.amount = payProData.amount,
params.toAddress = payProData.toAddress,
params.coin = coin,
params.thirdParty = thirdPartyData
}
// Resolve
_next();
});
} else {
if (res.coin) {
params.coin = res.coin;
}
if (res.amountInSatoshis) {
params.amount = res.amountInSatoshis;
}
if (res.publicAddress) {
var prefix = res.isTestnet ? 'bchtest:' : 'bitcoincash:';
params.displayAddress = res.publicAddress.cashAddr || res.publicAddress.legacy || res.publicAddress.bitpay;
var formatAddress = res.publicAddress.cashAddr ? prefix + params.displayAddress : params.displayAddress;
params.toAddress = bitcoinCashJsService.readAddress(formatAddress).legacy;
}
_next();
}
} else {
if (onError) {
onError();
}
}
} else {
_next();
}
// Next used for sync the async task
function _next() {
sendFlowStateService.init(params);
// Routing strategy to -> send-flow-router.service
sendFlowRouterService.start();
}
}
/**
* Go to the next step
* @param {Object} state
*/
function goNext(state) {
$log.debug('send-flow goNext()');
// Save the current route before leaving
state.route = $state.current.name;
// Save the state and redirect the user
sendFlowStateService.push(state);
sendFlowRouterService.goNext();
}
/**
* Go to the previous step
*/
function goBack() {
$log.debug('send-flow goBack()');
// Remove the state on top and redirect the user
sendFlowStateService.pop();
sendFlowRouterService.goBack();
}
}
})();

View file

@ -1,12 +1,7 @@
'use strict'
angular.module('copayApp.services').factory('servicesService', function(configService, $log, lodash) {
var root = {};
var services = [{
name: 'shapeshift',
title: 'Shapeshift',
icon: 'icon-shapeshift',
href: 'https://shapeshift.io/'
}];
var services = [];
root.register = function(serviceInfo) {
$log.info('Adding Services entry:' + serviceInfo.name);

View file

@ -328,23 +328,18 @@ angular.module('copayApp.services').factory('shapeshiftApiService', function($q)
$scope.amount, $scope.withdrawalAddress,
$scope.coinIn, $scope.coinOut
);
console.log('shapeshiftApiService.FixedAmountTx()');
console.log(fixedTx);
SSA.FixedAmountTx(fixedTx, function (data) {
console.log(data);
promise.resolve(data);
console.log(data)
return promise.resolve({ fixedTxData : data.success });
});
return promise.promise;
},
NormalTx : function($scope){
var promise = $q.defer();
var normalTx = SSA.CreateNormalTx($scope.withdrawalAddress, $scope.coinIn, $scope.coinOut);
console.log('shapeshiftApiService.NormalTx()');
console.log(normalTx);
SSA.NormalTx(normalTx, function (data) {
console.log(data);
promise.resolve(data);
promise.resolve({ normalTxData : data });
});
return promise.promise;
},
@ -365,12 +360,11 @@ angular.module('copayApp.services').factory('shapeshiftApiService', function($q)
return promise.promise;
},
ValidateAddress : function(address, coin) {
var promise = $q.defer();
SSA.ValidateAdddress(address, coin, function onRequest(data){
console.log(data);
promise.resolve(data);
});
return promise.promise;
var promise = $q.defer();
SSA.ValidateAdddress(address, coin, function(data){
promise.resolve(data);
});
return promise.promise;
}
};
});

View file

@ -1,112 +0,0 @@
'use strict';
(function(){
angular
.module('bitcoincom.services')
.factory('shapeshiftService', shapeshiftService);
function shapeshiftService(shapeshiftApiService, gettextCatalog) {
var service = {
// Variables
coinIn: '',
coinOut: '',
withdrawalAddress: '',
returnAddress: '',
amount: '',
marketData: {},
coins: {
'BTC': {name: 'Bitcoin', symbol: 'BTC'},
'BCH': {name: 'Bitcoin Cash', symbol: 'BCH'}
},
// Functions
getMarketData: getMarketData,
shiftIt: shiftIt
};
return service;
function handleError(response, defaultMessage, cb) {
if (response && typeof response.error === "string") {
cb(new Error(response.error));
} else if (response && response.error && response.error.message) {
cb(new Error(response.error.message));
} else {
cb(new Error(defaultMessage));
}
}
function getMarketData(coinIn, coinOut, cb) {
service.coinIn = coinIn;
service.coinOut = coinOut;
shapeshiftApiService
.marketInfo(service.coinIn, service.coinOut)
.then(function (response) {
if (!response || response.error) {
handleError(response, 'Invalid response from Shapeshift', cb);
} else {
service.marketData = response;
service.rateString = service.marketData.rate.toString() + ' ' + coinOut.toUpperCase() + '/' + coinIn.toUpperCase();
cb(null, response);
}
});
}
function shiftIt(coinIn, coinOut, withdrawalAddress, returnAddress, amount, cb) {
// Test if the amount is correct depending on the min and max
if (!amount || typeof amount !== 'number') {
cb(new Error(gettextCatalog.getString('Amount is not defined')));
} else if (amount < service.marketData.minimum) {
cb(new Error(gettextCatalog.getString('Amount is below the minimun')));
} else if (amount > service.marketData.maxLimit) {
cb(new Error(gettextCatalog.getString('Amount is above the limit')));
} else {
// Init service data
service.withdrawalAddress = withdrawalAddress;
service.returnAddress = returnAddress;
service.coinIn = coinIn;
service.coinOut = coinOut;
service.amount = amount;
// Check the address
shapeshiftApiService
.ValidateAddress(withdrawalAddress, coinOut)
.then(function onSuccess(response) {
if (response && response.isvalid) {
// Prepare the transaction shapeshift side
shapeshiftApiService.NormalTx(service).then(function onResponse(response) {
// If error, return it
if (!response || response.error) {
handleError(response, gettextCatalog.getString('Invalid response from Shapeshift'), cb);
} else {
var txData = response;
// If the content is not that it was expected, get back an error
if (!txData || !txData.orderId || !txData.deposit) {
cb(new Error(gettextCatalog.getString('Invalid response from Shapeshift')));
} else {
// Get back the data
service.depositInfo = txData;
var shapeshiftData = {
coinIn: coinIn,
coinOut: coinOut,
toWalletId: service.toWalletId,
minAmount: service.marketData.minimum,
maxAmount: service.marketData.maxLimit,
orderId: txData.orderId,
toAddress: txData.deposit
};
cb(null, shapeshiftData);
}
}
});
} else {
cb(new Error(gettextCatalog.getString('Invalid address')));
}
});
}
}
}
})();

View file

@ -0,0 +1,19 @@
'use strict';
angular.module('copayApp.services').factory('shapeshiftService', function($http, $log, lodash, moment, storageService, configService, platformInfo, servicesService) {
var root = {};
var credentials = {};
var servicesItem = {
name: 'shapeshift',
title: 'Shapeshift',
icon: 'icon-shapeshift',
sref: 'tabs.shapeshift',
};
var register = function() {
servicesService.register(servicesItem);
};
register();
return root;
});

View file

@ -414,7 +414,7 @@ xdescribe('storageService on desktop', function(){
});
xdescribe('storageService on desktop using local storage', function(){
describe('storageService on desktop using local storage', function(){
var appConfig,
localStorageServiceMock,
log,
@ -614,7 +614,7 @@ xdescribe('storageService on desktop using local storage', function(){
});
xdescribe('storageService on mobile', function(){
describe('storageService on mobile', function(){
var appConfig,
expectedOldProfileSavedToSecure,
expectedOldProfileMergedWithSecure,

View file

@ -201,7 +201,7 @@ angular.module('copayApp.services').factory('txFormatService', function($filter,
var alternativeIsoCode = config.alternativeIsoCode;
// If fiat currency
if (currency && currency.toUpperCase() != 'BCH' && currency.toUpperCase() != 'BTC' && currency != 'sat') {
if (currency != 'BCH' && currency != 'BTC' && currency != 'sat') {
amountUnitStr = $filter('formatFiatAmount')(amount) + ' ' + currency;
amountSat = rateService.fromFiat(amount, currency, coin).toFixed(0);
} else if (currency == 'sat') {

View file

@ -10,7 +10,7 @@ angular.module('copayApp.services')
isoCode: 'en',
rateCode: 'USD'
}, {
name: 'Català',
name: 'català',
isoCode: 'ca',
rateCode: 'EUR'
},{
@ -59,6 +59,10 @@ angular.module('copayApp.services')
name: 'Português',
isoCode: 'pt',
rateCode: 'EUR'
}, {
name: 'русский язык',
isoCode: 'ru',
rateCode: 'RUB'
}, {
name: '한국어',
isoCode: 'ko',

View file

@ -1,275 +0,0 @@
'use strict';
(function(){
angular
.module('bitcoincom.services')
.factory('walletHistoryService', walletHistoryService);
function walletHistoryService(configService, storageService, lodash, $log, txFormatService) {
//var PAGE_SIZE = 50;
var PAGE_SIZE = 20; // For dev only
// How much to overlap on each end of the page, for mitigating inconsistent sort order.
var PAGE_OVERLAP_FRACTION = 0.2;
var PAGE_OVERLAP = Math.floor(PAGE_SIZE * PAGE_OVERLAP_FRACTION);
// The fraction of transactions in the new overlapping resultset that we already know about.
// If we know about at least this many, then there are probably no gaps.
var MIN_KNOWN_TX_OVERLAP_FRACTION = 0.5;
var SAFE_CONFIRMATIONS = 6;
var allTransactionsFetched = false;
var service = {
getCachedTxHistory: getCachedTxHistory,
updateLocalTxHistoryByPage: updateLocalTxHistoryByPage,
};
return service;
function addEarlyTransactions(walletId, cachedTxs, newTxs) {
var cachedTxIndexFromId = {};
cachedTxs.forEach(function forCachedTx(tx){
cachedTxIndexFromId[tx.txid] = true;
});
var confirmationsUpdated = false;
var someTransactionsWereNew = false;
var overlappingTxsCount = 0;
newTxs.forEach(function forNewTx(tx){
if (typeof cachedTxIndexFromId[tx.txid] === "undefined") {
someTransactionsWereNew = true;
cachedTxs.push(tx);
} else {
var txUpdated = updateCachedTx(cachedTxs, cachedTxIndexFromId, tx);
confirmationsUpdated = confirmationsUpdated || txUpdated;
overlappingTxsCount++;
}
});
var overlappingTxFraction = overlappingTxsCount / Math.min(cachedTxs.length, PAGE_OVERLAP);
console.log('overlappingTxFraction:', overlappingTxFraction);
if (overlappingTxFraction >= MIN_KNOWN_TX_OVERLAP_FRACTION) { // We are good
if (someTransactionsWereNew) {
saveTxHistory(walletId, cachedTxs);
} else if (confirmationsUpdated) {
saveTxHistory(walletId, cachedTxs);
} else if (overlappingTxsCount === newTxs.length) {
allTransactionsFetched = true;
}
return cachedTxs;
} else {
// We might be missing some txs.
console.error('We might be missing some txs in the history.');
// Our history is wrong, so remove it - we could instead, try to fetch data that was not so early.
storageService.removeTxHistory(walletId, function onRemoveTxHistory(){});
return [];
}
}
function addLatestTransactions(walletId, cachedTxs, newTxs) {
var cachedTxIndexFromId = {};
cachedTxs.forEach(function forCachedTx(tx, txIndex){
cachedTxIndexFromId[tx.txid] = txIndex;
});
var someTransactionsWereNew = false;
var confirmationsUpdated = false;
var overlappingTxsCount = 0;
var uniqueNewTxs = [];
newTxs.forEach(function forNewTx(tx){
if (typeof cachedTxIndexFromId[tx.txid] === "undefined") {
someTransactionsWereNew = true;
uniqueNewTxs.push(tx);
} else {
var txUpdated = updateCachedTx(cachedTxs, cachedTxIndexFromId, tx);
confirmationsUpdated = confirmationsUpdated || txUpdated;
overlappingTxsCount++;
}
});
var overlappingTxFraction = overlappingTxsCount / Math.min(cachedTxs.length, PAGE_OVERLAP);
if (overlappingTxFraction >= MIN_KNOWN_TX_OVERLAP_FRACTION) { // We are good
if (someTransactionsWereNew) {
var allTxs = uniqueNewTxs.concat(cachedTxs);
saveTxHistory(walletId, allTxs);
return allTxs;
} else {
if (confirmationsUpdated) {
saveTxHistory(walletId, cachedTxs);
}
return cachedTxs;
}
} else {
// We might be missing some txs.
// Our history is wrong, so just include the latest ones
saveTxHistory(walletId, newTxs);
return newTxs;
}
}
// Only clear the cache once we have received new transactions from the server.
/**
* @param wallet
* @param start
* @param {function(err, txs)} cb - transactions is always an array, may be empty
*/
function fetchTxHistoryByPage(wallet, start, cb) {
var skip = Math.max(0, start - PAGE_OVERLAP);
var limit = PAGE_SIZE;
var opts = {
skip: skip,
limit: limit
};
wallet.getTxHistory(opts, function onTxHistory(err, txsFromServer) {
if (err) {
return cb(err, []);
}
if (txsFromServer.length === 0) {
return cb(null, []);
}
var processedTxs = processNewTxs(wallet, txsFromServer);
return cb(null, processedTxs);
});
}
/**
* @param {string} walletId
* @param {function(error, txs)} cb - txs is always an array, may be empty
*/
function getCachedTxHistory(walletId, cb) {
console.log('txhistory updateLocalTxHistoryByPage()');
storageService.getTxHistory(walletId, function onGetTxHistory(err, txHistoryString){
if (err) {
return cb(err, []);
}
if (!txHistoryString) {
return cb(null, []);
}
try {
var txHistory = JSON.parse(txHistoryString);
return cb(null, txHistory);
} catch (e) {
$log.error('Failed to parse tx history.', e);
return cb(e, []);
}
});
}
function processNewTxs(wallet, txs) {
var now = Math.floor(Date.now() / 1000);
var txHistoryUnique = {};
var processedTxs = [];
wallet.hasUnsafeConfirmed = false;
lodash.each(txs, function(tx) {
tx = txFormatService.processTx(wallet.coin, tx);
// no future transactions...
if (tx.time > now)
tx.time = now;
if (tx.confirmations >= SAFE_CONFIRMATIONS) {
tx.safeConfirmed = SAFE_CONFIRMATIONS + '+';
} else {
tx.safeConfirmed = false;
wallet.hasUnsafeConfirmed = true;
}
if (tx.note) {
delete tx.note.encryptedEditedByName;
delete tx.note.encryptedBody;
}
if (!txHistoryUnique[tx.txid]) {
processedTxs.push(tx);
txHistoryUnique[tx.txid] = true;
} else {
$log.debug('Ignoring duplicate TX in history: ' + tx.txid)
}
});
return processedTxs;
}
function saveTxHistory(walletId, processedTxs) {
storageService.setTxHistory(processedTxs, walletId, function onSetTxHistory(error){
if (error) {
$log.error('pagination Failed to save tx history.', error);
}
});
}
/**
* Returns true if the cached tx was updated
* @param {*} cachedTxs
* @param {*} cachedTxIndexFromId - Indices for cachedTxs, based on txid
* @param {*} tx - The most recent tx info
*/
function updateCachedTx(cachedTxs, cachedTxIndexFromId, tx) {
var updated = false;
var txIndex = cachedTxIndexFromId[tx.txid];
var cachedTx = cachedTxs[txIndex];
if (cachedTx.confirmations < SAFE_CONFIRMATIONS && tx.confirmations > cachedTx.confirmations) {
cachedTxs[txIndex].confirmations = tx.confirmations;
updated = true;
}
return updated;
}
function updateLocalTxHistoryByPage(wallet, getLatest, flushCacheOnNew, cb) {
console.log('txhistory updaetLocalTxHistoryByPage()');
if (flushCacheOnNew) {
fetchTxHistoryByPage(wallet, 0, function onFetchTxHistory(err, txs){
if (err) {
return cb(err, txs);
}
saveTxHistory(wallet.id, txs);
return cb(null, txs);
});
} else {
getCachedTxHistory(wallet.id, function onCachedHistory(err, cachedTxs){
if (err) {
$log.error('Failed to get cached tx history.', err);
return cb(err, []);
}
var start = getLatest ? 0 : cachedTxs.length;
fetchTxHistoryByPage(wallet, start, function onFetchHistory(err, fetchedTxs){
if (err) {
return cb(err);
}
if (fetchedTxs.length === 0) {
return cb(null, cachedTxs, true /*fetchedAllTransactions*/);
}
var txs = [];
if (getLatest) {
txs = addLatestTransactions(wallet.id, cachedTxs, fetchedTxs);
} else {
allTransactionsFetched = false;
txs = addEarlyTransactions(wallet.id, cachedTxs, fetchedTxs);
return cb(null, txs, allTransactionsFetched);
}
return cb(null, txs);
});
});
}
}
}
})();

View file

@ -343,19 +343,21 @@ angular.module('copayApp.services').factory('walletService', function($log, $tim
if (err) return cb(err);
if (!txsFromServer.length)
return cb(null, []);
return cb();
return cb(null, txsFromServer);
var res = lodash.takeWhile(txsFromServer, function(tx) {
return tx.txid != endingTxid;
});
return cb(null, res, res.length >= limit);
});
};
var removeAndMarkSoftConfirmedTx = function(txs) {
return lodash.filter(txs, function(tx) {
var isConfirm = (tx.confirmations >= root.SOFT_CONFIRMATION_LIMIT);
if (!isConfirm) {
tx.recent = true;
}
return isConfirm;
if (tx.confirmations >= root.SOFT_CONFIRMATION_LIMIT)
return tx;
tx.recent = true;
});
}
@ -396,23 +398,6 @@ angular.module('copayApp.services').factory('walletService', function($log, $tim
return ret;
};
var skipped = 0;
function fixTxsUnit(txs) {
if (!txs || !txs[0] || !txs[0].amountStr) return;
var cacheCoin = txs[0].amountStr.split(' ')[1];
if (cacheCoin == 'bits') {
$log.debug('Fixing Tx Cache Unit to: ' + wallet.coin)
lodash.each(txs, function(tx) {
tx.amountStr = txFormatService.formatAmountStr(wallet.coin, tx.amount);
tx.feeStr = txFormatService.formatAmountStr(wallet.coin, tx.fees);
});
}
};
var updateLocalTxHistory = function(wallet, opts, cb) {
var FIRST_LIMIT = 5;
var LIMIT = 50;
@ -423,10 +408,25 @@ angular.module('copayApp.services').factory('walletService', function($log, $tim
var progressFn = opts.progressFn || function() {};
var foundLimitTx = false;
if (opts.feeLevels) {
opts.lowAmount = root.getLowAmount(wallet, opts.feeLevels);
}
var fixTxsUnit = function(txs) {
if (!txs || !txs[0] || !txs[0].amountStr) return;
var cacheCoin = txs[0].amountStr.split(' ')[1];
if (cacheCoin == 'bits') {
$log.debug('Fixing Tx Cache Unit to: ' + wallet.coin)
lodash.each(txs, function(tx) {
tx.amountStr = txFormatService.formatAmountStr(wallet.coin, tx.amount);
tx.feeStr = txFormatService.formatAmountStr(wallet.coin, tx.fees);
});
}
};
getSavedTxs(walletId, function(err, txsFromLocal) {
if (err) return cb(err);
@ -437,15 +437,12 @@ angular.module('copayApp.services').factory('walletService', function($log, $tim
var endingTxid = confirmedTxs[0] ? confirmedTxs[0].txid : null;
var endingTs = confirmedTxs[0] ? confirmedTxs[0].time : null;
console.log('pagination Hard confirmed TXs. Got:' + confirmedTxs.length + '/' + txsFromLocal.length);
// First update
progressFn(txsFromLocal, 0);
wallet.completeHistory = txsFromLocal;
function getNewTxs(newTxs, skip, next) {
console.log('pagination getNewTxs skip: ' + skip);
getTxsFromServer(wallet, skip, endingTxid, requestLimit, function(err, res) {
getTxsFromServer(wallet, skip, endingTxid, requestLimit, function(err, res, shouldContinue) {
if (err) {
$log.warn(bwcError.msg(err, 'Server Error')); //TODO
if (err instanceof errors.CONNECTION_ERROR || (err.message && err.message.match(/5../))) {
@ -457,29 +454,13 @@ angular.module('copayApp.services').factory('walletService', function($log, $tim
return next(err);
}
console.log('pagination Result count: ' + res.length);
// Check if new txs are founds, if yes, lets investigate in the 50 next
// To be sure we are not missing txs by sorting (maybe a new tx is after the "endingTxid"
var newDiscoveredTxs = res.filter(function (x) {
return confirmedTxs.filter(function (confX) {
return confX.txid == x.txid;
}).length == 0;
});
console.log('pagination Discovering new TXs. Got:' + newDiscoveredTxs.length);
var shouldContinue = newDiscoveredTxs.length > 0;
// If no new tx, no need to check
if (shouldContinue) {
newTxs = newTxs.concat(processNewTxs(wallet, lodash.compact(newDiscoveredTxs)));
}
newTxs = newTxs.concat(processNewTxs(wallet, lodash.compact(res)));
progressFn(newTxs.concat(txsFromLocal), newTxs.length);
skip = skip + requestLimit;
console.log('pagination Syncing TXs. Got:' + newTxs.length + ' Skip:' + skip, ' EndingTxid:', endingTxid, ' Continue:', shouldContinue);
$log.debug('Syncing TXs. Got:' + newTxs.length + ' Skip:' + skip, ' EndingTxid:', endingTxid, ' Continue:', shouldContinue);
// TODO Dirty <HACK>
// do not sync all history, just looking for a single TX.
@ -496,16 +477,14 @@ angular.module('copayApp.services').factory('walletService', function($log, $tim
}
// </HACK>
shouldContinue = false;
skipped = skip;
if (!shouldContinue) {
console.log('pagination Finished Sync: New / soft confirmed Txs: ' + newTxs.length);
$log.debug('Finished Sync: New / soft confirmed Txs: ' + newTxs.length);
return next(null, newTxs);
}
requestLimit = LIMIT;
getNewTxs(newTxs, skip, next);
});
};
@ -541,87 +520,6 @@ angular.module('copayApp.services').factory('walletService', function($log, $tim
});
}
if (opts.getMoreTxs) {
var requestLimit = LIMIT;
getNewTxs([], skipped, function(err, txs) {
if (err) return cb(err);
console.log();
createReceivedEvents(txs);
var newHistory = lodash.uniq(lodash.compact(txs.concat(confirmedTxs)), function(x) {
return x.txid;
});
function updateNotes(cb2) {
if (!endingTs) return cb2();
$log.debug('Syncing notes from: ' + endingTs);
wallet.getTxNotes({
minTs: endingTs
}, function(err, notes) {
if (err) {
$log.warn(err);
return cb2();
};
lodash.each(notes, function(note) {
$log.debug('Note for ' + note.txid);
lodash.each(newHistory, function(tx) {
if (tx.txid == note.txid) {
$log.debug('...updating note for ' + note.txid);
tx.note = note;
}
});
});
return cb2();
});
}
function updateLowAmount(txs) {
if (!opts.lowAmount) return;
lodash.each(txs, function(tx) {
tx.lowAmount = tx.amount < opts.lowAmount;
});
};
updateLowAmount(txs);
updateNotes(function() {
// <HACK>
if (foundLimitTx) {
$log.debug('Tx history read until limitTx: ' + opts.limitTx);
return cb(null, newHistory);
}
// </HACK>
var historyToSave = JSON.stringify(newHistory);
lodash.each(txs, function(tx) {
tx.recent = true;
})
$log.debug('Tx History synced. Total Txs: ' + newHistory.length);
// Final update
if (walletId == wallet.credentials.walletId) {
wallet.completeHistory = newHistory;
}
return storageService.setTxHistory(historyToSave, walletId, function() {
$log.debug('Tx History saved.');
return cb(null, newHistory);
});
});
});
return;
}
skipped = 0;
getNewTxs([], 0, function(err, txs) {
if (err) return cb(err);
@ -690,19 +588,14 @@ angular.module('copayApp.services').factory('walletService', function($log, $tim
return storageService.setTxHistory(historyToSave, walletId, function() {
$log.debug('Tx History saved.');
return cb(null, newHistory);
return cb();
});
});
});
});
};
root.getMoreTxs = function(wallet, cb) {
var opts = {};
opts.getMoreTxs = true;
updateLocalTxHistory(wallet, opts, cb);
};
root.getTxNote = function(wallet, txid, cb) {
wallet.getTxNote({
txid: txid
@ -726,6 +619,7 @@ angular.module('copayApp.services').factory('walletService', function($log, $tim
};
root.getTx = function(wallet, txid, cb) {
function finish(list) {
var tx = lodash.find(list, {
txid: txid
@ -742,6 +636,7 @@ angular.module('copayApp.services').factory('walletService', function($log, $tim
limitTx: txid
}, function(err, txHistory) {
if (err) return cb(err);
finish(txHistory);
});
}
@ -765,10 +660,16 @@ angular.module('copayApp.services').factory('walletService', function($log, $tim
root.getTxHistory = function(wallet, opts, cb) {
opts = opts || {};
var walletId = wallet.credentials.walletId;
if (!wallet.isComplete()) return cb();
// var historyIsCached = wallet.completeHistory && wallet.completeHistory.isValid;
// if (historyIsCached && !opts.force) return cb(null, wallet.completeHistory);
function isHistoryCached() {
return wallet.completeHistory && wallet.completeHistory.isValid;
};
// disable caching
//if (isHistoryCached() && !opts.force) return cb(null, wallet.completeHistory);
$log.debug('Updating Transaction History');
@ -983,7 +884,7 @@ angular.module('copayApp.services').factory('walletService', function($log, $tim
var createAddress = function(wallet, cb) {
$log.debug('Creating address for wallet:', wallet.id);
wallet.createAddress({}, function onWalletCreatedAddress(err, addr) {
wallet.createAddress({}, function(err, addr) {
if (err) {
var prefix = gettextCatalog.getString('Could not create address');
if (err instanceof errors.CONNECTION_ERROR || (err.message && err.message.match(/5../))) {
@ -1001,7 +902,6 @@ angular.module('copayApp.services').factory('walletService', function($log, $tim
if (err) return cb(err);
return cb(null, addr[0].address);
});
return;
}
return bwcError.cb(err, prefix, cb);
}

Some files were not shown because too many files have changed in this diff Show more