-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replaced event name string matching with ReactNative exported constan…
…ts (#164) * Exporting event name constants from Android and iOS, consuming in JS * Updated exported event names * Unique log name keys * overriding hasConstants * react native constants used by iOS SDK * merge fix
- Loading branch information
1 parent
41904e1
commit bc12d54
Showing
9 changed files
with
180 additions
and
130 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
android/src/main/java/com/stripeterminalreactnative/ReactNativeConstants.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package com.stripeterminalreactnative | ||
|
||
enum class ReactNativeConstants(val listenerName: String) { | ||
CHANGE_CONNECTION_STATUS("didChangeConnectionStatus"), | ||
CHANGE_PAYMENT_STATUS("didChangePaymentStatus"), | ||
FETCH_TOKEN_PROVIDER("onFetchTokenProviderListener"), | ||
FINISH_DISCOVERING_READERS("didFinishDiscoveringReaders"), | ||
FINISH_INSTALLING_UPDATE("didFinishInstallingUpdate"), | ||
REQUEST_READER_DISPLAY_MESSAGE("didRequestReaderDisplayMessage"), | ||
REQUEST_READER_INPUT("didRequestReaderInput"), | ||
REPORT_AVAILABLE_UPDATE("didReportAvailableUpdate"), | ||
REPORT_UNEXPECTED_READER_DISCONNECT("didReportUnexpectedReaderDisconnect"), | ||
REPORT_UPDATE_PROGRESS("didReportReaderSoftwareUpdateProgress"), | ||
START_INSTALLING_UPDATE("didStartInstallingUpdate"), | ||
UPDATE_DISCOVERED_READERS("didUpdateDiscoveredReaders"), | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.