-
Notifications
You must be signed in to change notification settings - Fork 128
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #186 from gnosis/development
Safe Apps Developer Tools Release 9
- Loading branch information
Showing
96 changed files
with
2,219 additions
and
2,709 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
dist | ||
build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
module.exports = { | ||
parser: "@typescript-eslint/parser", | ||
extends: [ | ||
"plugin:@typescript-eslint/recommended", | ||
"prettier", | ||
"react-app", | ||
"plugin:jsx-a11y/recommended", | ||
], | ||
plugins: ["jsx-a11y"], | ||
parserOptions: { | ||
ecmaVersion: 2018, | ||
sourceType: "module", | ||
}, | ||
rules: { | ||
"@typescript-eslint/camelcase": "off", | ||
"@typescript-eslint/no-var-requires": "off", | ||
"@typescript-eslint/no-unused-vars": [ | ||
"error", | ||
{ ignoreRestSiblings: true }, | ||
], | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"printWidth": 120, | ||
"trailingComma": "all", | ||
"singleQuote": true, | ||
"semi": false | ||
} |
24 changes: 0 additions & 24 deletions
24
packages/cra-template-safe-app/template/config-overrides.js
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { render, screen } from './tests/utils' | ||
import App from './App' | ||
|
||
test('renders learn loading screen', () => { | ||
render(<App />) | ||
const waitingHeading = screen.getByText(/Waiting for Safe/i) | ||
expect(waitingHeading).toBeInTheDocument() | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// App is an express application, we can add an express middleware that will set headers for manifest.json request | ||
// https://create-react-app.dev/docs/proxying-api-requests-in-development/#configuring-the-proxy-manually | ||
|
||
module.exports = function (app) { | ||
app.use("/manifest.json", function (req, res, next) { | ||
res.set({ | ||
"Access-Control-Allow-Origin": "*", | ||
"Access-Control-Allow-Methods": "GET", | ||
"Access-Control-Allow-Headers": | ||
"X-Requested-With, content-type, Authorization", | ||
}) | ||
|
||
next() | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
packages/cra-template-safe-app/template/src/tests/utils.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import { FC, ReactElement } from 'react' | ||
import { render, RenderOptions, RenderResult } from '@testing-library/react' | ||
import { ThemeProvider } from 'styled-components' | ||
import { theme, Title } from '@gnosis.pm/safe-react-components' | ||
import SafeProvider from '@gnosis.pm/safe-apps-react-sdk' | ||
|
||
const AllTheProviders: FC = ({ children }) => { | ||
return ( | ||
<ThemeProvider theme={theme}> | ||
<SafeProvider | ||
loader={ | ||
<> | ||
<Title size="md">Waiting for Safe...</Title> | ||
</> | ||
} | ||
> | ||
{children} | ||
</SafeProvider> | ||
</ThemeProvider> | ||
) | ||
} | ||
|
||
const customRender = (ui: ReactElement, options?: Omit<RenderOptions, 'queries'>): RenderResult => | ||
render(ui, { wrapper: AllTheProviders, ...options }) | ||
|
||
export * from '@testing-library/react' | ||
|
||
export { customRender as render } |
Oops, something went wrong.