Skip to content

Patch: Normalize onCardActivated payload (status/state + tokenId/serialNumber mismatch) #53

@maksibajo4

Description

@maksibajo4

The onCardActivated event returns different payload field names and different status values across iOS, Android, and the TypeScript definitions. This results in inconsistent behavior and type mismatches when handling the event.

Current behavior:

Android returns:

  • Keys: status, tokenId
  • Status value: "active"

iOS returns:

  • Keys: state, serialNumber
  • Status value: "activated"

TypeScript definitions expect:

  • Keys: actionStatus, tokenId
  • Status values: 'active' | 'canceled'

Because of these differences, apps cannot rely on a consistent payload shape or consistent status value.
The expected unified structure should be:

{
  tokenId: string;
  status: 'active' | 'canceled';

[@expensify+react-native-wallet+0.1.14.patch](https://github.com/user-attachments/files/23544616/%40expensify%2Breact-native-wallet%2B0.1.14.patch)

}

Patch Included

I have attached a .patch file that applies the following changes:

  • iOS: renamed state → status
  • iOS: renamed serialNumber → tokenId
  • TypeScript: renamed actionStatus → status
  • Unified status values across platforms (iOS previously returned "activated"; now standardized to "active")

Android already uses the correct keys but had a different status value, which is now aligned.

@expensify+react-native-wallet+0.1.14.patch

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions