Skip to content

Commit

Permalink
Fix version
Browse files Browse the repository at this point in the history
  • Loading branch information
grausof committed Nov 7, 2023
1 parent 0963105 commit 0ca9a69
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 22 deletions.
44 changes: 25 additions & 19 deletions example/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {
Button,
SafeAreaView,
Linking,
ScrollView,
} from "react-native";
import scenarios, { type ScenarioRunner } from "./scenarios";
import React, { useEffect } from "react";
Expand Down Expand Up @@ -37,25 +38,30 @@ export default function App() {

return (
<SafeAreaView style={styles.container}>
<TestScenario
title="Decode SD-JWT"
scenario={scenarios.decodeCredentialSdJwt}
/>
<TestScenario
title="Verify SD-JWT"
scenario={scenarios.verifyCredentialSdJwt}
/>
<TestScenario title="Decode PID" scenario={scenarios.decodePid} />
<TestScenario title="Verify PID" scenario={scenarios.verifyPid} />
<TestScenario title="Get WIA" scenario={scenarios.getAttestation} />
<TestScenario title="Get PID" scenario={scenarios.getPid} />
<TestScenario title="Get Credential" scenario={scenarios.getCredential} />
<TestScenario title="Decode QR from RP" scenario={scenarios.decodeQR} />
<TestScenario
title="Fetch Entity Statement"
scenario={scenarios.getEntityStatement}
/>
<TestSameDeviceFlowScenarioWithDeepLink deeplink={deeplink} />
<ScrollView>
<TestScenario
title="Decode SD-JWT"
scenario={scenarios.decodeCredentialSdJwt}
/>
<TestScenario
title="Verify SD-JWT"
scenario={scenarios.verifyCredentialSdJwt}
/>
<TestScenario title="Decode PID" scenario={scenarios.decodePid} />
<TestScenario title="Verify PID" scenario={scenarios.verifyPid} />
<TestScenario title="Get WIA" scenario={scenarios.getAttestation} />
<TestScenario title="Get PID" scenario={scenarios.getPid} />
<TestScenario
title="Get Credential"
scenario={scenarios.getCredential}
/>
<TestScenario title="Decode QR from RP" scenario={scenarios.decodeQR} />
<TestScenario
title="Fetch Entity Statement"
scenario={scenarios.getEntityStatement}
/>
<TestSameDeviceFlowScenarioWithDeepLink deeplink={deeplink} />
</ScrollView>
</SafeAreaView>
);
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@pagopa/io-react-native-wallet",
"version": "0.9.2",
"version": "0.9.3",
"description": "Provide data structures, helpers and API for IO Wallet",
"main": "lib/commonjs/index",
"module": "lib/module/index",
Expand Down
6 changes: 4 additions & 2 deletions src/utils/misc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@ import { IoWalletError } from "./errors";
*/
export const hasStatus =
(status: number) =>
(res: Response): Response => {
async (res: Response): Promise<Response> => {
if (res.status !== status) {
throw new IoWalletError(
`Http request failed. Expected ${status}, got ${res.status}, url: ${res.url}`
`Http request failed. Expected ${status}, got ${res.status}, url: ${
res.url
} with response: ${await res.text()}`
);
}
return res;
Expand Down

0 comments on commit 0ca9a69

Please sign in to comment.