Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ The library offers seven functions for seamless integration and use of the Apple
| **AndroidResumeCardData** | Simplified data structure for resuming card addition to Google Wallet using existing token reference ID. | `network: string`,<br>`tokenReferenceID: string`,<br>`cardHolderName?: string`,<br>`lastDigits?: string` |
| **UserAddress** | Structured address used for cardholder verification. | `name: string`,<br>`addressOne: string`,<br>`addressTwo: string`,<br>`city: string`,<br>`administrativeArea: string`,<br>`countryCode: string`,<br>`postalCode: string`,<br>`phoneNumber: string` |
| **IOSCardData** | Data related to a card that is to be added on iOS platform. | `network: string`,<br>`activationData: string`,<br>`encryptedPassData: string`,<br>`ephemeralPublicKey: string`,<br>`cardHolderTitle: string`,<br>`cardHolderName: string`,<br>`lastDigits: string`,<br>`cardDescription: string`,<br>`cardDescriptionComment: string` |
| **onCardActivatedPayload** | Data used by listener to notice when a cards status changes. | `tokenId: string`,<br> `actionStatus: 'activated' \| 'canceled'`<br> |
| **onCardActivatedPayload** | Data used by listener to notice when a card's status changes. | `tokenId: string`,<br> `status: 'activated' \| 'canceled'`<br> |
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess CardStatus type should also be changed?

Image

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think no, here we have card state, but from the event listener, we are getting a status of the provisioning (success -> activated / failure -> canceled)

| **IOSIssuerCallback** | This callback is invoked with a nonce, its signature, and a certificate array obtained from Apple. It is expected that you will forward these details to your server or the card issuer's API to securely encrypt the payload required for adding cards to the Apple Wallet. | `(nonce: string, nonceSignature: string, certificate: string[]) => IOSEncryptPayload` |
| **IOSEncryptPayload** | An object containing the necessary elements to complete the addition of a card to Apple Wallet. | `encryptedPassData: string`,<br>`activationData: string`,<br>`ephemeralPublicKey: string` |
| **TokenInfo** | Information about a token stored in Google Wallet. | `identifier: string`,<br>`lastDigits: string`,<br>`tokenState: number` |
Expand Down
2 changes: 1 addition & 1 deletion android/src/main/java/com/expensify/wallet/WalletModule.kt
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ class WalletModule internal constructor(context: ReactApplicationContext) :
sendEvent(
context,
OnCardActivatedEvent.NAME,
OnCardActivatedEvent("active", tokenId).toMap()
OnCardActivatedEvent("activated", tokenId).toMap()
)
pendingPushTokenizePromise?.resolve(TokenizationStatus.SUCCESS.code)
}
Expand Down
6 changes: 3 additions & 3 deletions ios/WalletManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ open class WalletManager: UIViewController {
for pass in passes {
if pass.secureElementPass?.passActivationState == .activated {
delegate?.sendEvent(name: Event.onCardActivated.rawValue, result: [
"state": "activated",
"serialNumber": pass.serialNumber
"status": "activated",
"tokenId": pass.serialNumber
]);
}
}
Expand Down Expand Up @@ -253,7 +253,7 @@ extension WalletManager: PKAddPaymentPassViewControllerDelegate {
if error != nil {
self.logInfo(message: "Error: \(errorMessage)")
delegate?.sendEvent(name: Event.onCardActivated.rawValue, result: [
"state": "canceled"
"status": "canceled"
]);
}

Expand Down
2 changes: 1 addition & 1 deletion src/NativeWallet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ type IOSCardData = {

type onCardActivatedPayload = {
tokenId: string;
actionStatus: 'active' | 'canceled';
status: 'activated' | 'canceled';
};

type IOSAddPaymentPassData = {
Expand Down
Loading