Skip to content
This repository has been archived by the owner on Sep 17, 2024. It is now read-only.

Commit

Permalink
Merge pull request #288 from MXCzkEVM/pre_main_qa
Browse files Browse the repository at this point in the history
Moonbase Release Candidate 1
  • Loading branch information
sheenhx authored Sep 14, 2024
2 parents 02de2ae + 938937d commit 26efa4c
Show file tree
Hide file tree
Showing 462 changed files with 7,645 additions and 3,349 deletions.
145 changes: 145 additions & 0 deletions .github/workflows/compile.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
name: Build and distribute

on:
push:
branches:
- pre_main_qa

jobs:
build-apk:
name: Build-apk
runs-on: ubuntu-latest
steps:
- name: Checkout code with submodules
uses: actions/checkout@v4
with:
submodules: 'recursive'


- name: Set Version Code
run: |
echo "Received Number: ${{ github.run_number }}"
echo "VERSION_CODE=${{ github.run_number }}" >> $GITHUB_ENV
echo "Set VERSION_CODE to: ${{ github.run_number }}"
shell: bash

- uses: sheenhx/action-flutter-build-android@v3
with:
keystore-base64: ${{ secrets.ANDROID_RELEASE_KEY }}
keystore-password: "${{ secrets.ANDROID_RELEASE_KEY_PASSWORD }}"
build-cmd: flutter build apk --flavor product --release --build-number=${{ env.VERSION_CODE }}
working-directory: ./

- name: Rename APK
run: mv build/app/outputs/flutter-apk/app-product-release.apk build/app/outputs/flutter-apk/moonchain.apk

- name: Archive APK
uses: actions/upload-artifact@v4
with:
name: release-apk
# Try running the build locally with the build command to be sure of this path
path: build/app/outputs/flutter-apk/moonchain.apk

- uses: ryand56/r2-upload-action@latest
with:
r2-account-id: ${{ secrets.R2_ACCOUNT_ID }}
r2-access-key-id: ${{ secrets.R2_ACCESS_KEY_ID }}
r2-secret-access-key: ${{ secrets.R2_SECRET_ACCESS_KEY }}
r2-bucket: ${{ secrets.R2_BUCKET }}
source-dir: build/app/outputs/flutter-apk
destination-dir: app


build-macos:
name: Build-ios
runs-on: macos-latest
steps:
- name: Checkout code with submodules
uses: actions/checkout@v4
with:
submodules: recursive

- uses: sheenhx/action-flutter-build-ios@v1
with:
# always use --export-options-plist=ios/GithubActionsExportOptions.plist
build-cmd: flutter build ipa --build-number=$(( 15 + ${{ github.run_number }})) --export-options-plist=ios/GithubActionsExportOptions.plist
certificate-base64: ${{ secrets.IOS_BUILD_CERTIFICATE_BASE64 }}
certificate-password: ${{ secrets.IOS_BUILD_CERTIFICATE_PASSWORD }}
provisioning-profile-base64: ${{ secrets.IOS_MOBILE_PROVISIONING_PROFILE_BASE64 }}
keychain-password: ${{ secrets.IOS_GITHUB_KEYCHAIN_PASSWORD }}

