Skip to content

Commit

Permalink
Optimize UX
Browse files Browse the repository at this point in the history
  • Loading branch information
WooKeyWallet committed May 7, 2019
1 parent 7014dfc commit a91029c
Show file tree
Hide file tree
Showing 44 changed files with 1,305 additions and 212 deletions.
17 changes: 15 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,13 @@ apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'

def computeVersionCode() {
80
def cmd = 'git rev-list HEAD --first-parent --count'
def trim = cmd.execute().text.trim()
if (trim == null || trim.length() == 0) {
trim = 1
}
trim.toInteger()
103
}

def gitVersionTag() {
Expand All @@ -24,7 +30,7 @@ def gitVersionTag() {
}

def computeVersionName() {
return "1.0.2"
return "1.0.3"
}

android {
Expand All @@ -37,6 +43,13 @@ android {
versionName computeVersionName()
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

javaCompileOptions {
annotationProcessorOptions {
arguments = ["room.schemaLocation":
"$projectDir/schemas".toString()]
}
}

}
buildTypes {
debug {
Expand Down
236 changes: 236 additions & 0 deletions app/schemas/io.wookey.wallet.data.AppDatabase/1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,236 @@
{
"formatVersion": 1,
"database": {
"version": 1,
"identityHash": "4501b5285edaa545e5ab39a9b659387e",
"entities": [
{
"tableName": "wallets",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `symbol` TEXT NOT NULL, `name` TEXT NOT NULL, `address` TEXT NOT NULL, `balance` TEXT NOT NULL, `passwordPrompt` TEXT NOT NULL, `restoreHeight` INTEGER NOT NULL, `isActive` INTEGER NOT NULL)",
"fields": [
{
"fieldPath": "id",
"columnName": "_id",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "symbol",
"columnName": "symbol",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "name",
"columnName": "name",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "address",
"columnName": "address",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "balance",
"columnName": "balance",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "passwordPrompt",
"columnName": "passwordPrompt",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "restoreHeight",
"columnName": "restoreHeight",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "isActive",
"columnName": "isActive",
"affinity": "INTEGER",
"notNull": true
}
],
"primaryKey": {
"columnNames": [
"_id"
],
"autoGenerate": true
},
"indices": [
{
"name": "index_wallets_symbol_name",
"unique": true,
"columnNames": [
"symbol",
"name"
],
"createSql": "CREATE UNIQUE INDEX `index_wallets_symbol_name` ON `${TABLE_NAME}` (`symbol`, `name`)"
}
],
"foreignKeys": []
},
{
"tableName": "assets",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `walletId` INTEGER NOT NULL, `token` TEXT NOT NULL, `balance` TEXT NOT NULL, `contractAddress` TEXT NOT NULL)",
"fields": [
{
"fieldPath": "id",
"columnName": "_id",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "walletId",
"columnName": "walletId",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "token",
"columnName": "token",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "balance",
"columnName": "balance",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "contractAddress",
"columnName": "contractAddress",
"affinity": "TEXT",
"notNull": true
}
],
"primaryKey": {
"columnNames": [
"_id"
],
"autoGenerate": true
},
"indices": [
{
"name": "index_assets_walletId_contractAddress",
"unique": true,
"columnNames": [
"walletId",
"contractAddress"
],
"createSql": "CREATE UNIQUE INDEX `index_assets_walletId_contractAddress` ON `${TABLE_NAME}` (`walletId`, `contractAddress`)"
}
],
"foreignKeys": []
},
{
"tableName": "nodes",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `symbol` TEXT NOT NULL, `url` TEXT NOT NULL, `isSelected` INTEGER NOT NULL)",
"fields": [
{
"fieldPath": "id",
"columnName": "_id",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "symbol",
"columnName": "symbol",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "url",
"columnName": "url",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "isSelected",
"columnName": "isSelected",
"affinity": "INTEGER",
"notNull": true
}
],
"primaryKey": {
"columnNames": [
"_id"
],
"autoGenerate": true
},
"indices": [
{
"name": "index_nodes_symbol_url",
"unique": true,
"columnNames": [
"symbol",
"url"
],
"createSql": "CREATE UNIQUE INDEX `index_nodes_symbol_url` ON `${TABLE_NAME}` (`symbol`, `url`)"
}
],
"foreignKeys": []
},
{
"tableName": "address_books",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `symbol` TEXT NOT NULL, `address` TEXT NOT NULL, `notes` TEXT NOT NULL)",
"fields": [
{
"fieldPath": "id",
"columnName": "_id",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "symbol",
"columnName": "symbol",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "address",
"columnName": "address",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "notes",
"columnName": "notes",
"affinity": "TEXT",
"notNull": true
}
],
"primaryKey": {
"columnNames": [
"_id"
],
"autoGenerate": true
},
"indices": [
{
"name": "index_address_books_symbol_address_notes",
"unique": true,
"columnNames": [
"symbol",
"address",
"notes"
],
"createSql": "CREATE UNIQUE INDEX `index_address_books_symbol_address_notes` ON `${TABLE_NAME}` (`symbol`, `address`, `notes`)"
}
],
"foreignKeys": []
}
],
"setupQueries": [
"CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)",
"INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, \"4501b5285edaa545e5ab39a9b659387e\")"
]
}
}
Loading

0 comments on commit a91029c

Please sign in to comment.