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

merge main with it fixes and updates from last 9 months #581

Open
wants to merge 69 commits into
base: release
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
69 commits
Select commit Hold shift + click to select a range
948af55
chore(deps): update typescript-eslint monorepo to ^7.0.2 (#506)
renovate[bot] Feb 19, 2024
d5b357c
chore(deps): update dependency @types/react to ^18.2.57 (#507)
renovate[bot] Feb 20, 2024
62af36a
chore(deps): update dependency @types/react to ^18.2.58 (#508)
renovate[bot] Feb 23, 2024
866207e
chore: makes uniresolver endpoint configurable (#510)
ggera Feb 28, 2024
715294c
chore(deps): update dependency @types/react to ^18.2.60 (#511)
renovate[bot] Feb 28, 2024
25efa1d
fix(deps): update dependency ky to ^1.2.1 (#512)
renovate[bot] Feb 28, 2024
9cfffdb
chore(deps): update dependency @types/react to ^18.2.61 (#514)
renovate[bot] Feb 29, 2024
bd328e5
chore(deps): update dependency eslint to ^8.57.0 (#509)
renovate[bot] Feb 29, 2024
19cd5f7
fix(deps): update dependency ky to ^1.2.2 (#515)
renovate[bot] Feb 29, 2024
1e895c0
chore(deps): update typescript-eslint monorepo to ^7.1.0 (#513)
renovate[bot] Mar 1, 2024
6e64eca
chore(deps): update dependency eslint-plugin-react to ^7.34.0 (#516)
renovate[bot] Mar 4, 2024
4e28959
chore(deps): update dependency @types/react to ^18.2.62 (#517)
renovate[bot] Mar 4, 2024
f38e4ff
chore(deps): update typescript-eslint monorepo to ^7.1.1 (#518)
renovate[bot] Mar 5, 2024
ff71d90
chore(deps): update react monorepo (#519)
renovate[bot] Mar 5, 2024
187dc05
chore(deps): update dependency typescript to ^5.4.2 (#520)
renovate[bot] Mar 6, 2024
ea8079f
chore(deps): update react monorepo (#521)
renovate[bot] Mar 7, 2024
080ad34
chore(deps): update dependency eslint-plugin-vitest to ^0.3.24 (#522)
renovate[bot] Mar 8, 2024
7d36340
chore(deps): update dependency eslint-plugin-vitest to ^0.3.25 (#523)
renovate[bot] Mar 11, 2024
21be413
chore(deps): update typescript-eslint monorepo to ^7.2.0 (#524)
renovate[bot] Mar 11, 2024
ce94364
chore(deps): update dependency @types/react to ^18.2.65 (#525)
renovate[bot] Mar 12, 2024
8f957b2
chore(deps): update dependency eslint-plugin-vitest to ^0.3.26 (#526)
renovate[bot] Mar 12, 2024
334873d
chore(deps): update dependency @types/react-dom to ^18.2.22 (#527)
renovate[bot] Mar 13, 2024
b16eece
chore(deps): update dependency @types/react to ^18.2.66 (#528)
renovate[bot] Mar 14, 2024
5eaf0b3
chore(deps): update dependency eslint-plugin-react to ^7.34.1 (#529)
renovate[bot] Mar 16, 2024
a6b10d9
chore(deps): update dependency postcss to ^8.4.36 (#530)
renovate[bot] Mar 18, 2024
fad87b3
chore(deps): update dependency @types/react to ^18.2.67 (#531)
renovate[bot] Mar 18, 2024
f4c08ab
chore(deps): update dependency postcss to ^8.4.37 (#533)
renovate[bot] Mar 19, 2024
4c15ff7
chore(deps): update dependency eslint-plugin-astro to ^0.32.0 (#534)
renovate[bot] Mar 20, 2024
ea50d5d
chore(deps): update dependency typescript to ^5.4.3 (#535)
renovate[bot] Mar 20, 2024
60459ac
chore(deps): update dependency postcss to ^8.4.38 (#536)
renovate[bot] Mar 21, 2024
043efa3
chore(deps): update dependency @types/react to ^18.2.69 (#537)
renovate[bot] Mar 23, 2024
796fc12
chore(deps): update dependency stylelint to ^16.3.0 (#538)
renovate[bot] Mar 24, 2024
c3f0d0d
fix(deps): update dependency ky to ^1.2.3 (#539)
renovate[bot] Mar 24, 2024
a0e18fb
chore(deps): update dependency eslint-plugin-astro to ^0.33.0 (#540)
renovate[bot] Mar 25, 2024
7145172
chore(deps): update dependency @types/react to ^18.2.70 (#541)
renovate[bot] Mar 25, 2024
12b3c13
chore(deps): update dependency eslint-plugin-astro to ^0.33.1 (#542)
renovate[bot] Mar 25, 2024
f1c0a64
chore(deps): update dependency eslint-plugin-vitest to ^0.4.0 (#543)
renovate[bot] Mar 25, 2024
c591a28
chore(deps): update dependency @types/react to ^18.2.71 (#544)
renovate[bot] Mar 26, 2024
e3ec573
chore(deps): update dependency stylelint to ^16.3.1 (#545)
renovate[bot] Mar 26, 2024
6d796ec
chore(deps): update dependency @types/react to ^18.2.72 (#547)
renovate[bot] Mar 27, 2024
5770641
chore(deps): update dependency @types/react to ^18.2.73 (#548)
renovate[bot] Mar 27, 2024
024ff71
chore(deps): update node.js to >=20.12.0 (#546)
renovate[bot] Mar 27, 2024
c133c57
chore(deps): update dependency @types/react-dom to ^18.2.23 (#549)
renovate[bot] Mar 28, 2024
3ec2904
chore(deps): update dependency eslint-plugin-vitest to ^0.4.1 (#550)
renovate[bot] Mar 31, 2024
3b4d1fd
chore(deps): update dependency @types/react to ^18.2.74 (#551)
renovate[bot] Apr 2, 2024
dc7864c
chore(deps): update dependency @types/react-dom to ^18.2.24 (#553)
renovate[bot] Apr 4, 2024
f71c951
chore(deps): update dependency typescript to ^5.4.4 (#554)
renovate[bot] Apr 4, 2024
dde17bf
chore(deps): update node.js to >=20.12.1 (#552)
renovate[bot] Apr 5, 2024
88baeb9
chore(deps): update dependency eslint-plugin-astro to ^0.34.0 (#556)
renovate[bot] Apr 6, 2024
dc25d84
chore(deps): update dependency eslint-plugin-n to v17 (#557)
renovate[bot] Apr 8, 2024
dcaecbe
chore(deps): update dependency @types/react to ^18.2.75 (#558)
renovate[bot] Apr 9, 2024
9139861
chore(deps): update dependency typescript to ^5.4.5 (#560)
renovate[bot] Apr 10, 2024
0211d94
chore(deps): update react monorepo (#562)
renovate[bot] Apr 12, 2024
338a8e8
chore(deps): update node.js to >=20.12.2 (#561)
renovate[bot] Apr 12, 2024
6126651
chore(deps): update dependency @types/react to ^18.2.78 (#563)
renovate[bot] Apr 13, 2024
dbf67ad
fix(deps): update dependency react-router-dom to v6.22.3 (#564)
renovate[bot] Apr 14, 2024
eef3198
chore(deps): update dependency @types/react to ^18.2.79 (#565)
renovate[bot] Apr 16, 2024
531a428
fix(deps): update dependency ky to ^1.2.4 (#566)
renovate[bot] Apr 22, 2024
5575fd4
chore(deps): update dependency stylelint to ^16.4.0 (#567)
renovate[bot] Apr 23, 2024
e77796f
fix(deps): update dependency react-router-dom to v6.23.0 (#568)
renovate[bot] Apr 23, 2024
2445569
chore(deps): update react monorepo (#570)
renovate[bot] Apr 26, 2024
0604b49
chore(deps): update dependency eslint-plugin-astro to v1 (#571)
renovate[bot] Apr 26, 2024
655aa28
chore(deps): update react monorepo (#572)
renovate[bot] Apr 27, 2024
6aeead5
chore(deps): update dependency eslint-plugin-astro to ^1.1.0 (#573)
renovate[bot] Apr 29, 2024
8441167
chore(deps): update dependency eslint-plugin-astro to ^1.1.1 (#574)
renovate[bot] Apr 30, 2024
f829c16
chore(deps): update dependency eslint-plugin-astro to ^1.1.2 (#575)
renovate[bot] May 2, 2024
db281af
chore(deps): update dependency stylelint to ^16.5.0 (#576)
renovate[bot] May 2, 2024
bfbb8f1
chore(deps): update node.js to >=20.13.0 (#578)
renovate[bot] May 9, 2024
82801b1
feat: envis for txd and checkout-service URLs (#580)
kilted-andres Oct 23, 2024
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
3 changes: 3 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
REACT_APP_CHAIN_ENDPOINT=wss://peregrine.kilt.io
REACT_APP_UNIRESOLVER_ENDPOINT=https://dev-uniresolver.kilt.io
REACT_APP_CHECKOUT_URL=https://dev-checkout.kilt.io
REACT_APP_TXD_URL=https://txd-dev.trusted-entity.io
REACT_APP_MAINTENANCE=false
REACT_APP_IS_TEST_ENV=false
36 changes: 18 additions & 18 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,44 +19,44 @@
"@polkadot/api": "^10.11.1",
"@polkadot/extension-dapp": "^0.46.6",
"@polkadot/util-crypto": "^12.6.1",
"ky": "^1.2.0",
"ky": "^1.2.4",
"lodash-es": "^4.17.21",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-router-dom": "6",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-router-dom": "6.23.0",
"swr": "^2.2.2"
},
"devDependencies": {
"@parcel/transformer-svg-react": "^2.7.0",
"@types/lodash-es": "^4.17.12",
"@types/react": "^18.2.56",
"@types/react-dom": "^18.2.19",
"@typescript-eslint/eslint-plugin": "^7.0.1",
"@typescript-eslint/parser": "^7.0.1",
"@types/react": "^18.3.1",
"@types/react-dom": "^18.3.0",
"@typescript-eslint/eslint-plugin": "^7.2.0",
"@typescript-eslint/parser": "^7.2.0",
"buffer": "^6.0.3",
"bundlewatch": "^0.3.3",
"eslint": "^8.56.0",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
"eslint-config-standard-with-typescript": "^40.0.0",
"eslint-import-resolver-typescript": "^3.6.1",
"eslint-plugin-astro": "^0.31.4",
"eslint-plugin-astro": "^1.1.2",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-n": "^15.0.0 || ^16.0.0 ",
"eslint-plugin-n": "^15.0.0 || ^16.0.0 || ^17.0.0",
"eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-promise": "^6.1.1",
"eslint-plugin-react": "^7.33.2",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-vitest": "^0.3.22",
"eslint-plugin-react": "^7.34.1",
"eslint-plugin-react-hooks": "^4.6.2",
"eslint-plugin-vitest": "^0.4.1",
"events": "^3.3.0",
"parcel": "^2.7.0",
"postcss": "^8.4.35",
"postcss": "^8.4.38",
"prettier": "3.1.1",
"process": "^0.11.10",
"stylelint": "^16.2.1",
"stylelint": "^16.5.0",
"stylelint-config-css-modules": "^4.4.0",
"stylelint-config-standard": "^36.0.0",
"typed-css-modules": "^0.9.1",
"typescript": "^5.3.3",
"typescript": "^5.4.5",
"typescript-plugin-css-modules": "^5.1.0"
},
"browserslist": {
Expand All @@ -79,6 +79,6 @@
}
},
"engines": {
"node": ">=20.11.1"
"node": ">=20.13.0"
}
}
7 changes: 5 additions & 2 deletions src/Components/VerificationMethod/VerificationMethod.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ interface Props {
did?: DidUri;
}

export const uniresolverEndpoint = process.env
.REACT_APP_UNIRESOLVER_ENDPOINT as string;

export const VerificationMethod = (props: Props) => {
return (
<div className={styles.container}>
Expand All @@ -17,11 +20,11 @@ export const VerificationMethod = (props: Props) => {
</span>
<a
className={styles.anchor}
href={`https://dev.uniresolver.io/#${props.did}`}
href={`${uniresolverEndpoint}/#${props.did}`}
target="_blank"
rel="noreferrer"
>
{`https://dev.uniresolver.io/#\n${props.did}`}
{`${uniresolverEndpoint}/#\n${props.did}`}
</a>
</div>
</div>
Expand Down
36 changes: 12 additions & 24 deletions src/Utils/useTXDTransmitter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,15 @@ import ky from 'ky';

import { type KiltAddress } from '@kiltprotocol/sdk-js';

import { endpoint } from './claimWeb3name-helpers';

const txdUrls: Record<string, string> = {
'wss://kilt-rpc.dwellir.com': 'https://txd.trusted-entity.io',
'wss://spiritnet.kilt.io': 'https://txd.trusted-entity.io',
'wss://spiritnet.api.onfinality.io/public-ws':
'https://txd.trusted-entity.io',
'wss://peregrine.kilt.io': 'https://dev.txd.trusted-entity.io',
'wss://peregrine-stg.kilt.io/para': 'https://smoke.txd.trusted-entity.io',
};
export const checkoutServiceURL = process.env.REACT_APP_CHECKOUT_URL as string;
if (!checkoutServiceURL) {
throw new Error('No URL for the Checkout Service provided.');
}

const checkoutUrls: Record<string, string> = {
'wss://kilt-rpc.dwellir.com': 'https://checkout.kilt.io',
'wss://spiritnet.kilt.io': 'https://checkout.kilt.io',
'wss://spiritnet.api.onfinality.io/public-ws': 'https://checkout.kilt.io',
'wss://peregrine.kilt.io': 'https://dev.checkout.kilt.io',
'wss://peregrine-stg.kilt.io/para': 'https://smoke.checkout.kilt.io',
};
const txdUrl = process.env.REACT_APP_TXD_URL as string;
if (!txdUrl) {
throw new Error('No URL for the Transaction Daemon provided.');
}

function useApi<Output>(key: Key) {
return useSWR<Output, string | Error>(
Expand All @@ -29,15 +20,12 @@ function useApi<Output>(key: Key) {
);
}

export const checkoutServiceURL = checkoutUrls[endpoint];

export function useApiTXDAddress() {
const txdUrl = txdUrls[endpoint];
return useApi<{ paymentAddress: KiltAddress }>(`${txdUrl}/meta`);
}

export function useApiTXDCosts() {
return useApi<{ did: string; w3n: string }>(
`${checkoutServiceURL}/api/costs`,
);
}

export function useApiTXDAddress() {
return useApi<{ paymentAddress: KiltAddress }>(`${txdUrl}/meta`);
}
Loading