Skip to content

Commit 6fb9edf

Browse files
committed
more error message
1 parent c6d2cc4 commit 6fb9edf

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

app/libs/mixin.aar

-88.8 KB
Binary file not shown.

app/src/main/java/one/mixin/android/tip/Tip.kt

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -589,8 +589,8 @@ class Tip
589589
if (e is TipNetworkException && e.error.code == ErrorHandler.BAD_DATA) {
590590
reportException("Tip tip-secret meet bad data", e)
591591
Bugsnag.notify(e)
592-
593-
val msg = TipBody.forVerify(timestamp)
592+
val ts = Ed25519.getTimestamp()
593+
val msg = TipBody.forVerify(ts)
594594
val goSigBase64 = Ed25519.sign(msg, stSeed).base64RawURLEncode()
595595
Timber.e("signature go-ed25519 $goSigBase64")
596596

@@ -600,12 +600,16 @@ class Tip
600600
seedBase64 = seedBase64,
601601
secretBase64 = secretBase64,
602602
signatureBase64 = goSigBase64,
603-
timestamp = timestamp,
603+
timestamp = ts,
604604
)
605605
Timber.e("use go-ed25519 before updateTipSecret")
606606
tipNetworkNullable { tipService.updateTipSecret(request) }.getOrThrow()
607607
reportException("Tip tip-secret go update success after bad data", e)
608608
} else {
609+
Bugsnag.notify(e) { report ->
610+
report.addError("", "Tip secret update failed")
611+
true
612+
}
609613
throw e
610614
}
611615
}

0 commit comments

Comments
 (0)