Skip to content

Commit

Permalink
Merge v2
Browse files Browse the repository at this point in the history
  • Loading branch information
Janaka-Steph committed Aug 25, 2023
1 parent d2ca59a commit 4698a2a
Show file tree
Hide file tree
Showing 218 changed files with 21,607 additions and 9,683 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ android/app/debug/output-metadata.json

# fastlane
report.xml
.env.default

#icons
resources/android/icon
Expand Down
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
src/api-spec
30 changes: 20 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

📱 Mobile app for making trades on TDEX


# Table of Contents

1. [Install](#install)
2. [Development](#development)
3. [Release](#release)
Expand All @@ -14,11 +14,18 @@
* Download Android from [Play Store](https://play.google.com/store/apps/details?id=io.sevenlabs.app) or install
the [APK from Github Releases](https://github.com/tdex-network/tdex-app/releases)


## Development

Below is a list of commands you will probably find useful for development.

### Expose ElectrumX endpoints through websocket

For now Nigiri doesn't support websocket connections to ElectrumX. But you can use

```sh
$ docker run --net=nigiri -d -p 1234:1234 ghcr.io/vi/websocat:0.11.0 -b ws-l:0.0.0.0:1234 tcp:electrs-liquid:50001
```

### `yarn serve`

Runs the project in development/watch mode in the browser. Your project will be rebuilt upon changes.
Expand Down Expand Up @@ -91,6 +98,7 @@ $ yarn tdex:clean
* Change elements configuration by
adding `fedpegscript=51210269e0180bc9e0be7648d6e9c17f3664bc3ebcee40f3a46cf4b42e583e96b911b951ae` and
commenting `initialfreecoins=2100000000000000`
Otherwise you should get error `{"code":-26,"message":"pegin-no-witness,nopeg-inwitnessattached"}`

* Change LBTC_ASSET[network].assetHash in `./src/utils/constants.ts`
to `056293ee681516f2d61bb7ce63030351d5e02d61aef9fb00d30f27f55d935b18`
Expand All @@ -116,21 +124,23 @@ $ ./script/pegin.sh
### Internal testing

For internal releases (Testflight or debug APK):

- iOS: build on local machine with fastlane and upload to TestFlight
- `yarn build:ios`
- `fastlane ios beta` (this will increment build number only)
- `yarn build:ios`
- `fastlane ios beta` (this will increment build number only)
- Android: APK build on local machine with fastlane
- `yarn build:android`
- `fastlane android apk`
- `yarn build:android`
- `fastlane android apk`

### Stores

To release to stores:

- run [tag.sh](./scripts/tag.sh) to make a new git tag, increments iOS & Android projects and push it to master
- iOS: build on local machine with fastlane and upload to AppStore
- `yarn build:ios`
- `fastlane ios prod`
- `yarn build:ios`
- `fastlane ios prod`
- Android: APK build on local machine with fastlane
- `yarn build:android`
- `fastlane android prod`
- `yarn build:android`
- `fastlane android prod`
- The git tag will trigger `release.yml` to create a Github Release.
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ android {
applicationId "io.sevenlabs.app"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 14
versionName "1.2.8"
versionCode 17
versionName "1.3.1"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
Expand Down
10 changes: 10 additions & 0 deletions buf.gen.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: v1
plugins:
- plugin: buf.build/community/timostamm-protobuf-ts
out: src/api-spec/protobuf/gen/js
opt:
- add_pb_suffix
- eslint_disable
- ts_nocheck
- long_type_string
- output_javascript
2 changes: 1 addition & 1 deletion fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ end

desc 'Various checks for git branch'
lane :git_check do
ensure_git_branch
ensure_git_branch(branch: 'master')
ensure_git_status_clean
git_pull
end
4 changes: 2 additions & 2 deletions ios/App/App.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 81;
CURRENT_PROJECT_VERSION = 99;
DEVELOPMENT_TEAM = 5G3423SYA4;
INFOPLIST_FILE = App/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
Expand All @@ -379,7 +379,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_IDENTITY = "iPhone Distribution";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 81;
CURRENT_PROJECT_VERSION = 99;
DEVELOPMENT_TEAM = 5G3423SYA4;
INFOPLIST_FILE = App/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
4 changes: 2 additions & 2 deletions ios/App/App/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.2.8</string>
<string>2.0.0</string>
<key>CFBundleURLTypes</key>
<array>
<dict>
Expand All @@ -30,7 +30,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>81</string>
<string>99</string>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
<key>LSRequiresIPhoneOS</key>
Expand Down
107 changes: 56 additions & 51 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "tdex-app",
"version": "1.2.8",
"version": "2.0.0",
"private": true,
"description": "Mobile app for making trades on TDEX",
"browserslist": {
Expand Down Expand Up @@ -65,9 +65,16 @@
"scripts": {
"android": "ionic capacitor run android",
"android:serve": "ionic capacitor run android -l --external",
"android:serve-prod": "NODE_ENV=production ionic capacitor run android --external --prod --debug",
"build": "ionic build",
"build:android": "ionic capacitor build android --no-open",
"build:ios": "ionic capacitor build ios --no-open",
"build:proto": "buf generate buf.build/tdex-network/tdex-protobuf",
"build:trade-swagger-v1": "npx swagger-typescript-api -p https://raw.githubusercontent.com/tdex-network/tdex-protobuf/v1/api-spec/openapi/swagger/tdex/v1/trade.swagger.json -o src/api-spec/openapi/swagger/v1/trade --axios --modular",
"build:transport-swagger-v1": "npx swagger-typescript-api -p https://raw.githubusercontent.com/tdex-network/tdex-protobuf/v1/api-spec/openapi/swagger/tdex/v1/transport.swagger.json -o src/api-spec/openapi/swagger/v1/transport --axios --modular",
"build:trade-swagger-v2": "npx swagger-typescript-api -p https://raw.githubusercontent.com/tdex-network/tdex-protobuf/v1/api-spec/openapi/swagger/tdex/v2/trade.swagger.json -o src/api-spec/openapi/swagger/v2/trade --axios --modular",
"build:transport-swagger-v2": "npx swagger-typescript-api -p https://raw.githubusercontent.com/tdex-network/tdex-protobuf/v1/api-spec/openapi/swagger/tdex/v2/transport.swagger.json -o src/api-spec/openapi/swagger/v2/transport --axios --modular",
"build:swagger": "yarn build:transport-swagger-v1 && yarn build:trade-swagger-v1 && yarn build:transport-swagger-v2 && yarn build:trade-swagger-v2",
"bump": "fastlane bump",
"e2e": "yarn playwright test",
"eslint": "eslint \"./src/**/*.{ts,tsx}\" \"./test/**/*.{ts,tsx}\"",
Expand All @@ -81,7 +88,7 @@
"prettier": "prettier \"./src/**/*.{ts,tsx}\" \"./test/**/*.{ts,tsx}\"",
"resources": "cordova-res ios --skip-config --copy && cordova-res android --skip-config --copy",
"serve": "ionic serve",
"serve:testnet": "REACT_APP_CHAIN=testnet ionic serve",
"serve:testnet": "REACT_APP_CHAIN=testnet ionic serve -p 8100",
"serve:no-open": "ionic serve --no-open",
"sync": "ionic cap sync",
"tdex:clean": "bash scripts/tdexd-clean.sh",
Expand All @@ -92,86 +99,84 @@
"test": "craco test"
},
"dependencies": {
"@awesome-cordova-plugins/clipboard": "^5.44.0",
"@awesome-cordova-plugins/core": "5.44.0",
"@awesome-cordova-plugins/screen-orientation": "5.44.0",
"@capacitor-community/barcode-scanner": "^3.0.0",
"@awesome-cordova-plugins/clipboard": "^5.46.0",
"@awesome-cordova-plugins/core": "5.46.0",
"@awesome-cordova-plugins/screen-orientation": "5.46.0",
"@capacitor-community/barcode-scanner": "^3.0.3",
"@capacitor-community/react-hooks": "^0.0.11",
"@capacitor/android": "^4.1.0",
"@capacitor/app": "^4.0.1",
"@capacitor/core": "^4.1.0",
"@capacitor/device": "^4.0.1",
"@capacitor/ios": "^4.1.0",
"@capacitor/keyboard": "^4.0.1",
"@capacitor/preferences": "^4.0.1",
"@capacitor/splash-screen": "^4.0.1",
"@capacitor/status-bar": "^4.0.1",
"@capacitor/android": "^4.8.1",
"@capacitor/app": "^4.1.1",
"@capacitor/core": "^4.8.0",
"@capacitor/device": "^4.1.0",
"@capacitor/ios": "^4.7.3",
"@capacitor/keyboard": "^4.1.1",
"@capacitor/preferences": "^4.0.2",
"@capacitor/splash-screen": "^4.2.0",
"@capacitor/status-bar": "^4.1.1",
"@cheprasov/react-qrcode": "^1.0.1",
"@ionic/react": "^6.2.4",
"@ionic/react-router": "^6.2.4",
"@ionic/react": "^6.7.4",
"@ionic/react-router": "^6.7.4",
"@protobuf-ts/grpcweb-transport": "^2.9.0",
"@protobuf-ts/runtime": "^2.9.0",
"@protobuf-ts/runtime-rpc": "^2.9.0",
"@types/lodash.merge": "^4.6.7",
"@vulpemventures/secp256k1-zkp": "^2.1.1",
"@vulpemventures/secp256k1-zkp": "3.1.0",
"antd-css-utilities": "^1.0.3",
"axios": "^0.27.2",
"bip32": "^3.1.0",
"bitcoinjs-lib": "^6.0.2",
"bip39": "^3.1.0",
"bitcoinjs-lib": "6.1.3",
"buffer": "^6.0.3",
"buffer-json": "^2.0.0",
"classnames": "^2.3.1",
"classnames": "^2.3.2",
"coinselect": "^3.1.13",
"cordova-clipboard": "^1.3.0",
"crypto-browserify": "^3.12.0",
"decimal.js": "^10.3.1",
"decimal.js": "^10.4.3",
"ecpair": "^2.1.0",
"es6-promise-plugin": "^4.2.2",
"find-webpack": "^2.2.1",
"ionicons": "^6.0.2",
"ionicons": "^6.1.3",
"liquidjs-lib": "6.0.2-liquid.28",
"lodash.merge": "^4.6.2",
"moment": "^2.29.4",
"os-browserify": "^0.3.0",
"path-browserify": "^1.0.1",
"pegin": "^0.1.5",
"pegin": "0.1.7",
"process": "^0.11.10",
"qs": "^6.11.0",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-redux": "^7.2.8",
"react-router": "^5.3.3",
"react-router-dom": "^5.3.3",
"redux": "^4.2.0",
"redux-saga": "^1.2.0",
"reselect": "^4.1.6",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-router": "^5.3.4",
"react-router-dom": "^5.3.4",
"scrypt-js": "^3.0.1",
"slip77": "^0.2.0",
"slip77": "0.2.0",
"stream-browserify": "^3.0.0",
"tdex-sdk": "1.8.2",
"tiny-secp256k1": "^2.2.1",
"util": "^0.12.4"
"tiny-secp256k1": "2.2.3",
"util": "^0.12.5",
"ws-electrumx-client": "1.0.5",
"zustand": "^4.3.9"
},
"devDependencies": {
"@capacitor/cli": "^4.1.0",
"@craco/craco": "^7.0.0",
"@ionic/cli": "^6.20.1",
"@ionic/prettier-config": "^2.0.0",
"@playwright/test": "^1.29.1",
"@capacitor/cli": "^4.8.1",
"@craco/craco": "^7.1.0",
"@ionic/cli": "^6.20.9",
"@ionic/prettier-config": "^2.1.2",
"@playwright/test": "^1.29.2",
"@testing-library/jest-dom": "^5.16.5",
"@types/bs58check": "^2.1.0",
"@types/buffer-json": "^2.0.1",
"@types/node": "^16.11.49",
"@types/qs": "^6.9.7",
"@types/react": "^17.0.48",
"@types/react-dom": "^17.0.17",
"@types/react-redux": "^7.1.24",
"@types/react-router": "^5.1.18",
"@types/react": "^18.0.35",
"@types/react-dom": "^18.0.11",
"@types/react-router": "^5.1.20",
"@types/react-router-dom": "^5.3.3",
"cordova-res": "^0.15.4",
"jest-canvas-mock": "^2.4.0",
"prettier": "^2.7.1",
"prettier": "^2.8.8",
"react-scripts": "^5.0.1",
"redux-devtools-extension": "^2.13.9",
"sass": "^1.54.4",
"typescript": "^4.7.4"
},
"resolutions": {
"liquidjs-lib": "6.0.2-liquid.15"
"sass": "^1.62.1",
"typescript": "4.9.4"
}
}
4 changes: 2 additions & 2 deletions scripts/tag.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ git add .
git commit -m "Bump $version"
git push origin master

echo "Push new tag..."
#echo "Push new tag..."
#git tag -a v$version -m "Release v$version"
git push origin v$version
#git push origin v$version

Loading

0 comments on commit 4698a2a

Please sign in to comment.