diff --git a/example/src/App.tsx b/example/src/App.tsx index 3ca87486..6b434d69 100644 --- a/example/src/App.tsx +++ b/example/src/App.tsx @@ -5,6 +5,7 @@ import { Button, SafeAreaView, Linking, + ScrollView, } from "react-native"; import scenarios, { type ScenarioRunner } from "./scenarios"; import React, { useEffect } from "react"; @@ -37,25 +38,30 @@ export default function App() { return ( - - - - - - - - - - + + + + + + + + + + + + ); } diff --git a/package.json b/package.json index 5018027f..200abb50 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/src/utils/misc.ts b/src/utils/misc.ts index 97c1b111..d93d6c21 100644 --- a/src/utils/misc.ts +++ b/src/utils/misc.ts @@ -7,10 +7,12 @@ import { IoWalletError } from "./errors"; */ export const hasStatus = (status: number) => - (res: Response): Response => { + async (res: Response): Promise => { 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;