Skip to content

Commit

Permalink
Merge pull request #1592 from Adyen/fix/config-obfuscation
Browse files Browse the repository at this point in the history
Fix crash caused by obfuscation of action configurations
  • Loading branch information
OscarSpruit authored May 1, 2024
2 parents b937ea4 + 6320c6c commit c082d19
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
- Fixed various memory leaks.
- Drop-in no longer overrides the log level in case of debug builds.
- Address Lookup not displaying validation error on Card Component when no address has been selected.
- Actions no longer crash when your app uses obfuscation.

## Changed
- Flags are replaced by ISO codes in the phone number inputs (affected payment methods: MB Way, Pay Easy, Convenience Stores Japan, Online Banking Japan and Seven-Eleven).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ class CheckoutConfiguration(

@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
fun addActionConfiguration(configuration: Configuration) {
availableConfigurations[configuration::class.java.simpleName] = configuration
availableConfigurations[configuration::class.java.name] = configuration
}

@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
Expand All @@ -120,7 +120,7 @@ class CheckoutConfiguration(
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
fun <T : Configuration> getActionConfiguration(configClass: Class<T>): T? {
@Suppress("UNCHECKED_CAST")
return availableConfigurations[configClass.simpleName] as? T
return availableConfigurations[configClass.name] as? T
}

override fun writeToParcel(dest: Parcel, flags: Int) {
Expand Down

0 comments on commit c082d19

Please sign in to comment.