- name: Archive IPA
uses: actions/upload-artifact@v4
with:
name: release-ipa
# Try running the build locally with the build command to be sure of this path
path: build/ios/ipa/*.ipa

upload-combined:
name: Combine and Upload Builds
needs: [build-apk, build-macos]
runs-on: ubuntu-latest
steps:
- name: Download Ubuntu artifact
uses: actions/download-artifact@v4
with:
name: release-apk
path: combined-builds/android

- name: Download macOS artifact
uses: actions/download-artifact@v4
with:
name: release-ipa
path: combined-builds/iOS

- name: Upload combined artifacts
uses: actions/upload-artifact@v4
with:
name: combined-builds
path: combined-builds

- name: Generate
id: generate
uses: AcmeSoftwareLLC/app-build-number@v1
with:
timezone: Asia/Kathmandu

- name: Display the generated build number
run: echo "Build Number > ${{ steps.generate.outputs.build-number }}"


- uses: ncipollo/release-action@v1
with:
artifacts: "combined-builds/android/*.apk,combined-builds/iOS/*.ipa"
token: ${{ secrets.DART_TOKEN }}
tag: ${{ steps.generate.outputs.build-number }}


- name: Upload APK to Waldo
uses: waldoapp/gh-action-upload@v2
with:
build_path: combined-builds/android/moonchain.apk
upload_token: ${{ secrets.WALDO_SESSIONS_ANDROID }}

build-waldo:
name: Build-waldo
runs-on: macos-latest
steps:
- name: Checkout code with submodules
uses: actions/checkout@v4
with:
submodules: recursive

- uses: sheenhx/action-flutter-build-ios@v1
with:
# always use --export-options-plist=ios/GithubActionsExportOptions.plist
build-cmd: flutter build ios --simulator
certificate-base64: ${{ secrets.IOS_BUILD_CERTIFICATE_BASE64 }}
certificate-password: ${{ secrets.IOS_BUILD_CERTIFICATE_PASSWORD }}
provisioning-profile-base64: ${{ secrets.IOS_MOBILE_PROVISIONING_PROFILE_BASE64 }}
keychain-password: ${{ secrets.IOS_GITHUB_KEYCHAIN_PASSWORD }}
- name: Upload IPA to Waldo
uses: waldoapp/gh-action-upload@v2
with:
build_path: build/ios/iphonesimulator/Runner.app
upload_token: ${{ secrets.WALDO_SESSIONS_IOS }}
24 changes: 0 additions & 24 deletions .github/workflows/test-action.yml

This file was deleted.

52 changes: 37 additions & 15 deletions .github/workflows/translate.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,46 @@
name: Translate
name: Translate en.json to de.json

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
branches:
- pre_main_qa
paths:
- 'assets/flutter_i18n/en.json'
workflow_dispatch:

jobs:
translate:
runs-on: ubuntu-latest
permissions:
contents: write

steps:
- name: translate
uses: sheenhx/translatei18n
with:
GIT_COMMIT_HASH: ${{ github.event.pull_request.head.sha }}
GIT_PATCH_OUTPUT: ${{ github.event.pull_request.patch_url }}
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
OPENAI_ORG_KEY: ${{ secrets.OPENAI_ORG_KEY }}
PR_NUMBER: ${{ github.event.pull_request.number }}
PR_TITLE: ${{ github.event.pull_request.title }}
REPOSITORY_NAME: ${{ github.repository }}
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.12.3' # Specify Python version

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -q -U google-generativeai
- name: Run translation script
working-directory: translations
env:
GEMINI_API_KEY: ${{ secrets.GEMINIKEY }}
run: |
python translate.py
- name: Commit changes
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add .
git commit -m "Update pre-QA with latest translations"
git push
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# AXS Wallet
# Moonchain Wallet

AXS wallet using an ERC-20 smart contract.
Self custodial Moonchain wallet, Seamless interaction with MXC chains & EVM based chains, Enabling users to Send/Receive tokens, NFTs, and interact with Web3 DApps.

## Project Structure

Expand Down Expand Up @@ -30,7 +30,7 @@ And also, UseCases are feature-level, while presenters are widget-level. So 1 pr

## Shared Library

This library includes AXS wallet's UI(User Interface) and business logic. The basic components and images, fonts, colors come from defination of designer's Figma. The logic part is to call the related APIs.
This library includes Moonchain wallet's UI(User Interface) and business logic. The basic components and images, fonts, colors come from defination of designer's Figma. The logic part is to call the related APIs.

The repository: https://github.com/MXCzkEVM/mxc-shared-flutter

Expand Down Expand Up @@ -75,7 +75,7 @@ When you want to debug on your local computer, suggest to create .vscode/launch.
"version": "0.2.0",
"configurations": [
{
"name": "axs-wallet",
"name": "moonchain-wallet",
"request": "launch",
"type": "dart",
"args": [
Expand Down
27 changes: 18 additions & 9 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ if (localPropertiesFile.exists()) {
localProperties.load(reader)
}
}
// Load key.properties
def keystoreProperties = new Properties()
def keystorePropertiesFile = rootProject.file("key.properties")
if (keystorePropertiesFile.exists()) {
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
}

def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
Expand All @@ -23,7 +29,7 @@ if (flutterVersionName == null) {

apply plugin: 'com.android.application'
// START: FlutterFire Configuration
apply plugin: 'com.google.gms.google-services'
// apply plugin: 'com.google.gms.google-services'
// END: FlutterFire Configuration
apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
Expand All @@ -50,31 +56,34 @@ android {
}

defaultConfig {
applicationId "com.mxc.axswallet"
applicationId "com.mxc.moonchainWallet"
// You can update the following values to match your application needs.
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
minSdkVersion 21
targetSdkVersion 34
versionCode System.getenv('APPCENTER_BUILD_ID')?.toInteger() ?: 404
versionCode System.getenv('VERSION_CODE')?.hashCode()?.abs() ?: 404
versionName flutterVersionName
}

signingConfigs {
release {
storeFile rootProject.file("app/key.jks")
storePassword System.getenv("APPCENTER_KEYSTORE_PASSWORD")
keyAlias System.getenv("APPCENTER_KEY_ALIAS")
keyPassword System.getenv("APPCENTER_KEY_PASSWORD")
keyAlias = keystoreProperties['keyAlias']
keyPassword = keystoreProperties['keyPassword']
storeFile = keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null
storePassword = keystoreProperties['storePassword']
}

}

buildTypes {
release {
signingConfig signingConfigs.release
// Enables code shrinking, obfuscation, and optimization
minifyEnabled true
// Enables resource shrinking
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
// Specify ProGuard rules files
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.release
}
debug {
signingConfig signingConfigs.debug
Expand Down
2 changes: 1 addition & 1 deletion android/app/src/debug/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.mxc.axswallet">
package="com.mxc.moonchainWallet">
<!-- The INTERNET permission is required for development. Specifically,
the Flutter tool needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
Expand Down
8 changes: 4 additions & 4 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" package="com.mxc.axswallet">
xmlns:tools="http://schemas.android.com/tools" package="com.mxc.moonchainWallet">

<queries>
<package android:name="org.telegram.messenger" />
Expand Down Expand Up @@ -44,12 +44,12 @@

<uses-feature android:name="android.hardware.bluetooth_le" android:required="false" />

<application tools:replace="android:label" android:label="AXS" android:name="${applicationName}" android:icon="@mipmap/ic_launcher" android:theme="@style/LaunchTheme" android:requestLegacyExternalStorage="true">
<application tools:replace="android:label" android:label="MoonBase" android:name="${applicationName}" android:icon="@mipmap/ic_launcher" android:theme="@style/LaunchTheme" android:requestLegacyExternalStorage="true">


<meta-data android:name="com.google.firebase.messaging.default_notification_channel_id" android:value="axs_wallet_channel" />
<meta-data android:name="com.google.firebase.messaging.default_notification_channel_id" android:value="moonchain_wallet_channel" />

<meta-data android:name="com.google.firebase.messaging.default_notification_icon" android:resource="@drawable/axs_logo" />
<meta-data android:name="com.google.firebase.messaging.default_notification_icon" android:resource="@drawable/moonchain_logo" />

<meta-data android:name="com.google.firebase.messaging.default_notification_color" android:resource="@color/primary" />

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.mxc.axswallet
package com.mxc.moonchainWallet

import io.flutter.embedding.android.FlutterFragmentActivity

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 3 additions & 2 deletions android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@mipmap/ic_launcher_background"/>
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
<background android:drawable="@mipmap/ic_launcher_background"/>
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
<monochrome android:drawable="@mipmap/ic_launcher_monochrome"/>
</adaptive-icon>

This file was deleted.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed android/app/src/main/res/mipmap-mdpi/ic_launcher.webp
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
2 changes: 1 addition & 1 deletion android/app/src/main/res/values/colors.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="primary">#5077F7</color>
<color name="primary">#000000</color>
</resources>
2 changes: 1 addition & 1 deletion android/app/src/profile/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.mxc.axswallet">
package="com.mxc.moonchainWallet">
<!-- The INTERNET permission is required for development. Specifically,
the Flutter tool needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
Expand Down
Loading

0 comments on commit 26efa4c

Please sign in to comment.