Skip to content
Merged
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
4 changes: 1 addition & 3 deletions dapps/pos-app/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -681,9 +681,7 @@ import { secureStorage, SECURE_STORAGE_KEYS } from "@/utils/secure-storage";
await secureStorage.setItem(SECURE_STORAGE_KEYS.PARTNER_API_KEY, apiKey);

// Retrieve
const apiKey = await secureStorage.getItem(
SECURE_STORAGE_KEYS.PARTNER_API_KEY,
);
const apiKey = await secureStorage.getItem(SECURE_STORAGE_KEYS.PARTNER_API_KEY);
```

## Code Quality Guidelines
Expand Down
4 changes: 2 additions & 2 deletions dapps/pos-app/__tests__/store/useSettingsStore.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ describe("useSettingsStore", () => {
describe("initial state", () => {
it("should have default theme mode", () => {
const { themeMode } = useSettingsStore.getState();
expect(themeMode).toBe("light");
expect(themeMode).toBe("system");
});

it("should have empty device ID", () => {
Expand Down Expand Up @@ -579,7 +579,7 @@ describe("useSettingsStore", () => {

// Check persist name and version are set (for storage key)
expect(persistOptions?.name).toBe("settings");
expect(persistOptions?.version).toBe(11);
expect(persistOptions?.version).toBe(12);

// Verify storage is configured (MMKV in production, mock in tests)
expect(persistOptions?.storage).toBeDefined();
Expand Down
12 changes: 9 additions & 3 deletions dapps/pos-app/__tests__/utils/secure-storage.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ describe("migratePartnerApiKey", () => {
"partner_api_key",
"test-api-key-123",
);
expect(SecureStore.deleteItemAsync).toHaveBeenCalledWith("merchant_api_key");
expect(SecureStore.deleteItemAsync).toHaveBeenCalledWith(
"merchant_api_key",
);
});

it("should not overwrite existing new key", async () => {
Expand All @@ -50,7 +52,9 @@ describe("migratePartnerApiKey", () => {
"partner_api_key",
expect.anything(),
);
expect(SecureStore.deleteItemAsync).toHaveBeenCalledWith("merchant_api_key");
expect(SecureStore.deleteItemAsync).toHaveBeenCalledWith(
"merchant_api_key",
);
});

it("should do nothing when old key does not exist", async () => {
Expand Down Expand Up @@ -86,7 +90,9 @@ describe("migratePartnerApiKey", () => {

// Should not have attempted to read/write secure storage for migration
// (only the setup call above)
expect(SecureStore.getItemAsync).not.toHaveBeenCalledWith("merchant_api_key");
expect(SecureStore.getItemAsync).not.toHaveBeenCalledWith(
"merchant_api_key",
);
});

it("should properly clean up old key after migration", async () => {
Expand Down
2 changes: 1 addition & 1 deletion dapps/pos-app/__tests__/utils/store-helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { useLogsStore } from "@/store/useLogsStore";
*/
export function resetSettingsStore() {
useSettingsStore.setState({
themeMode: "light",
themeMode: "system",
deviceId: "",
variant: "default",
_hasHydrated: false,
Expand Down
2 changes: 1 addition & 1 deletion dapps/pos-app/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"android.permission.BLUETOOTH_ADVERTISE",
"android.permission.USB_PERMISSION"
],
"versionCode": 16
"versionCode": 17
},
"web": {
"output": "static",
Expand Down
2 changes: 1 addition & 1 deletion dapps/pos-app/app/payment-success.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ export default function PaymentSuccessScreen() {
</Button>
</View>
</Animated.View>
<StatusBar style={themeMode} />
<StatusBar style={themeMode === "system" ? "auto" : themeMode} />
</View>
);
}
Expand Down
Loading