Skip to content

Commit

Permalink
chore: update pjs api deps (#1139)
Browse files Browse the repository at this point in the history
  • Loading branch information
chidg authored Jun 12, 2024
1 parent de1bcce commit 98303f3
Show file tree
Hide file tree
Showing 7 changed files with 290 additions and 101 deletions.
4 changes: 2 additions & 2 deletions apps/portal/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
"@emotion/styled": "^11.11.0",
"@polkadot-onboard/core": "^1.1.0",
"@polkadot-onboard/injected-wallets": "^1.1.0",
"@polkadot/api": "^10.13.1",
"@polkadot/api-contract": "^10.13.1",
"@polkadot/api": "^11.2.1",
"@polkadot/api-contract": "^11.2.1",
"@polkadot/extension-dapp": "^0.47.1",
"@polkawallet/bridge": "^0.1.7-0",
"@recoiljs/refine": "^0.1.1",
Expand Down
7 changes: 5 additions & 2 deletions apps/portal/src/domains/chains/recoils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,24 @@ import { Decimal } from '@talismn/math'
import { useContext } from 'react'
import { atom, selector, selectorFamily, waitForAll, type RecoilValueReadOnly } from 'recoil'

const CHAINDATA_API = import.meta.env.REACT_APP_CHAINDATA
if (!CHAINDATA_API && import.meta.env.DEV) throw new Error('env var REACT_APP_CHAINDATA not set')

export const chainState = selectorFamily({
key: 'Chain',
get:
({ genesisHash }: { genesisHash: string }) =>
async () =>
nullToUndefined(
await (
fetch(new URL(`./chains/byGenesisHash/${genesisHash}.json`, import.meta.env.REACT_APP_CHAINDATA)).then(
fetch(new URL(`./chains/byGenesisHash/${genesisHash}.json`, CHAINDATA_API)).then(
async x => await x.json()
) as Promise<ChainData>
).then(async x => ({
...x,
nativeToken: await Maybe.of(x.nativeToken).mapOrUndefined(
async token =>
await fetch(new URL(`./tokens/byId/${token.id}.json`, import.meta.env.REACT_APP_CHAINDATA)).then(
await fetch(new URL(`./tokens/byId/${token.id}.json`, CHAINDATA_API)).then(
async response => (await response.json()) as IToken
)
),
Expand Down
4 changes: 2 additions & 2 deletions apps/swap/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"zod": "^3.23.5"
},
"devDependencies": {
"@polkadot/api": "^10.13.1",
"@polkadot/api": "^11.2.1",
"@talismn/eslint-config": "workspace:^",
"@talismn/tsconfig": "workspace:^",
"@vitejs/plugin-react": "^4.2.1",
Expand All @@ -33,7 +33,7 @@
"vite": "^5.2.8"
},
"peerDependencies": {
"@polkadot/api": "10.x",
"@polkadot/api": "11.x",
"jotai": "2.x",
"react": "18.x",
"viem": "2.x"
Expand Down
16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@
"turbo": "^1.13.3"
},
"resolutions": {
"@polkadot/api-augment": "^10.13.1",
"@polkadot/api-derive": "^10.13.1",
"@polkadot/api-augment": "^11.2.1",
"@polkadot/api-derive": "^11.2.1",
"@polkadot/keyring": "^12.6.2",
"@polkadot/rpc-augment": "^10.13.1",
"@polkadot/types": "^10.13.1",
"@polkadot/types-augment": "^10.13.1",
"@polkadot/types-codec": "^10.13.1",
"@polkadot/types-create": "^10.13.1",
"@polkadot/types-known": "^10.13.1",
"@polkadot/rpc-augment": "^11.2.1",
"@polkadot/types": "^11.2.1",
"@polkadot/types-augment": "^11.2.1",
"@polkadot/types-codec": "^11.2.1",
"@polkadot/types-create": "^11.2.1",
"@polkadot/types-known": "^11.2.1",
"@polkadot/util": "^12.6.2",
"@polkadot/util-crypto": "^12.6.2",
"@polkadot/wasm-crypto": "^7.3.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/nft/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"devDependencies": {
"@acala-network/types": "^5.1.2",
"@graphql-codegen/cli": "^5.0.0",
"@polkadot/api": "^10.13.1",
"@polkadot/api": "^11.2.1",
"@talismn/eslint-config": "workspace:^",
"eslint": "^9.2.0",
"prettier": "^2.8.8",
Expand Down
2 changes: 1 addition & 1 deletion packages/react-polkadot-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"rxjs": "^7.8.1"
},
"devDependencies": {
"@polkadot/api": "^10.13.1",
"@polkadot/api": "^11.2.1",
"@talismn/eslint-config": "workspace:^",
"@talismn/tsconfig": "workspace:^",
"@types/react": "^18.3.1",
Expand Down
Loading

0 comments on commit 98303f3

Please sign in to comment.