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

feat: goerli #30

Merged
merged 5 commits into from
Oct 7, 2022
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
8 changes: 6 additions & 2 deletions .github/workflows/create-deploy-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,19 @@ on:
tags:
- "*"

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
build-deploy-production:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Use Node.js 14.x
- name: Use Node.js 16.x
uses: actions/setup-node@v1
with:
node-version: 14.x
node-version: 16.x
- name: yarn install & build
run: |
# https://github.com/yarnpkg/yarn/issues/2629
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/create-deploy-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,19 @@ name: "[Create] Deploy to staging"

on: [push]
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

starting on every push seems too much

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why that?

Copy link
Contributor Author

@benjlevesque benjlevesque Oct 7, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is what we do for every repo/CI


concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Use Node.js 14.x
- name: Use Node.js 16.x
uses: actions/setup-node@v1
with:
node-version: 14.x
node-version: 16.x
- name: yarn install & build
run: |
# https://github.com/yarnpkg/yarn/issues/2629
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/pay-deploy-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,19 @@ on:
tags:
- "*"

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
build-deploy-production:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Use Node.js 14.x
- name: Use Node.js 16.x
uses: actions/setup-node@v1
with:
node-version: 14.x
node-version: 16.x
- name: yarn install & build
run: |
# https://github.com/yarnpkg/yarn/issues/2629
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/pay-deploy-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,19 @@ name: "[Pay] Deploy to staging"

on: [push]

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Use Node.js 14.x
- name: Use Node.js 16.x
uses: actions/setup-node@v1
with:
node-version: 14.x
node-version: 16.x
- name: yarn install & build
run: |
# https://github.com/yarnpkg/yarn/issues/2629
Expand Down
6 changes: 3 additions & 3 deletions packages/create/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
"@material-ui/core": "^4.9.7",
"@material-ui/icons": "^4.9.1",
"@material-ui/lab": "^4.0.0-alpha.46",
"@requestnetwork/currency": "0.8.1-next.1787",
"@web3-react/core": "^6.0.7",
"@web3-react/injected-connector": "^6.0.7",
"@requestnetwork/currency": "^0.8.1-next.1581",
"ethers": "5.5.1",
"export-to-csv": "^0.2.1",
"formik": "^2.1.4",
Expand Down Expand Up @@ -48,7 +48,7 @@
]
},
"devDependencies": {
"@requestnetwork/types": "^0.35.1-next.1581",
"@requestnetwork/types": "0.35.1-next.1787",
"@testing-library/jest-dom": "^5.15.1",
"@testing-library/react": "^12.1.2",
"@testing-library/user-event": "^13.5.0",
Expand All @@ -61,4 +61,4 @@
"@types/testing-library__react": "^10.2.0",
"@types/yup": "^0.26.3"
}
}
}
23 changes: 10 additions & 13 deletions packages/create/src/components/CreateRequest.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ import Dot from "./Dot";
import { useWeb3React } from "@web3-react/core";
import { ChangeChainLink } from "./ChangeChainLink";

export type PaymentChain = "mainnet" | "xdai" | "matic" | "rinkeby";

