-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
47 additions
and
21 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 1 addition & 3 deletions
4
...lletapp/data/repository/CoinRepository.kt → ...le/walletapp/data/coins/CoinRepository.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
wallet_app/android/app/src/main/java/com/example/walletapp/di/RetrofitClient.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
wallet_app/android/app/src/main/java/com/example/walletapp/model/Account.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
package com.example.walletapp.model | ||
|
||
class Account { | ||
var address: String = "" | ||
} | ||
data class Account ( | ||
val address: String | ||
) |
8 changes: 4 additions & 4 deletions
8
wallet_app/android/app/src/main/java/com/example/walletapp/model/Token.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
package com.example.walletapp.model | ||
|
||
class Token { | ||
var address: String = "" | ||
var symbol: String = "" | ||
} | ||
class Token ( | ||
val address: String, | ||
val symbol: String | ||
) |
17 changes: 11 additions & 6 deletions
17
wallet_app/android/app/src/main/java/com/example/walletapp/model/User.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,18 @@ | ||
package com.example.walletapp.model | ||
|
||
class User { | ||
private var accounts: Array<Account> = emptyArray(); | ||
data class User ( | ||
val accounts: Array<Account> | ||
) { | ||
override fun equals(other: Any?): Boolean { | ||
if (this === other) return true | ||
if (javaClass != other?.javaClass) return false | ||
|
||
fun hasAccount(): Boolean { | ||
return accounts.isNotEmpty() | ||
other as User | ||
|
||
return accounts.contentEquals(other.accounts) | ||
} | ||
|
||
fun getAccounts(): Array<Account> { | ||
return accounts | ||
override fun hashCode(): Int { | ||
return accounts.contentHashCode() | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters