Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: merging global error toast with client lib + some refactoring #938

Merged
merged 7 commits into from
Feb 15, 2023
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
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,8 @@ test: unit check-code

codegen:
yarn dev:codegen

reset-ios:
yarn cache:clear
yarn install
yarn ios
Empty file.
3 changes: 0 additions & 3 deletions __mocks__/react-native-device-info.js

This file was deleted.

26 changes: 0 additions & 26 deletions __mocks__/react-native-firebase.js

This file was deleted.

3 changes: 0 additions & 3 deletions __mocks__/react-native-geetest-module.js

This file was deleted.

5 changes: 0 additions & 5 deletions __mocks__/react-native-iphone-x-helper.js

This file was deleted.

27 changes: 0 additions & 27 deletions __mocks__/react-native-secure-key-store.js

This file was deleted.

10 changes: 0 additions & 10 deletions __mocks__/react-navigation-native.js

This file was deleted.

3 changes: 0 additions & 3 deletions __mocks__/react-navigation-stack.js

This file was deleted.

147 changes: 0 additions & 147 deletions __tests__/screens/global-error.spec.tsx

This file was deleted.

2 changes: 0 additions & 2 deletions app/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import { Dimensions } from "react-native"
import ErrorBoundary from "react-native-error-boundary"
import EStyleSheet from "react-native-extended-stylesheet"
import { RootSiblingParent } from "react-native-root-siblings"
import { GlobalErrorToast } from "./components/global-error"
import { RootStack } from "./navigation/root-navigator"
import { ErrorScreen } from "./screens/error-screen"
import { ThemeProvider } from "@rneui/themed"
Expand Down Expand Up @@ -60,7 +59,6 @@ export const App = () => (
<RootSiblingParent>
<AppStateWrapper />
<NotificationComponent />
<GlobalErrorToast />
<RootStack />
<GaloyToast />
</RootSiblingParent>
Expand Down
1 change: 0 additions & 1 deletion app/components/global-error/index.ts

This file was deleted.

33 changes: 17 additions & 16 deletions app/components/wallet-summary/wallet-summary.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,28 @@ import { storiesOf } from "@storybook/react-native"
import { Story, StoryScreen, UseCase } from "../../../.storybook/views"
import { WalletSummary } from "./wallet-summary"
import { WalletType } from "@app/utils/enum"
import { MockedProvider } from "@apollo/client/testing"

declare let module

storiesOf("Wallet Summary", module)
.addDecorator((fn) => <StoryScreen>{fn()}</StoryScreen>)
.addDecorator((fn) => <MockedProvider><StoryScreen>{fn()}</StoryScreen></MockedProvider>)
.add("Style Presets", () => (
<Story>
<UseCase text="BTC" usage="The default.">
<WalletSummary
amountType="SEND"
walletType={WalletType.BTC}
usdBalanceInDollars={129.2}
btcBalanceInSats={2000}
/>
</UseCase>
<UseCase text="USD" usage="The default.">
<WalletSummary
amountType="SEND"
walletType={WalletType.USD}
usdBalanceInDollars={129.2}
/>
</UseCase>
<UseCase text="BTC" usage="The default.">
<WalletSummary
amountType="SEND"
walletType={WalletType.BTC}
usdBalanceInDollars={129.2}
btcBalanceInSats={2000}
/>
</UseCase>
<UseCase text="USD" usage="The default.">
<WalletSummary
amountType="SEND"
walletType={WalletType.USD}
usdBalanceInDollars={129.2}
/>
</UseCase>
</Story>
))
Loading