export interface IFormData {
amount?: number;
payer?: string;
Expand All @@ -53,7 +51,7 @@ export interface IProps {
loading: boolean;
}

const useHeaderStyles = makeStyles(theme => ({
const useHeaderStyles = makeStyles((theme) => ({
container: {
height: 124,
width: "100%",
Expand Down Expand Up @@ -135,7 +133,7 @@ const Header = ({
);
};

const useBodyStyles = makeStyles(theme => ({
const useBodyStyles = makeStyles((theme) => ({
container: {
minHeight: 290,
width: "100%",
Expand Down Expand Up @@ -192,7 +190,7 @@ const CurrencyPicker = ({ className }: { className?: string }) => {
error={Boolean(meta.error)}
helperText={Boolean(meta.error) ? meta.error : " "}
SelectProps={{
renderValue: val => {
renderValue: (val) => {
const currency = currencyManager.fromId(val as string)!;
return (
<CurrencyPickerItem
Expand All @@ -208,7 +206,7 @@ const CurrencyPicker = ({ className }: { className?: string }) => {
}}
>
{getCurrenciesForPicker({
currencyFilter: ({ network }) => chainId === 4 || network !== "rinkeby",
currencyFilter: ({ network }) => chainId === 5 || network !== "goerli",
})}
</TextField>
);
Expand Down Expand Up @@ -309,9 +307,8 @@ const Footer = ({
account?: string;
disabled?: boolean;
}) => {
const { submitForm, isValid, values, isSubmitting } = useFormikContext<
IFormData
>();
const { submitForm, isValid, values, isSubmitting } =
useFormikContext<IFormData>();
return (
<>
<Hidden xsDown>
Expand Down Expand Up @@ -344,7 +341,7 @@ export const schema = Yup.object().shape<IFormData>({
payer: Yup.string().test(
"is-valid-recipient",
"Please enter a valid ENS or ETH address",
async function(value: string) {
async function (value: string) {
return (
!value ||
CurrencyManager.validateAddress(value, { type: "ETH" } as any) ||
Expand All @@ -356,14 +353,14 @@ export const schema = Yup.object().shape<IFormData>({
reason: Yup.string().test(
"is-valid-reason",
"Reason contains unsupported characters or symbols.",
val => {
(val) => {
return !val || isSimpleAscii(val);
}
),
paymentAddress: Yup.string().required("Required"),
});

const useStyles = makeStyles(theme => ({
const useStyles = makeStyles((theme) => ({
container: {
width: "100%",
background: "white",
Expand Down Expand Up @@ -409,7 +406,7 @@ export const CreateRequestForm = ({
onSubmit={onSubmit}
enableReinitialize
initialValues={{
currency: !network || network === 4 ? "FAU-rinkeby" : "DAI-mainnet",
currency: !network || network === 5 ? "FAU-goerli" : "DAI-mainnet",
amount: "" as any,
payer: "",
reason: "",
Expand Down
2 changes: 1 addition & 1 deletion packages/create/src/connectors.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { InjectedConnector } from "@web3-react/injected-connector";

export const injected = new InjectedConnector({
supportedChainIds: [1, 4, 100],
supportedChainIds: [1, 5, 100],
});
4 changes: 2 additions & 2 deletions packages/gnosis-safe/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"@material-ui/core": "^4.9.7",
"@material-ui/icons": "^4.9.1",
"@material-ui/lab": "^4.0.0-alpha.46",
"@requestnetwork/types": "^0.35.1-next.1581",
"@requestnetwork/types": "^0.35.1-next.1787",
"@testing-library/jest-dom": "^4.2.4",
"@testing-library/react": "^9.3.2",
"@testing-library/user-event": "^7.1.2",
Expand Down Expand Up @@ -54,4 +54,4 @@
"last 1 safari version"
]
}
}
}
2 changes: 1 addition & 1 deletion packages/gnosis-safe/src/connectors.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import { InjectedConnector } from "@web3-react/injected-connector";

export const injected = new InjectedConnector({ supportedChainIds: [1, 4] });
export const injected = new InjectedConnector({ supportedChainIds: [1, 5] });
4 changes: 2 additions & 2 deletions packages/pay/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
"@material-ui/core": "^4.9.7",
"@material-ui/icons": "^4.9.1",
"@material-ui/lab": "^4.0.0-alpha.46",
"@requestnetwork/payment-processor": "^0.37.1-next.1581",
"@requestnetwork/request-client.js": "^0.39.1-next.1581",
"@requestnetwork/payment-processor": "^0.37.1-next.1787",
"@requestnetwork/request-client.js": "^0.39.1-next.1787",
"@web3-react/core": "^6.0.7",
"@web3-react/injected-connector": "^6.0.7",
"@web3-react/walletconnect-connector": "^6.0.7",
Expand Down
2 changes: 1 addition & 1 deletion packages/pay/src/components/ErrorMessage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const getErrorMessage = (error: Error, request: IParsedRequest) => {
}
if (error instanceof UnsupportedChainIdError) {
const prefix =
request.currencyNetwork === "rinkeby" ? "This is a test request. " : "";
request.currencyNetwork === "goerli" ? "This is a test request. " : "";
const network = request.currencyNetwork || "";
const text = `connect your wallet to ${chainInfos[network].name}`;
return (
Expand Down
Loading