Compare commits
7 commits
master
...
wallet/tas
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2b5f01e45c | ||
|
|
677e653fcc | ||
|
|
abfc33a706 | ||
|
|
e1206a4f55 | ||
|
|
043fcae005 | ||
|
|
282eb6f5bb | ||
|
|
0eecaaf185 |
5 changed files with 38 additions and 10 deletions
16
Gruntfile.js
16
Gruntfile.js
|
|
@ -3,6 +3,7 @@
|
||||||
module.exports = function(grunt) {
|
module.exports = function(grunt) {
|
||||||
|
|
||||||
require('load-grunt-tasks')(grunt);
|
require('load-grunt-tasks')(grunt);
|
||||||
|
grunt.loadNpmTasks('grunt-patcher');
|
||||||
|
|
||||||
// Project Configuration
|
// Project Configuration
|
||||||
grunt.initConfig({
|
grunt.initConfig({
|
||||||
|
|
@ -266,7 +267,18 @@ module.exports = function(grunt) {
|
||||||
'bitcoin-cash-js/bitcoin-cash-js.js': ['bitcoin-cash-js/index.js']
|
'bitcoin-cash-js/bitcoin-cash-js.js': ['bitcoin-cash-js/index.js']
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
patch: {
|
||||||
|
asn1: {
|
||||||
|
options: {
|
||||||
|
patch: './patches/asn1-fix.patch'
|
||||||
|
},
|
||||||
|
files: {
|
||||||
|
'./node_modules/asn1.js-rfc5280/index.js': './node_modules/asn1.js-rfc5280/index.js'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
grunt.registerTask('default', ['nggettext_compile', 'exec:appConfig', 'exec:externalServices', 'browserify', 'sass', 'concat', 'copy:ionic_fonts', 'copy:ionic_js']);
|
grunt.registerTask('default', ['nggettext_compile', 'exec:appConfig', 'exec:externalServices', 'browserify', 'sass', 'concat', 'copy:ionic_fonts', 'copy:ionic_js']);
|
||||||
|
|
@ -287,5 +299,7 @@ module.exports = function(grunt) {
|
||||||
grunt.registerTask('android', ['exec:android']);
|
grunt.registerTask('android', ['exec:android']);
|
||||||
grunt.registerTask('android-release', ['prod', 'exec:android', 'exec:androidsign']);
|
grunt.registerTask('android-release', ['prod', 'exec:android', 'exec:androidsign']);
|
||||||
grunt.registerTask('desktopsign', ['exec:desktopsign', 'exec:desktopverify']);
|
grunt.registerTask('desktopsign', ['exec:desktopsign', 'exec:desktopverify']);
|
||||||
|
grunt.registerTask('apply-patches', ['patch:asn1']);
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
|
||||||
17
README.md
17
README.md
|
|
@ -31,7 +31,16 @@ You don't need to run npm install, run apply:bitcoincom instead
|
||||||
```sh
|
```sh
|
||||||
npm run apply:bitcoincom
|
npm run apply:bitcoincom
|
||||||
```
|
```
|
||||||
There is a bug when building the next step, you will need to go directly into one of the javascript files in node_modules
|
|
||||||
|
#### asn1.js bug
|
||||||
|
If get the following error:
|
||||||
|
```sh
|
||||||
|
» <!doctype html>
|
||||||
|
» ^
|
||||||
|
» ParseError: Unexpected token
|
||||||
|
```
|
||||||
|
|
||||||
|
You will need to go directly into one of the javascript files in node_modules
|
||||||
```sh
|
```sh
|
||||||
nano node_modules/asn1.js-rfc5280/index.js
|
nano node_modules/asn1.js-rfc5280/index.js
|
||||||
```
|
```
|
||||||
|
|
@ -39,12 +48,6 @@ Delete the whole try catch part at the top, replace it with only
|
||||||
```
|
```
|
||||||
var asn1 = require('asn1.js');
|
var asn1 = require('asn1.js');
|
||||||
```
|
```
|
||||||
If you don't do this, you will get this error:
|
|
||||||
```sh
|
|
||||||
» <!doctype html>
|
|
||||||
» ^
|
|
||||||
» ParseError: Unexpected token
|
|
||||||
```
|
|
||||||
|
|
||||||
## Testing in a Browser
|
## Testing in a Browser
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -113,7 +113,7 @@
|
||||||
"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",
|
"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: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: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",
|
"apply:bitcoincom": "npm i fs-extra && cd app-template && node apply.js bitcoincom && npm i && grunt apply-patches && cordova prepare",
|
||||||
"test": "echo \"no package tests configured\"",
|
"test": "echo \"no package tests configured\"",
|
||||||
"clean": "trash platforms && trash plugins && cordova prepare",
|
"clean": "trash platforms && trash plugins && cordova prepare",
|
||||||
"unstage-package": "git reset package.json",
|
"unstage-package": "git reset package.json",
|
||||||
|
|
@ -122,6 +122,7 @@
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"cordova": "^6.3.1",
|
"cordova": "^6.3.1",
|
||||||
"grunt": "^1.0.1",
|
"grunt": "^1.0.1",
|
||||||
|
"grunt-patcher": "^1.0.0",
|
||||||
"ionic": "^3.6.0",
|
"ionic": "^3.6.0",
|
||||||
"trash-cli": "^1.4.0",
|
"trash-cli": "^1.4.0",
|
||||||
"lodash": "^4.17.4",
|
"lodash": "^4.17.4",
|
||||||
|
|
|
||||||
|
|
@ -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",
|
"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",
|
"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: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",
|
"apply:bitcoincom": "npm i fs-extra && cd app-template && node apply.js bitcoincom && npm i && grunt apply-patches && cordova prepare",
|
||||||
"apply:bitpay": "npm i fs-extra@0.30 && cd app-template && node apply.js bitpay && cd .. && npm i",
|
"apply:bitpay": "npm i fs-extra@0.30 && cd app-template && node apply.js bitpay && cd .. && npm i",
|
||||||
"unstage-package": "git reset package.json",
|
"unstage-package": "git reset package.json",
|
||||||
"clean-all": "git clean -dfx"
|
"clean-all": "git clean -dfx"
|
||||||
|
|
|
||||||
10
patches/asn1-fix.patch
Normal file
10
patches/asn1-fix.patch
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
@@ -1,8 +1,4 @@
|
||||||
|
-try {
|
||||||
|
- var asn1 = require('asn1.js');
|
||||||
|
-} catch (e) {
|
||||||
|
- var asn1 = require('../..');
|
||||||
|
-}
|
||||||
|
+var asn1 = require('asn1.js');
|
||||||
|
|
||||||
|
/**
|
||||||
|
* RFC5280 X509 and Extension Definitions
|
||||||
Loading…
Add table
Add a link
Reference in a new issue