Skip to content

Commit 4367854

Browse files
authored
release actions (#152)
* release actions * bug fixeds * actions fix
1 parent 756cb26 commit 4367854

30 files changed

Lines changed: 331 additions & 103 deletions

File tree

.github/workflows/publish.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Publish tagged commit to public repo
2+
3+
on:
4+
push:
5+
tags:
6+
- '*'
7+
8+
jobs:
9+
mirror:
10+
runs-on: ubuntu-latest
11+
permissions:
12+
contents: read
13+
steps:
14+
- name: Checkout private repo at tag
15+
uses: actions/checkout@v4
16+
with:
17+
fetch-depth: 0
18+
19+
- name: Push tag to public repo
20+
env:
21+
TOKEN: ${{ secrets.PUBLIC_REPO_TOKEN }}
22+
TAG: ${{ github.ref_name }}
23+
run: |
24+
git config --global user.name "mirror-bot"
25+
git config --global user.email "mirror-bot@example.com"
26+
27+
git remote add public https://$TOKEN@github.com/ORG/PUBLIC_REPO.git
28+
29+
git push --force --tags public $TAG

.github/workflows/release.yml

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
name: Android APK release CD
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
jobs:
9+
build:
10+
name: apk-release
11+
runs-on: macos-latest
12+
13+
steps:
14+
- uses: actions/checkout@v4
15+
with: { fetch-depth: 0 }
16+
17+
- name: Set up ruby env
18+
uses: ruby/setup-ruby@v1
19+
with:
20+
ruby-version: 3.2
21+
bundler-cache: true
22+
23+
- name: Setup Java
24+
uses: actions/setup-java@v4
25+
with:
26+
distribution: 'temurin'
27+
java-version: 20.0.2+9
28+
29+
- name: Decode signing certificate into a file
30+
env:
31+
CERTIFICATE_BASE64: ${{ secrets.ANDROID_DIST_SIGNING_KEY }}
32+
run: |
33+
echo $CERTIFICATE_BASE64 | base64 --decode > google-release.keystore
34+
35+
- name: Build android beta
36+
run: bundle exec fastlane android beta
37+
env:
38+
KEYSTORE_FILE: ${{ github.workspace }}/google-release.keystore
39+
KEYSTORE_PASSWORD: ${{ secrets.TONKEEPER_UPLOAD_STORE_PASSWORD }}
40+
KEY_ALIAS: ${{ secrets.TONKEEPER_UPLOAD_KEY_ALIAS}}
41+
KEY_PASSWORD: ${{ secrets.TONKEEPER_UPLOAD_KEY_PASSWORD }}
42+
ANDROID_PUBLISHER_CREDENTIALS: ${{ secrets.ANDROID_PUBLISHER_CREDENTIALS }}
43+
44+
- name: Upload android aab to artifacts
45+
uses: actions/upload-artifact@v4
46+
with:
47+
name: Tonkeeper aab ${{ env.VERSION_CODE }}
48+
path: |
49+
${{ env.AAB_OUTPUT_PATH }}
50+
51+
- name: Upload android apk to artifacts
52+
uses: actions/upload-artifact@v4
53+
with:
54+
name: Tonkeeper apk ${{ env.VERSION_CODE }}
55+
path: |
56+
${{ env.APK_OUTPUT_PATH }}
57+
58+
- name: Fix filename
59+
run: |
60+
mkdir -p release
61+
cp "$APK_OUTPUT_PATH" release/Tonkeeper.apk
62+
63+
- uses: actions/upload-artifact@v4
64+
with:
65+
name: apk
66+
path: release/Tonkeeper.apk
67+
68+
publish:
69+
needs: build
70+
runs-on: ubuntu-latest
71+
permissions:
72+
contents: write
73+
74+
steps:
75+
- uses: actions/download-artifact@v4
76+
with: { name: apk }
77+
78+
- uses: softprops/action-gh-release@v1
79+
env:
80+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
81+
with:
82+
files: Tonkeeper.apk

.kotlin/errors/errors-1728538677747.log

Lines changed: 0 additions & 4 deletions
This file was deleted.

apps/wallet/api/src/main/java/com/tonapps/wallet/api/Extensions.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,11 @@ fun <R> withRetry(
4747
SystemClock.sleep(delay + 100)
4848
return null
4949
} catch (e: IOException) {
50+
Log.e("WithRetryLog", "IOException: ${e.message}", e)
5051
SystemClock.sleep(delay + 100)
5152
return null
5253
} catch (e: Throwable) {
54+
Log.e("WithRetryLog", "Error: ${e.message}", e)
5355
val statusCode = e.getHttpStatusCode()
5456
if (statusCode == 429 || statusCode == 401 || statusCode == 502 || statusCode == 520) {
5557
SystemClock.sleep(delay + 100)

apps/wallet/api/src/main/java/com/tonapps/wallet/api/entity/ChartEntity.kt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,16 @@ data class ChartEntity(
66
val date: Long,
77
val price: Float
88
) {
9+
10+
val isEmpty: Boolean
11+
get() = this == EMPTY
12+
913
constructor(array: JSONArray) : this(
1014
array.getLong(0),
1115
array.getDouble(1).toFloat()
1216
)
17+
18+
companion object {
19+
val EMPTY = ChartEntity(0, 0f)
20+
}
1321
}

apps/wallet/data/events/src/main/java/com/tonapps/wallet/data/events/Extensions.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import io.tonapi.models.Action
77

88
val Action.isTransfer: Boolean
99
get() {
10-
return type == Action.Type.tonTransfer || type == Action.Type.jettonTransfer || type == Action.Type.nftItemTransfer
10+
return type == TxActionType.TonTransfer || type == TxActionType.JettonTransfer || type == TxActionType.NftItemTransfer
1111
}
1212

1313
fun AccountEvent.isOutTransfer(accountId: String): Boolean {
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
package com.tonapps.wallet.data.events
2+
3+
object TxActionType {
4+
const val TonTransfer = "TonTransfer"
5+
const val JettonTransfer = "JettonTransfer"
6+
const val JettonBurn = "JettonBurn"
7+
const val JettonMint = "JettonMint"
8+
const val NftItemTransfer = "NftItemTransfer"
9+
const val ContractDeploy = "ContractDeploy"
10+
const val Subscribe = "Subscribe"
11+
const val UnSubscribe = "UnSubscribe"
12+
const val AuctionBid = "AuctionBid"
13+
const val NftPurchase = "NftPurchase"
14+
const val DepositStake = "DepositStake"
15+
const val WithdrawStake = "WithdrawStake"
16+
const val WithdrawStakeRequest = "WithdrawStakeRequest"
17+
const val JettonSwap = "JettonSwap"
18+
const val SmartContractExec = "SmartContractExec"
19+
const val ElectionsRecoverStake = "ElectionsRecoverStake"
20+
const val ElectionsDepositStake = "ElectionsDepositStake"
21+
const val DomainRenew = "DomainRenew"
22+
const val InscriptionTransfer = "InscriptionTransfer"
23+
const val InscriptionMint = "InscriptionMint"
24+
const val Unknown = "Unknown"
25+
}

apps/wallet/instance/app/src/main/java/com/tonapps/tonkeeper/api/Extensions.kt

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -65,23 +65,6 @@ private fun getCurrencyByCountry(country: String): String? {
6565
return 0
6666
}*/
6767

68-
val AccountEvent.withTON: Boolean
69-
get() {
70-
for (action in actions) {
71-
val type = action.type
72-
if (type == Action.Type.tonTransfer ||
73-
type == Action.Type.jettonSwap ||
74-
type == Action.Type.electionsDepositStake ||
75-
type == Action.Type.electionsRecoverStake ||
76-
type == Action.Type.subscribe ||
77-
type == Action.Type.unSubscribe ||
78-
type == Action.Type.depositStake ||
79-
type == Action.Type.withdrawStake) {
80-
return true
81-
}
82-
}
83-
return false
84-
}
8568

8669
val PoolImplementationType.icon: Int
8770
get() {

apps/wallet/instance/app/src/main/java/com/tonapps/tonkeeper/core/entities/TransferEntity.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ data class TransferEntity(
9393

9494
private val coins: org.ton.block.Coins
9595
get() {
96-
return org.ton.block.Coins.ofNano(amount.toLong())
96+
return org.ton.block.Coins.ofNano(amount.toBigInteger())
9797
}
9898

9999
private fun getCommentForwardPayload(

apps/wallet/instance/app/src/main/java/com/tonapps/tonkeeper/core/history/HistoryHelper.kt

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
package com.tonapps.tonkeeper.core.history
22

33
import android.content.Context
4+
import android.util.Log
45
import androidx.collection.arrayMapOf
6+
import com.squareup.moshi.Json
57
import com.tonapps.blockchain.ton.extensions.equalsAddress
68
import com.tonapps.icu.Coins
79
import com.tonapps.extensions.max24
@@ -41,6 +43,7 @@ import com.tonapps.wallet.data.collectibles.CollectiblesRepository
4143
import com.tonapps.wallet.data.core.currency.WalletCurrency
4244
import com.tonapps.wallet.data.events.CommentEncryption
4345
import com.tonapps.wallet.data.events.EventsRepository
46+
import com.tonapps.wallet.data.events.TxActionType
4447
import com.tonapps.wallet.data.passcode.PasscodeManager
4548
import com.tonapps.wallet.data.rates.RatesRepository
4649
import com.tonapps.wallet.data.rates.entity.RatesEntity
@@ -1052,7 +1055,7 @@ class HistoryHelper(
10521055
wallet = wallet,
10531056
actionOutStatus = ActionOutStatus.Send
10541057
)
1055-
} else if (action.type == Action.Type.unknown) {
1058+
} else if (action.type == TxActionType.Unknown) {
10561059
return createUnknown(
10571060
index,
10581061
txId,
@@ -1266,8 +1269,8 @@ class HistoryHelper(
12661269
title = simplePreview.description,
12671270
coinIconUrl = simplePreview.valueImage ?: "",
12681271
subtitle = action.simplePreview.description.max24,
1269-
value = MINUS_SYMBOL,
1270-
tokenCode = "TON",
1272+
tokenCode = action.simplePreview.name,
1273+
value = action.simplePreview.value ?: MINUS_SYMBOL,
12711274
timestamp = timestamp,
12721275
date = date,
12731276
dateDetails = dateDetails,

0 commit comments

Comments
 (0)