Skip to content
This repository was archived by the owner on Feb 25, 2019. It is now read-only.

Commit ef0b272

Browse files
authored
Merge pull request #77 from StellarCN/v2.0.0
update to V2.0.0
2 parents 6b18f57 + 47b18c6 commit ef0b272

File tree

187 files changed

+30643
-10338
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

187 files changed

+30643
-10338
lines changed

.babelrc

+5-2
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,19 @@
66
"browsers": ["> 1%", "last 2 versions", "not ie <= 8"]
77
}
88
}],
9+
"es2015",
910
"stage-2"
1011
],
1112
"plugins": [
1213
"transform-runtime",
1314
"add-filehash",
1415
["transform-imports", {
1516
"vuetify": {
16-
"transform": "vuetify/src/components/${member}"
17+
"transform": "vuetify/src/components/${member}",
18+
"preventFullImport": true
1719
}
18-
}]
20+
}],
21+
"equire"
1922
],
2023
"env": {
2124
"test": {

.travis.yml

+48-3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,48 @@
1-
language: node_js
2-
node_js:
3-
- "node"
1+
os: linux
2+
language: android
3+
4+
android:
5+
components:
6+
- tools
7+
- platform-tools
8+
- build-tools-26.0.2
9+
- android-26
10+
- extra-google-m2repository
11+
- extra-android-m2repository
12+
licenses:
13+
- 'android-sdk-preview-license-.+'
14+
- 'android-sdk-license-.+'
15+
- 'google-gdk-license-.+'
16+
17+
env:
18+
global:
19+
- JAVA_HOME=/usr/lib/jvm/java-8-oracle
20+
21+
before_install:
22+
- export LANG=en_US.UTF-8
23+
24+
install:
25+
- nvm install 8
26+
- npm install -g [email protected]
27+
- npm install
28+
29+
script:
30+
- npm run build
31+
- cordova build android
32+
33+
before_deploy:
34+
- git config --local user.name "StellarCN Travis CI"
35+
- git config --local user.email "[email protected]"
36+
- git tag "Debug-$(date +'%Y%m%d')-$(git log --format=%h -1)"
37+
- cd platforms/android/build/outputs/apk/debug/
38+
- mv android-debug.apk "firefly-debug-$(date +'%Y%m%d')-$(git log --format=%h -1).apk"
39+
40+
deploy:
41+
provider: releases
42+
file_glob: true
43+
api_key:
44+
secure: a6kA4zpPPxnII6cEQdnzZ7aqkjUuN3Ryuj5fBu/s8gjAhxD1l0EZoFQyLAJR6/qbpEZ1tbBeaTeAIlDOd360W/kODSdL4fGSZtTaUYM6/ykBSc+yXaFyTcj9pNMbQ2Btz16jpXQSPmS1fV12mn3+l+rD3YF1cHDOX/cNnZxo0bym/yFXmxFe5F6ftLzifP9M4qt9foE6x94xqP6R7gVpqLGv24rVfw7U2tnitziiYsqkuGW3pGFOKT0ts+0Wf3EfGlpc0TMQ3d6szAbtdq2uEuG/V5dPKB5QCx3o+HkAYPitLKWUtVBNJah/CoorFcHkVShp2DSlbCGB8/FD3uHzqXZKa4d0b3LioJn2SNauPo9G2HdW3BjhYrp5G/YAFvYjch3VWxkYIy6xWoVaKcKGoYcoFAKgsOLXvucdvXfF6QJ3h2t7WYsaAR6TqJywIRl6NMNV5Ltd1HcEQR14QgAGw8hrssVzSeCGHhUNvnxU3fGYmmWO88oW/jlhZFAhfR2hXo5kxM/RN6fxu+TcXgyCbSzc2lgkhqo2vUL1G8pjlm92yhKy+dPjaUT11V75ZAFgb9ia5NZo5DUwgT0nC8k59RL6o0hN2VdDmql9n0Urq0YqtoDmRkqhIcdWAKk4ZDj8s+Kr9uokH2Fy5krGvIKB7GlbB5F7KRd5UfwiDeZkzxU=
45+
file: ./*.apk
46+
skip_cleanup: true
47+
on:
48+
all_branches: true

README-CN.md

+27-13
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,13 @@
22

33
萤火钱包是[恒星网络](https://stellar.org)的手机钱包,支持安卓和IOS平台
44

5+
6+
## [English Document](README.md)
7+
58
## [帮助文档](https://wallet.fchain.io/manual/#0)
69

710

8-
## [路线图](https://github.com/StellarCN/firefly/blob/master/docs/ROADMAP_CN.MD)
11+
## [路线图](docs/ROADMAP_CN.MD)
912

1013
## 主要功能:
1114
* 多账户
@@ -24,13 +27,17 @@
2427
* 扫描二维码发送资产
2528
* 接收资产
2629
* 信任资产
30+
* 资产预估(XCN)
2731
* 充值提现
2832
* 充值
2933
* 提现
34+
* 历史记录查询
3035
* 交易
3136
* 自定义交易对
3237
* 交易盘面
3338
* 撤消委单
39+
* K线图展示功能
40+
* 交易历史
3441
* 安全
3542
* PIN
3643
* 密码
@@ -39,21 +46,28 @@
3946
* 多语言
4047

4148

42-
43-
## 构造
44-
```
45-
npm install -g cordova
46-
npm install
47-
npm run build
48-
cordova prepare
49+
## 开发
4950
```
51+
# 可以使用cnpm或yarn代替npm
5052
51-
### 生成APK需要用到
52-
- android studio
53-
- android sdk 19 +
53+
# 需要安装cordova7.x的版本
54+
55+
git clone https://github.com/stellarcn/firelfy.git
56+
cd firefly
57+
npm i
58+
# 打包
59+
npm run build # 生成js css等文件
60+
npm run chcp # 生成运态更新文件
61+
npm run cordova # 下载android和ios及相关插件
62+
# 解压 firefly/docs/resources/android-res.zip到firefly/platforms/android/res目录
63+
# 解压firefly/docs/resources/ios-Images.xcassets.zip到firefly/platforms/ios/firefly目录,替换Images.xcassets
64+
65+
# 使用android studio打开firefly/platforms/android,即可远行android项目
66+
67+
# 使用xcode打开firefly/platforms/ios,即可运行ios项目
68+
69+
```
5470

55-
### 生在IPA需要
56-
- xcode
5771

5872

5973
## 开源协议

README.md

+28-12
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
# firefly wallet [![Build Status](https://travis-ci.org/StellarCN/firefly.svg)](https://travis-ci.org/StellarCN/firefly)
22

3+
34
firefly is a mobile wallet for [Stellar](https://stellar.org) network. It supports android and ios platforms
45

6+
7+
## [中文文档](README-CN.md)
8+
59
## [Help Document](https://wallet.fchain.io/manual/#0)
610

7-
## [RoadMap](https://github.com/StellarCN/firefly/blob/master/docs/ROADMAP.MD)
11+
## [RoadMap](docs/ROADMAP.MD)
812

913
## Main features:
1014
* Accounts
@@ -23,13 +27,17 @@ firefly is a mobile wallet for [Stellar](https://stellar.org) network. It suppor
2327
* Send Asset By QRCode
2428
* Receive Asset
2529
* Trust
30+
* estimation (XCN)
2631
* Funding
2732
* Deposite
2833
* Withdraw
34+
* History
2935
* Trade
3036
* Custom Trade Pair
3137
* Order Book
3238
* Cancel Trade
39+
* Candlestick chart
40+
* History
3341
* Security
3442
* PIN
3543
* Password
@@ -38,20 +46,28 @@ firefly is a mobile wallet for [Stellar](https://stellar.org) network. It suppor
3846
* Multi Language
3947

4048

41-
## Building
42-
```
43-
npm install -g cordova
44-
npm install
45-
npm run build
46-
cordova prepare
49+
## Develop
4750
```
51+
# You can use cnpm or yarn instead of npm
4852
49-
### Build APK Need
50-
- android studio
51-
- android sdk 19 +
53+
# firefly depend on cordova7.x
54+
5255
53-
### Build IPA Need
54-
- xcode
56+
git clone https://github.com/stellarcn/firelfy.git
57+
cd firefly
58+
npm i
59+
# build
60+
npm run build # generate js and css files
61+
npm run chcp # generate hot code update files
62+
npm run cordova # download android and ios plugins
63+
# unzip firefly/docs/resources/android-res.zip to firefly/platforms/android/res
64+
# unzip firefly/docs/resources/ios-Images.xcassets.zip to firefly/platforms/ios/firefly,replace folder Images.xcassets
65+
66+
# use android studio to open firefly/platforms/android, run for android
67+
68+
# use xcode to open firefly/platforms/ios, run for ios
69+
70+
```
5571

5672

5773
## License

build/webpack.base.conf.js

+12-2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ module.exports = {
1212
entry: {
1313
app: './src/main.js'
1414
},
15+
node: {
16+
fs: "empty"
17+
},
1518
output: {
1619
path: config.build.assetsRoot,
1720
filename: '[name].js',
@@ -27,6 +30,11 @@ module.exports = {
2730
},
2831
symlinks: false
2932
},
33+
// externals: {
34+
// "moment": 'moment',
35+
// "echarts": 'echarts',
36+
// // "xml2js": 'xml2js'
37+
// },
3038
module: {
3139
rules: [
3240
{
@@ -37,7 +45,9 @@ module.exports = {
3745
{
3846
test: /\.js$/,
3947
loader: 'babel-loader',
40-
exclude: /node_modules/
48+
exclude: /node_modules/,
49+
//include: [ path.resolve(__dirname, "node_modules", "ed25519-hd-key")],
50+
//exclude: [ path.resolve(__dirname, "node_modules")],
4151
},
4252
{
4353
test: /\.json$/,
@@ -67,7 +77,7 @@ module.exports = {
6777
loaders: [
6878
{
6979
test: /\.styl$/,
70-
loaders: ['style-loader','css-loader', 'stylus-loader']
80+
loaders: ['style-loader', 'stylus-loader', { loader: 'css-loader', options: { minimize: true } }]
7181
}
7282
]
7383
}

build/webpack.dev.conf.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ module.exports = merge(baseWebpackConfig, {
1717
},
1818
// cheap-module-eval-source-map is faster for development
1919
devtool: '#cheap-module-eval-source-map',
20+
devServer: {
21+
hot: true
22+
},
2023
plugins: [
2124
new webpack.DefinePlugin({
2225
'process.env': config.dev.env
@@ -30,6 +33,7 @@ module.exports = merge(baseWebpackConfig, {
3033
template: 'index.html',
3134
inject: true
3235
}),
33-
new FriendlyErrorsPlugin()
36+
new FriendlyErrorsPlugin(),
37+
new webpack.NamedModulesPlugin()
3438
]
3539
})

build/webpack.prod.conf.js

+21-11
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,20 @@ var webpackConfig = merge(baseWebpackConfig, {
2929
new webpack.DefinePlugin({
3030
'process.env': env
3131
}),
32+
//new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/),
33+
//new webpack.ContextReplacementPlugin(/moment[\/\\]locale$/, /zh-cn|en/),
34+
new webpack.ContextReplacementPlugin(/moment[\/\\]locale$/, /zh-cn|zh-hk|zh-tw/),
35+
new webpack.LoaderOptionsPlugin({
36+
minimize: true,
37+
debug: false
38+
}),
3239
new webpack.optimize.UglifyJsPlugin({
3340
compress: {
34-
warnings: false
41+
warnings: false,
42+
drop_console: true,
43+
pure_funcs: ['console.log']
3544
},
36-
sourceMap: true
45+
sourceMap: false
3746
}),
3847
// extract css into its own file
3948
new ExtractTextPlugin({
@@ -71,20 +80,21 @@ var webpackConfig = merge(baseWebpackConfig, {
7180
minChunks: function (module, count) {
7281
// any required modules inside node_modules are extracted to vendor
7382
return (
74-
module.resource &&
75-
/\.js$/.test(module.resource) &&
76-
module.resource.indexOf(
77-
path.join(__dirname, '../node_modules')
78-
) === 0
83+
module.resource && ((
84+
/\.js$/.test(module.resource) &&
85+
module.resource.indexOf(
86+
path.join(__dirname, '../node_modules')
87+
) === 0
88+
)||(module.resource.indexOf('awesome-qr.js') >= 0))
7989
)
8090
}
8191
}),
8292
// extract webpack runtime and module manifest to its own file in order to
8393
// prevent vendor hash from being updated whenever app bundle is updated
84-
new webpack.optimize.CommonsChunkPlugin({
85-
name: 'manifest',
86-
chunks: ['vendor']
87-
}),
94+
// new webpack.optimize.CommonsChunkPlugin({
95+
// name: 'manifest',
96+
// chunks: ['vendor']
97+
// }),
8898
// copy custom static assets
8999
new CopyWebpackPlugin([
90100
{

config.xml

+21-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version='1.0' encoding='utf-8'?>
2-
<widget id="com.github.stellarcn.firefly" version="1.2.5" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
2+
<widget id="com.github.stellarcn.firefly" version="2.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
33
<name>firefly</name>
44
<description>
55
stellar wallet
@@ -37,6 +37,14 @@
3737
</platform>
3838
<platform name="browser">
3939
</platform>
40+
<feature name="CDVWKWebViewEngine">
41+
<param name="ios-package" value="CDVWKWebViewEngine" />
42+
</feature>
43+
<feature name="SocialSharing">
44+
<param name="ios-package" value="SocialSharing" />
45+
<param name="android-package" value="nl.xservices.plugins.SocialSharing" />
46+
</feature>
47+
<preference name="CordovaWebViewEngine" value="CDVWKWebViewEngine" />
4048
<preference name="BackgroundColor" value="#212122" />
4149
<preference name="DisallowOverscroll" value="true" />
4250
<preference name="EnableViewportScale" value="true" />
@@ -51,18 +59,28 @@
5159
<preference name="SplashScreenBackgroundColor" value="#21ce90" />
5260
<preference name="SplashMaintainAspectRatio" value="true" />
5361
<preference name="ShowSplashScreen" value="true" />
62+
<chcp>
63+
<auto-download enabled="false" />
64+
<auto-install enabled="false" />
65+
<config-file url="https://update.fchain.io/v2/chcp.json" />
66+
</chcp>
5467
<engine name="browser" spec="^5.0.1" />
5568
<engine name="android" spec="^6.2.3" />
5669
<engine name="ios" spec="^4.5.4" />
5770
<plugin name="cordova-plugin-device" spec="^1.1.7" />
58-
<plugin name="cordova-plugin-whitelist" spec="1" />
71+
<plugin name="cordova-plugin-whitelist" spec="^1" />
5972
<plugin name="cordova-plugin-qrscanner" spec="^2.5.0" />
6073
<plugin name="cordova-plugin-splashscreen" spec="^4.1.0" />
6174
<plugin name="cordova-plugin-statusbar" spec="^2.3.0" />
6275
<plugin name="cordova-clipboard" spec="^1.1.1" />
6376
<plugin name="cordova-plugin-camera" spec="^2.4.1" />
6477
<plugin name="cordova-sqlite-storage" spec="^2.1.2" />
65-
<plugin name="cordova-disable-http-cache" spec="^1.0.0" />
6678
<plugin name="cordova-plugin-inappbrowser" spec="^1.7.2" />
6779
<plugin name="cordova-plugin-globalization" spec="^1.0.9" />
80+
<plugin name="cordova-plugin-screen-orientation" spec="^3.0.1" />
81+
<plugin name="cordova-plugin-wkwebview-engine" spec="git+https://github.com/apache/cordova-plugin-wkwebview-engine.git" />
82+
<plugin name="cordova-plugin-advanced-http" spec="^1.11.1" />
83+
<plugin name="cordova-hot-code-push-plugin" spec="^1.5.3" />
84+
<plugin name="cordova-plugin-x-socialsharing" spec="^5.3.2" />
85+
<plugin name="cordova-plugin-themeablebrowser" spec="git+https://github.com/imloama/cordova-plugin-themeablebrowser.git" />
6886
</widget>

0 commit comments

Comments
 (0)