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

Commit

Permalink
Merge pull request #77 from StellarCN/v2.0.0
Browse files Browse the repository at this point in the history
update to V2.0.0
  • Loading branch information
imloama authored Apr 28, 2018
2 parents 6b18f57 + 47b18c6 commit ef0b272
Show file tree
Hide file tree
Showing 187 changed files with 30,643 additions and 10,338 deletions.
7 changes: 5 additions & 2 deletions .babelrc
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,19 @@
"browsers": ["> 1%", "last 2 versions", "not ie <= 8"]
}
}],
"es2015",
"stage-2"
],
"plugins": [
"transform-runtime",
"add-filehash",
["transform-imports", {
"vuetify": {
"transform": "vuetify/src/components/${member}"
"transform": "vuetify/src/components/${member}",
"preventFullImport": true
}
}]
}],
"equire"
],
"env": {
"test": {
Expand Down
51 changes: 48 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,48 @@
language: node_js
node_js:
- "node"
os: linux
language: android

android:
components:
- tools
- platform-tools
- build-tools-26.0.2
- android-26
- extra-google-m2repository
- extra-android-m2repository
licenses:
- 'android-sdk-preview-license-.+'
- 'android-sdk-license-.+'
- 'google-gdk-license-.+'

env:
global:
- JAVA_HOME=/usr/lib/jvm/java-8-oracle

before_install:
- export LANG=en_US.UTF-8

install:
- nvm install 8
- npm install -g cordova@7.1.0
- npm install

script:
- npm run build
- cordova build android

before_deploy:
- git config --local user.name "StellarCN Travis CI"
- git config --local user.email "travis@stellarcn.org"
- git tag "Debug-$(date +'%Y%m%d')-$(git log --format=%h -1)"
- cd platforms/android/build/outputs/apk/debug/
- mv android-debug.apk "firefly-debug-$(date +'%Y%m%d')-$(git log --format=%h -1).apk"

deploy:
provider: releases
file_glob: true
api_key:
secure: a6kA4zpPPxnII6cEQdnzZ7aqkjUuN3Ryuj5fBu/s8gjAhxD1l0EZoFQyLAJR6/qbpEZ1tbBeaTeAIlDOd360W/kODSdL4fGSZtTaUYM6/ykBSc+yXaFyTcj9pNMbQ2Btz16jpXQSPmS1fV12mn3+l+rD3YF1cHDOX/cNnZxo0bym/yFXmxFe5F6ftLzifP9M4qt9foE6x94xqP6R7gVpqLGv24rVfw7U2tnitziiYsqkuGW3pGFOKT0ts+0Wf3EfGlpc0TMQ3d6szAbtdq2uEuG/V5dPKB5QCx3o+HkAYPitLKWUtVBNJah/CoorFcHkVShp2DSlbCGB8/FD3uHzqXZKa4d0b3LioJn2SNauPo9G2HdW3BjhYrp5G/YAFvYjch3VWxkYIy6xWoVaKcKGoYcoFAKgsOLXvucdvXfF6QJ3h2t7WYsaAR6TqJywIRl6NMNV5Ltd1HcEQR14QgAGw8hrssVzSeCGHhUNvnxU3fGYmmWO88oW/jlhZFAhfR2hXo5kxM/RN6fxu+TcXgyCbSzc2lgkhqo2vUL1G8pjlm92yhKy+dPjaUT11V75ZAFgb9ia5NZo5DUwgT0nC8k59RL6o0hN2VdDmql9n0Urq0YqtoDmRkqhIcdWAKk4ZDj8s+Kr9uokH2Fy5krGvIKB7GlbB5F7KRd5UfwiDeZkzxU=
file: ./*.apk
skip_cleanup: true
on:
all_branches: true
40 changes: 27 additions & 13 deletions README-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,13 @@

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


## [English Document](README.md)

## [帮助文档](https://wallet.fchain.io/manual/#0)


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

## 主要功能:
* 多账户
Expand All @@ -24,13 +27,17 @@
* 扫描二维码发送资产
* 接收资产
* 信任资产
* 资产预估(XCN)
* 充值提现
* 充值
* 提现
* 历史记录查询
* 交易
* 自定义交易对
* 交易盘面
* 撤消委单
* K线图展示功能
* 交易历史
* 安全
* PIN
* 密码
Expand All @@ -39,21 +46,28 @@
* 多语言



## 构造
```
npm install -g cordova
npm install
npm run build
cordova prepare
## 开发
```
# 可以使用cnpm或yarn代替npm
### 生成APK需要用到
- android studio
- android sdk 19 +
# 需要安装cordova7.x的版本
npm i -g cordova@7.1.0
git clone https://github.com/stellarcn/firelfy.git
cd firefly
npm i
# 打包
npm run build # 生成js css等文件
npm run chcp # 生成运态更新文件
npm run cordova # 下载android和ios及相关插件
# 解压 firefly/docs/resources/android-res.zip到firefly/platforms/android/res目录
# 解压firefly/docs/resources/ios-Images.xcassets.zip到firefly/platforms/ios/firefly目录,替换Images.xcassets
# 使用android studio打开firefly/platforms/android,即可远行android项目
# 使用xcode打开firefly/platforms/ios,即可运行ios项目
```

### 生在IPA需要
- xcode


## 开源协议
Expand Down
40 changes: 28 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
# firefly wallet [![Build Status](https://travis-ci.org/StellarCN/firefly.svg)](https://travis-ci.org/StellarCN/firefly)


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


## [中文文档](README-CN.md)

## [Help Document](https://wallet.fchain.io/manual/#0)

## [RoadMap](https://github.com/StellarCN/firefly/blob/master/docs/ROADMAP.MD)
## [RoadMap](docs/ROADMAP.MD)

## Main features:
* Accounts
Expand All @@ -23,13 +27,17 @@ firefly is a mobile wallet for [Stellar](https://stellar.org) network. It suppor
* Send Asset By QRCode
* Receive Asset
* Trust
* estimation (XCN)
* Funding
* Deposite
* Withdraw
* History
* Trade
* Custom Trade Pair
* Order Book
* Cancel Trade
* Candlestick chart
* History
* Security
* PIN
* Password
Expand All @@ -38,20 +46,28 @@ firefly is a mobile wallet for [Stellar](https://stellar.org) network. It suppor
* Multi Language


## Building
```
npm install -g cordova
npm install
npm run build
cordova prepare
## Develop
```
# You can use cnpm or yarn instead of npm
### Build APK Need
- android studio
- android sdk 19 +
# firefly depend on cordova7.x
npm i -g cordova@7.1.0
### Build IPA Need
- xcode
git clone https://github.com/stellarcn/firelfy.git
cd firefly
npm i
# build
npm run build # generate js and css files
npm run chcp # generate hot code update files
npm run cordova # download android and ios plugins
# unzip firefly/docs/resources/android-res.zip to firefly/platforms/android/res
# unzip firefly/docs/resources/ios-Images.xcassets.zip to firefly/platforms/ios/firefly,replace folder Images.xcassets
# use android studio to open firefly/platforms/android, run for android
# use xcode to open firefly/platforms/ios, run for ios
```


## License
Expand Down
14 changes: 12 additions & 2 deletions build/webpack.base.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ module.exports = {
entry: {
app: './src/main.js'
},
node: {
fs: "empty"
},
output: {
path: config.build.assetsRoot,
filename: '[name].js',
Expand All @@ -27,6 +30,11 @@ module.exports = {
},
symlinks: false
},
// externals: {
// "moment": 'moment',
// "echarts": 'echarts',
// // "xml2js": 'xml2js'
// },
module: {
rules: [
{
Expand All @@ -37,7 +45,9 @@ module.exports = {
{
test: /\.js$/,
loader: 'babel-loader',
exclude: /node_modules/
exclude: /node_modules/,
//include: [ path.resolve(__dirname, "node_modules", "ed25519-hd-key")],
//exclude: [ path.resolve(__dirname, "node_modules")],
},
{
test: /\.json$/,
Expand Down Expand Up @@ -67,7 +77,7 @@ module.exports = {
loaders: [
{
test: /\.styl$/,
loaders: ['style-loader','css-loader', 'stylus-loader']
loaders: ['style-loader', 'stylus-loader', { loader: 'css-loader', options: { minimize: true } }]
}
]
}
Expand Down
6 changes: 5 additions & 1 deletion build/webpack.dev.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ module.exports = merge(baseWebpackConfig, {
},
// cheap-module-eval-source-map is faster for development
devtool: '#cheap-module-eval-source-map',
devServer: {
hot: true
},
plugins: [
new webpack.DefinePlugin({
'process.env': config.dev.env
Expand All @@ -30,6 +33,7 @@ module.exports = merge(baseWebpackConfig, {
template: 'index.html',
inject: true
}),
new FriendlyErrorsPlugin()
new FriendlyErrorsPlugin(),
new webpack.NamedModulesPlugin()
]
})
32 changes: 21 additions & 11 deletions build/webpack.prod.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,20 @@ var webpackConfig = merge(baseWebpackConfig, {
new webpack.DefinePlugin({
'process.env': env
}),
//new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/),
//new webpack.ContextReplacementPlugin(/moment[\/\\]locale$/, /zh-cn|en/),
new webpack.ContextReplacementPlugin(/moment[\/\\]locale$/, /zh-cn|zh-hk|zh-tw/),
new webpack.LoaderOptionsPlugin({
minimize: true,
debug: false
}),
new webpack.optimize.UglifyJsPlugin({
compress: {
warnings: false
warnings: false,
drop_console: true,
pure_funcs: ['console.log']
},
sourceMap: true
sourceMap: false
}),
// extract css into its own file
new ExtractTextPlugin({
Expand Down Expand Up @@ -71,20 +80,21 @@ var webpackConfig = merge(baseWebpackConfig, {
minChunks: function (module, count) {
// any required modules inside node_modules are extracted to vendor
return (
module.resource &&
/\.js$/.test(module.resource) &&
module.resource.indexOf(
path.join(__dirname, '../node_modules')
) === 0
module.resource && ((
/\.js$/.test(module.resource) &&
module.resource.indexOf(
path.join(__dirname, '../node_modules')
) === 0
)||(module.resource.indexOf('awesome-qr.js') >= 0))
)
}
}),
// extract webpack runtime and module manifest to its own file in order to
// prevent vendor hash from being updated whenever app bundle is updated
new webpack.optimize.CommonsChunkPlugin({
name: 'manifest',
chunks: ['vendor']
}),
// new webpack.optimize.CommonsChunkPlugin({
// name: 'manifest',
// chunks: ['vendor']
// }),
// copy custom static assets
new CopyWebpackPlugin([
{
Expand Down
24 changes: 21 additions & 3 deletions config.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version='1.0' encoding='utf-8'?>
<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">
<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">
<name>firefly</name>
<description>
stellar wallet
Expand Down Expand Up @@ -37,6 +37,14 @@
</platform>
<platform name="browser">
</platform>
<feature name="CDVWKWebViewEngine">
<param name="ios-package" value="CDVWKWebViewEngine" />
</feature>
<feature name="SocialSharing">
<param name="ios-package" value="SocialSharing" />
<param name="android-package" value="nl.xservices.plugins.SocialSharing" />
</feature>
<preference name="CordovaWebViewEngine" value="CDVWKWebViewEngine" />
<preference name="BackgroundColor" value="#212122" />
<preference name="DisallowOverscroll" value="true" />
<preference name="EnableViewportScale" value="true" />
Expand All @@ -51,18 +59,28 @@
<preference name="SplashScreenBackgroundColor" value="#21ce90" />
<preference name="SplashMaintainAspectRatio" value="true" />
<preference name="ShowSplashScreen" value="true" />
<chcp>
<auto-download enabled="false" />
<auto-install enabled="false" />
<config-file url="https://update.fchain.io/v2/chcp.json" />
</chcp>
<engine name="browser" spec="^5.0.1" />
<engine name="android" spec="^6.2.3" />
<engine name="ios" spec="^4.5.4" />
<plugin name="cordova-plugin-device" spec="^1.1.7" />
<plugin name="cordova-plugin-whitelist" spec="1" />
<plugin name="cordova-plugin-whitelist" spec="^1" />
<plugin name="cordova-plugin-qrscanner" spec="^2.5.0" />
<plugin name="cordova-plugin-splashscreen" spec="^4.1.0" />
<plugin name="cordova-plugin-statusbar" spec="^2.3.0" />
<plugin name="cordova-clipboard" spec="^1.1.1" />
<plugin name="cordova-plugin-camera" spec="^2.4.1" />
<plugin name="cordova-sqlite-storage" spec="^2.1.2" />
<plugin name="cordova-disable-http-cache" spec="^1.0.0" />
<plugin name="cordova-plugin-inappbrowser" spec="^1.7.2" />
<plugin name="cordova-plugin-globalization" spec="^1.0.9" />
<plugin name="cordova-plugin-screen-orientation" spec="^3.0.1" />
<plugin name="cordova-plugin-wkwebview-engine" spec="git+https://github.com/apache/cordova-plugin-wkwebview-engine.git" />
<plugin name="cordova-plugin-advanced-http" spec="^1.11.1" />
<plugin name="cordova-hot-code-push-plugin" spec="^1.5.3" />
<plugin name="cordova-plugin-x-socialsharing" spec="^5.3.2" />
<plugin name="cordova-plugin-themeablebrowser" spec="git+https://github.com/imloama/cordova-plugin-themeablebrowser.git" />
</widget>
Loading

0 comments on commit ef0b272

Please sign in to comment.