Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: flow reference wallet #1

Merged
merged 4 commits into from
Sep 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Lilico Android Project User Guide
This document is a guide for users who want to run the Lilico Android project. Before starting, please make sure you have installed Android Studio and have a basic understanding of Android development.
# Flow Reference Wallet Android Project User Guide
This document is a guide for users who want to run the Flow Reference Wallet Android project. Before starting, please make sure you have installed Android Studio and have a basic understanding of Android development.

### Step 1: Configure google-services.json
The google-services.json file is required to enable Firebase services such as Firebase Authentication and Firebase Cloud Messaging. To use these services, you need to provide your own google-services.json file.
Expand Down Expand Up @@ -35,6 +35,6 @@ WALLET_CONNECT_PROJECT_ID
Please fill in the values for each item according to your project's requirements.

### Step 4: Run the project
Now you are ready to run the Lilico Android project. Simply open the project in Android Studio and run it on an emulator or a physical device.
Now you are ready to run the Flow Reference Wallet Android project. Simply open the project in Android Studio and run it on an emulator or a physical device.

If you encounter any issues during the setup process, please refer to the project's documentation or contact the project's developer for assistance.
5 changes: 4 additions & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,10 @@ dependencies {
implementation platform('com.google.firebase:firebase-bom:30.2.0')
implementation 'com.google.firebase:firebase-analytics-ktx'
implementation 'com.google.firebase:firebase-messaging-ktx'
// implementation 'com.google.firebase:firebase-inappmessaging-display-ktx'
implementation ('com.google.firebase:firebase-inappmessaging-display-ktx') {
exclude group: 'com.google.protobuf', module: 'protobuf-javalite'
exclude group: 'com.google.firebase', module: 'protolite-well-known-types'
}
implementation 'com.google.firebase:firebase-auth-ktx'
implementation 'com.google.firebase:firebase-storage-ktx'
implementation 'com.google.firebase:firebase-config-ktx'
Expand Down
2 changes: 1 addition & 1 deletion app/src/debug/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Flow Core Dev</string>
<string name="app_name">Flow Ref Dev</string>
<string name="file_provider_authorities" translatable="false">io.outblock.lilico.dev.provider</string>
</resources>
2 changes: 1 addition & 1 deletion app/src/dev/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Flow Core Dev</string>
<string name="app_name">Flow Ref Dev</string>
<string name="file_provider_authorities" translatable="false">io.outblock.lilico.dev.provider</string>
</resources>
4 changes: 2 additions & 2 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -272,12 +272,12 @@
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>

<data android:scheme="fcw"/>
<data android:scheme="frw"/>
<data android:scheme="http"/>
<data android:scheme="https"/>
<data android:scheme="lilico"/>
<data android:host="link.lilico.app"/>
<data android:host="fcw-link.lilico.app"/>
<data android:host="frw-link.lilico.app"/>
</intent-filter>
</activity>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ class WalletConnect {

private fun setup(application: Application) {
val appMetaData = Core.Model.AppMetaData(
name = "Flow Core Wallet Android",
name = "Flow Reference Wallet Android",
description = "Digital wallet created for everyone.",
url = "https://core.flow.com/",
icons = listOf("https://lilico.app/fcw-logo.png"),
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/java/io/outblock/lilico/page/scan/Utils.kt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ fun dispatchScanResult(context: Context, str: String) {
return
}

if ((text.startsWith("wc:") || text.startsWith("lilico://wc?") || text.startsWith("fcw://wc?"))
if ((text.startsWith("wc:") || text.startsWith("lilico://wc?") || text.startsWith("frw://wc?"))
&& AppConfig.walletConnectEnable()) {
val wcUri = if (text.startsWith("wc:")) {
text
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ private val FCL_AUTHN_RESPONSE = """
"f_type": "Service",
"f_vsn": "1.0.0",
"type": "authn",
"uid": "fcw#authn",
"uid": "frw#authn",
"endpoint": "ext:0x000",
"id": "$ADDRESS_REPLACEMENT",
"identity": {
Expand All @@ -44,7 +44,7 @@ private val FCL_AUTHN_RESPONSE = """
"f_type": "ServiceProvider",
"f_vsn": "1.0.0",
"address": "$ADDRESS_REPLACEMENT",
"name": "Flow Core Wallet"
"name": "Flow Reference Wallet"
}
},
$PRE_AUTHZ_REPLACEMENT
Expand All @@ -54,7 +54,7 @@ private val FCL_AUTHN_RESPONSE = """
"f_type": "Service",
"f_vsn": "1.0.0",
"type": "authz",
"uid": "fcw#authz",
"uid": "frw#authz",
"endpoint": "ext:0x000",
"method": "EXT/RPC",
"identity": {
Expand All @@ -74,7 +74,7 @@ private val FCL_AUTHN_RESPONSE_USER_SIGNATURE = """
"f_type": "Service",
"f_vsn": "1.0.0",
"type": "user-signature",
"uid": "fcw#user-signature",
"uid": "frw#user-signature",
"endpoint": "chrome-extension://hpclkefagolihohboafpheddmmgdffjm/popup.html",
"method": "EXT/RPC"
},
Expand All @@ -85,7 +85,7 @@ private val FCL_AUTHN_RESPONSE_ACCOUNT_PROOF = """
"f_type": "Service",
"f_vsn": "1.0.0",
"type": "account-proof",
"uid": "fcw#account-proof",
"uid": "frw#account-proof",
"endpoint": "chrome-extension://hpclkefagolihohboafpheddmmgdffjm/popup.html",
"method": "EXT/RPC",
"data": {
Expand Down Expand Up @@ -133,7 +133,7 @@ private val FCL_PRE_AUTHZ_RESPONSE = """
"f_type": "Service",
"f_vsn": "1.0.0",
"type": "authz",
"uid": "fcw#authz",
"uid": "frw#authz",
"endpoint": "chrome-extension://hpclkefagolihohboafpheddmmgdffjm/popup.html",
"method": "EXT/RPC",
"identity": {
Expand All @@ -146,7 +146,7 @@ private val FCL_PRE_AUTHZ_RESPONSE = """
"f_type": "Service",
"f_vsn": "1.0.0",
"type": "authz",
"uid": "fcw#authz",
"uid": "frw#authz",
"endpoint": "chrome-extension://hpclkefagolihohboafpheddmmgdffjm/popup.html",
"method": "EXT/RPC",
"identity": {
Expand All @@ -160,7 +160,7 @@ private val FCL_PRE_AUTHZ_RESPONSE = """
"f_type": "Service",
"f_vsn": "1.0.0",
"type": "authz",
"uid": "fcw#authz",
"uid": "frw#authz",
"endpoint": "chrome-extension://hpclkefagolihohboafpheddmmgdffjm/popup.html",
"method": "EXT/RPC",
"identity": {
Expand Down Expand Up @@ -203,7 +203,7 @@ fun generateFclExtensionInject(): String {
f_type: 'Service',
f_vsn: '1.0.0',
type: 'authn',
uid: 'Flow Core Wallet',
uid: 'Flow Reference Wallet',
endpoint: 'chrome-extension://hpclkefagolihohboafpheddmmgdffjm/popup.html',
method: 'EXT/RPC',
id: 'hpclkefagolihohboafpheddmmgdffjm',
Expand All @@ -212,7 +212,7 @@ fun generateFclExtensionInject(): String {
},
provider: {
address: '$address',
name: 'Flow Core Wallet',
name: 'Flow Reference Wallet',
icon: 'https://lilico.app/fcw-logo.png',
description: 'Digital wallet created for everyone.',
}
Expand Down Expand Up @@ -271,7 +271,7 @@ private suspend fun generateAuthnPreAuthz(): String {
"f_type": "Service",
"f_vsn": "1.0.0",
"type": "pre-authz",
"uid": "fcw#pre-authz",
"uid": "frw#pre-authz",
"endpoint": "android://pre-authz.lilico.app",
"method": "EXT/RPC",
"data": {
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/activity_about.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:fontFamily="@font/montsettat"
android:text="@string/app_name"
android:text="@string/app_full_name"
android:textColor="@color/text"
android:textSize="15sp"
android:textStyle="bold"/>
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/activity_claim_domain.xml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
android:layout_height="wrap_content"
android:layout_marginStart="3dp"
android:fontFamily="@font/inter_semi_bold"
android:text="@string/lilico"
android:text="@string/app_name"
android:textColor="@color/neutrals2"
android:textSize="16sp"/>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
android:fontFamily="@font/inter_medium"
android:textColor="@color/text"
android:textSize="12sp"
tools:text="Lilico"/>
tools:text="Flow Ref"/>

<TextView
android:layout_width="wrap_content"
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/fragment_explore.xml
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@
android:layout_height="wrap_content"
android:layout_marginStart="3dp"
android:fontFamily="@font/inter"
android:text="@string/lilico"
android:text="@string/app_name"
android:textColor="@color/neutrals2"
android:textSize="10sp"
android:textStyle="bold"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
android:id="@+id/intro_text_2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Other Lilico users can find you and send you payments via your unique username."
android:text="Other Flow Ref users can find you and send you payments via your unique username."
android:textColor="@color/text_light"
android:textSize="14sp"
android:layout_marginTop="27dp"
Expand Down
7 changes: 4 additions & 3 deletions app/src/main/res/layout/fragment_wallet_unregistered.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fontFamily="@font/montsettat"
android:layout_marginTop="14dp"
android:layout_marginTop="16dp"
android:gravity="center"
android:text="@string/flow_core"
android:text="@string/app_short_name"
android:textColor="@color/welcome_page_text"
android:textSize="36sp"
android:textSize="30sp"
android:textStyle="bold"
app:layout_constraintBottom_toTopOf="@id/desc_view"
app:layout_constraintTop_toBottomOf="@id/ifv_logo"/>
Expand All @@ -34,6 +34,7 @@
android:id="@+id/desc_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:fontFamily="@font/inter"
android:gravity="center"
android:text="@string/welcome_desc"
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/layout/item_stake_list.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
android:textColor="@color/text"
android:textSize="14sp"
android:textStyle="bold"
tools:text="Lilico"/>
tools:text="Flow Ref"/>

<TextView
android:id="@+id/provider_rate"
Expand All @@ -52,7 +52,7 @@
android:textColor="@color/stake"
android:textSize="12sp"
android:textStyle="bold"
tools:text="Lilico"/>
tools:text="Flow Ref"/>

<View
android:layout_width="0dp"
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/layout/item_stake_provider.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
app:layout_constraintStart_toEndOf="@id/icon_view"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_chainStyle="packed"
tools:text="Lilico"/>
tools:text="Flow Ref"/>

<TextView
android:id="@+id/desc_view"
Expand All @@ -59,7 +59,7 @@
app:layout_constraintStart_toEndOf="@id/icon_view"
app:layout_constraintTop_toBottomOf="@id/title_view"
app:layout_constraintVertical_chainStyle="packed"
tools:text="Lilico"/>
tools:text="Flow Ref"/>

<androidx.appcompat.widget.LinearLayoutCompat
android:id="@+id/rate_wrapper"
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/layout/item_stake_provider_recommend.xml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
app:layout_constraintStart_toEndOf="@id/icon_view"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_chainStyle="packed"
tools:text="Lilico"/>
tools:text="Flow Ref"/>

<TextView
android:id="@+id/desc_view"
Expand All @@ -98,7 +98,7 @@
app:layout_constraintStart_toEndOf="@id/icon_view"
app:layout_constraintTop_toBottomOf="@id/title_view"
app:layout_constraintVertical_chainStyle="packed"
tools:text="Lilico"/>
tools:text="Flow Ref"/>

<androidx.appcompat.widget.LinearLayoutCompat
android:id="@+id/rate_wrapper"
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/layout/layout_main_drawer_layout.xml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
android:textStyle="bold"
app:layout_constraintStart_toStartOf="@id/header_bg"
app:layout_constraintTop_toBottomOf="@id/avatar_view"
tools:text="Lilico"/>
tools:text="Flow Ref"/>

<TextView
android:id="@+id/desc_view"
Expand All @@ -65,7 +65,7 @@
android:textSize="14sp"
app:layout_constraintStart_toStartOf="@id/header_bg"
app:layout_constraintTop_toBottomOf="@id/nick_name_view"
tools:text="Lilico"/>
tools:text="Flow Ref"/>

<io.outblock.lilico.page.main.widget.DrawerItem
android:id="@+id/scan_item"
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/widget_drawer_item.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
android:textColor="@color/neutrals2"
android:textSize="14sp"
android:textStyle="bold"
tools:text="Lilico"/>
tools:text="Flow Ref"/>

</androidx.appcompat.widget.LinearLayoutCompat>
</com.google.android.material.card.MaterialCardView>
Loading