diff --git a/patches/src/main/kotlin/app/revanced/patches/myexpenses/misc/pro/Fingerprints.kt b/patches/src/main/kotlin/app/revanced/patches/myexpenses/misc/pro/Fingerprints.kt index 6bc4c21e5..a143e7372 100644 --- a/patches/src/main/kotlin/app/revanced/patches/myexpenses/misc/pro/Fingerprints.kt +++ b/patches/src/main/kotlin/app/revanced/patches/myexpenses/misc/pro/Fingerprints.kt @@ -1,8 +1,9 @@ package app.revanced.patches.myexpenses.misc.pro -import app.revanced.patcher.fingerprint +import app.revanced.patcher.BytecodePatchContextMethodMatching.gettingFirstMutableMethodDeclaratively +import app.revanced.patcher.patch.BytecodePatchContext +import app.revanced.patcher.returnType -internal val isEnabledFingerprint = fingerprint { - returns("Z") - strings("feature", "feature.licenceStatus") +internal val BytecodePatchContext.isEnabledMethod by gettingFirstMutableMethodDeclaratively("feature", "feature.licenceStatus") { + returnType("Z") } \ No newline at end of file diff --git a/patches/src/main/kotlin/app/revanced/patches/myexpenses/misc/pro/UnlockProPatch.kt b/patches/src/main/kotlin/app/revanced/patches/myexpenses/misc/pro/UnlockProPatch.kt index bc85dc122..11f1460cd 100644 --- a/patches/src/main/kotlin/app/revanced/patches/myexpenses/misc/pro/UnlockProPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/myexpenses/misc/pro/UnlockProPatch.kt @@ -1,16 +1,14 @@ package app.revanced.patches.myexpenses.misc.pro import app.revanced.patcher.extensions.addInstructions -import app.revanced.patcher.patch.bytecodePatch +import app.revanced.patcher.patch.creatingBytecodePatch -@Suppress("unused") -val unlockProPatch = bytecodePatch( - name = "Unlock pro", -) { +@Suppress("unused", "ObjectPropertyName") +val `Unlock pro` by creatingBytecodePatch { compatibleWith("org.totschnig.myexpenses"("3.4.9")) apply { - isEnabledFingerprint.method.addInstructions( + isEnabledMethod.addInstructions( 0, """ const/4 v0, 0x1