File tree Expand file tree Collapse file tree 4 files changed +19
-2
lines changed
library/src/main/kotlin/one/mixin/bot/vo
samples/src/main/java/jvmMain/kotlin Expand file tree Collapse file tree 4 files changed +19
-2
lines changed Original file line number Diff line number Diff line change 1+ ### v0.5.6
2+ - Support asset deposit entry
3+
14### v0.5.5
25- Add search user
36
Original file line number Diff line number Diff line change @@ -11,6 +11,8 @@ data class Asset(
1111 val iconUrl : String ,
1212 val balance : String ,
1313 val destination : String ,
14+ @SerializedName(" deposit_entries" )
15+ val depositEntries : List <DepositEntry >? ,
1416 val tag : String? ,
1517 @SerializedName(" price_btc" )
1618 val priceBtc : String ,
Original file line number Diff line number Diff line change 1+ package one.mixin.bot.vo
2+
3+ import com.google.gson.annotations.SerializedName
4+
5+ class DepositEntry (
6+ @SerializedName(" destination" )
7+ val destination : String ,
8+ @SerializedName(" tag" )
9+ val tag : String? ,
10+ @SerializedName(" properties" )
11+ val properties : List <String >?
12+ )
Original file line number Diff line number Diff line change @@ -159,9 +159,9 @@ internal suspend fun transferToUser(
159159
160160private suspend fun getAsset (client : HttpClient ) {
161161 // Get asset
162- val assetResponse = client.assetService.getAsset(CNB_ID )
162+ val assetResponse = client.assetService.getAsset(BTC_ID )
163163 if (assetResponse.isSuccess()) {
164- println (" Assets ${assetResponse.data?.symbol} : ${assetResponse.data?.balance} " )
164+ println (" Assets ${assetResponse.data?.symbol} : ${assetResponse.data?.balance} ${assetResponse.data?.depositEntries?.last()?.properties} " )
165165 } else {
166166 println (" Assets failure ${assetResponse.error} " )
167167 }
You can’t perform that action at this time.
0 commit comments