diff --git a/.github/actions/prepare-deploy/action.yml b/.github/actions/prepare-deploy/action.yml index 490b0bb75b..5d07477106 100644 --- a/.github/actions/prepare-deploy/action.yml +++ b/.github/actions/prepare-deploy/action.yml @@ -70,11 +70,6 @@ runs: echo "function_name=${{ inputs.app_base_name }}-demo" >> $GITHUB_OUTPUT echo "front_url=${{ inputs.app_base_name }}-demo.k-f.dev" >> $GITHUB_OUTPUT echo "env_name=demo" >> $GITHUB_OUTPUT - elif ${{ contains(inputs.deploy_to, 'moonbeam-alpha') }}; then - # moonbeam-alpha - echo "function_name=${{ inputs.app_base_name }}-moonbeam-alpha" >> $GITHUB_OUTPUT - echo "front_url=${{ inputs.app_base_name }}-moonbeam-alpha.k-f.dev" >> $GITHUB_OUTPUT - echo "env_name=moonbeam-alpha" >> $GITHUB_OUTPUT elif ${{ github.ref == 'refs/heads/main' }}; then # DEV echo "function_name=${{ inputs.app_base_name }}-dev" >> $GITHUB_OUTPUT diff --git a/.github/workflows/moonbeam-alpha-deploy.yml b/.github/workflows/moonbeam-alpha-deploy.yml deleted file mode 100644 index 16f0014455..0000000000 --- a/.github/workflows/moonbeam-alpha-deploy.yml +++ /dev/null @@ -1,34 +0,0 @@ -name: "Moonbeam dev (alpha) deployments (manual)" -on: - push: - branches: main - pull_request: - paths: - - '.github/workflows/moonbeam-alpha-deploy.yml' - -jobs: - app-moonbeam-alpha: - uses: ./.github/workflows/centrifuge-app.yml - secrets: inherit - with: - deploy_env: moonbeam-alpha - - - pinning-moonbeam-alpha: - uses: ./.github/workflows/pinning-api.yml - secrets: inherit - with: - deploy_env: moonbeam-alpha - - - onboarding-moonbeam-alpha: - uses: ./.github/workflows/onboarding-api.yml - secrets: inherit - with: - deploy_env: moonbeam-alpha - - # faucet-moonbeam-alpha: - # uses: ./.github/workflows/faucet-api.yml - # secrets: inherit - # with: - # deploy_env: moonbeam-alpha \ No newline at end of file diff --git a/.gitignore b/.gitignore index 89a8e425fa..58ee203ebb 100644 --- a/.gitignore +++ b/.gitignore @@ -31,4 +31,3 @@ yarn-error.log !.env.demo !.env.catalyst !.env.production -!.env.moonbeam-alpha diff --git a/centrifuge-app/.env-config/.env.demo b/centrifuge-app/.env-config/.env.demo index b655634f8a..963c3aee0a 100644 --- a/centrifuge-app/.env-config/.env.demo +++ b/centrifuge-app/.env-config/.env.demo @@ -1,5 +1,5 @@ -REACT_APP_COLLATOR_WSS_URL=wss://fullnode.algol.cntrfg.com/public-ws -REACT_APP_DEFAULT_NODE_URL=https://pod.algol.k-f.dev +REACT_APP_COLLATOR_WSS_URL=wss://fullnode.moonbase-dev.cntrfg.com/public-ws +REACT_APP_DEFAULT_NODE_URL=https://pod.moonbeam-alpha.k-f.dev REACT_APP_DEFAULT_UNLIST_POOLS=true REACT_APP_FAUCET_URL=https://europe-central2-peak-vista-185616.cloudfunctions.net/faucet-api-demo REACT_APP_IPFS_GATEWAY=https://centrifuge.mypinata.cloud/ @@ -7,7 +7,7 @@ REACT_APP_IS_DEMO=true REACT_APP_ONBOARDING_API_URL=https://europe-central2-peak-vista-185616.cloudfunctions.net/onboarding-api-demo REACT_APP_PINNING_API_URL=https://europe-central2-peak-vista-185616.cloudfunctions.net/pinning-api-demo REACT_APP_POOL_CREATION_TYPE=immediate -REACT_APP_RELAY_WSS_URL=wss://fullnode-relay.algol.cntrfg.com/public-ws +REACT_APP_RELAY_WSS_URL=wss://frag-moonbase-relay-rpc-ws.g.moonbase.moonbeam.network REACT_APP_SUBQUERY_URL=https://api.subquery.network/sq/centrifuge/pools-demo REACT_APP_SUBSCAN_URL= REACT_APP_TINLAKE_NETWORK=goerli diff --git a/centrifuge-app/.env-config/.env.moonbeam-alpha b/centrifuge-app/.env-config/.env.moonbeam-alpha deleted file mode 100644 index 3f956b9bbb..0000000000 --- a/centrifuge-app/.env-config/.env.moonbeam-alpha +++ /dev/null @@ -1,20 +0,0 @@ -REACT_APP_COLLATOR_WSS_URL=wss://fullnode.moonbase-dev.cntrfg.com/public-ws -REACT_APP_DEFAULT_NODE_URL=https://pod.moonbeam-alpha.k-f.dev -REACT_APP_DEFAULT_UNLIST_POOLS=true -REACT_APP_FAUCET_URL=https://europe-central2-peak-vista-185616.cloudfunctions.net/faucet-api-moonbean-alpha -REACT_APP_IPFS_GATEWAY=https://centrifuge.mypinata.cloud/ -REACT_APP_IS_DEMO=true -REACT_APP_ONBOARDING_API_URL=https://europe-central2-peak-vista-185616.cloudfunctions.net/onboarding-api-moonbeam-alpha -REACT_APP_PINNING_API_URL=https://europe-central2-peak-vista-185616.cloudfunctions.net/pinning-api-moonbeam-alpha -REACT_APP_POOL_CREATION_TYPE=immediate -REACT_APP_RELAY_WSS_URL=wss://frag-moonbase-relay-rpc-ws.g.moonbase.moonbeam.network -REACT_APP_SUBQUERY_URL=https://api.subquery.network/sq/centrifuge/pools-demo -REACT_APP_SUBSCAN_URL= -REACT_APP_TINLAKE_NETWORK=goerli -REACT_APP_INFURA_KEY=bf808e7d3d924fbeb74672d9341d0550 -REACT_APP_WHITELISTED_ACCOUNTS= -REACT_APP_NETWORK=centrifuge -REACT_APP_REWARDS_TREE_URL=https://storage.googleapis.com/rad-rewards-trees-kovan-staging/latest.json -REACT_APP_MEMBERLIST_ADMIN_PURE_PROXY=kALwmJutBq95s41U9fWnoApCUgvPqPGTh1GSmFnQh5f9fWo93 -REACT_APP_WALLETCONNECT_ID=c32fa79350803519804a67fcab0b742a -REACT_APP_TINLAKE_SUBGRAPH_URL=https://graph.centrifuge.io/tinlake diff --git a/centrifuge-app/src/pages/Onboarding/queries/useSignRemark.ts b/centrifuge-app/src/pages/Onboarding/queries/useSignRemark.ts index 562b1e3115..ccb428a696 100644 --- a/centrifuge-app/src/pages/Onboarding/queries/useSignRemark.ts +++ b/centrifuge-app/src/pages/Onboarding/queries/useSignRemark.ts @@ -25,7 +25,6 @@ export const useSignRemark = ( { txHash: string blockNumber: string - isEvmOnSubstrate?: boolean chainId: Network }, unknown @@ -52,29 +51,13 @@ export const useSignRemark = ( const substrateMutation = useCentrifugeTransaction('Sign remark', (cent) => cent.remark.signRemark, { onSuccess: async (_, result) => { try { - let txHash: string - let blockNumber: string - // @ts-expect-error - if (isEvmOnSubstrate && result?.[0]?.wait) { - // @ts-expect-error - const evmResult = await result[0].wait() - txHash = evmResult?.transactionHash - blockNumber = evmResult?.blockNumber.toString() - } else { - txHash = result.txHash.toHex() - // @ts-expect-error - blockNumber = result.blockNumber.toString() - } const chainId = connectedNetwork === 'centrifuge' ? await centrifuge.getChainId() : connectedNetwork - await sendDocumentsToIssuer({ - txHash, - blockNumber, - isEvmOnSubstrate, + txHash: result.txHash, + blockNumber: result.blockNumber.toString(), chainId: chainId || 136, }) - setIsSubstrateTxLoading(false) - } catch (e) { + } finally { setIsSubstrateTxLoading(false) } }, @@ -151,6 +134,7 @@ export const useSignRemark = ( } } executePaymentInfo() + // eslint-disable-next-line react-hooks/exhaustive-deps }, [centrifuge, selectedAccount]) const signEvmRemark = async (args: [message: string]) => { diff --git a/centrifuge-js/package.json b/centrifuge-js/package.json index d9d887e9ca..7aa8775e48 100644 --- a/centrifuge-js/package.json +++ b/centrifuge-js/package.json @@ -1,6 +1,6 @@ { "name": "@centrifuge/centrifuge-js", - "version": "0.5.0", + "version": "0.6.0", "description": "", "homepage": "https://github.com/centrifuge/apps/tree/main/centrifuge-js#readme", "author": "", @@ -18,6 +18,7 @@ "start": "run-p -l start:esbuild start:types", "start:esbuild": "node ./esbuild watch", "start:types": "tsc --watch --emitDeclarationOnly --outDir dist", + "prepare": "yarn build", "build": "yarn clean && yarn build:esbuild && yarn build:types", "build:esbuild": "node ./esbuild", "build:types": "tsc --emitDeclarationOnly --outDir dist", diff --git a/centrifuge-js/src/CentrifugeBase.ts b/centrifuge-js/src/CentrifugeBase.ts index 781914d636..1e631e9da6 100644 --- a/centrifuge-js/src/CentrifugeBase.ts +++ b/centrifuge-js/src/CentrifugeBase.ts @@ -28,7 +28,7 @@ import { throwError, } from 'rxjs' import { fromFetch } from 'rxjs/fetch' -import { TransactionOptions } from './types' +import { TransactionErrorResult, TransactionOptions, TransactionResult } from './types' import { computeMultisig, evmToSubstrateAddress, isSameAddress } from './utils' import { CurrencyBalance } from './utils/BN' import { getPolkadotApi } from './utils/web3' @@ -293,7 +293,7 @@ export class CentrifugeBase { try { const $paymentInfo = submittable.paymentInfo(signingAddress) - const $balances = api.query.system.account(signingAddress) + const $balances = api.query.system.account(this.getSignerAddress()) if (options?.paymentInfo) { return $paymentInfo.pipe( @@ -334,11 +334,7 @@ export class CentrifugeBase { switchMap(() => actualSubmittable.signAndSend(signingAddress, { signer, era: options?.era })) ) ).pipe( - tap((result) => { - options?.onStatusChange?.(result) - if (result.status.isInBlock) this.getTxCompletedEvents().next(result.events) - }), - takeWhile((result) => { + map((result) => { const errors = result.events.filter(({ event }) => { const possibleProxyErr = event.data[0]?.toHuman() return ( @@ -352,9 +348,21 @@ export class CentrifugeBase { if (errors.length && this.config.debug) { console.log('🚨 error', JSON.stringify(errors)) } - const hasError = !!(result.dispatchError || errors.length) - - return !result.status.isInBlock && !hasError + return { + data: result, + events: result.events, + status: result.status.type, + error: result.dispatchError || errors[0], + txHash: result.txHash.toHuman() as string, + blockNumber: (result as any).blockNumber ? Number((result as any).blockNumber?.toString()) : undefined, + } + }), + tap((result) => { + options?.onStatusChange?.(result) + if (result.status === 'InBlock') this.getTxCompletedEvents().next(result.events) + }), + takeWhile((result) => { + return result.status !== 'InBlock' && !result.error }, true) ) } catch (e) { @@ -387,26 +395,31 @@ export class CentrifugeBase { return from(response.wait()).pipe( map((receipt) => [response, receipt] as const), startWith([response, null] as const), - catchError(() => of([{ ...response, error: new Error('failed') }] as const)), - tap(([result, receipt]) => { - if ('error' in result || receipt?.status === 0) { - options?.onStatusChange?.({ - events: [], - dispatchError: {}, - status: { - hash: { toHex: () => result.hash as any }, - }, - } as any) - } else { - options?.onStatusChange?.({ - events: [], - status: { - isInBlock: receipt?.status === 1, - isFinalized: receipt?.status === 1, - hash: { toHex: () => result.hash as any }, - }, - } as any) + map(([response, receipt]) => { + const result: TransactionResult = { + data: { response, receipt: receipt ?? undefined }, + // TODO: Events + events: [], + status: receipt ? 'InBlock' : 'Broadcast', + error: receipt?.status === 0 ? new Error('failed') : undefined, + txHash: response.hash, + blockNumber: receipt?.blockNumber, + } + return result + }), + catchError(() => { + const result: TransactionErrorResult = { + data: { response, receipt: undefined }, + events: [], + status: 'Invalid', + error: new Error('failed'), + txHash: response.hash, + blockNumber: undefined, } + return of(result) + }), + tap((result) => { + options?.onStatusChange?.(result) }) ) }) diff --git a/centrifuge-js/src/types/index.ts b/centrifuge-js/src/types/index.ts index 25ef762cdc..4315ad45f0 100644 --- a/centrifuge-js/src/types/index.ts +++ b/centrifuge-js/src/types/index.ts @@ -1,16 +1,39 @@ +import { + TransactionReceipt as EvmTransactionReceipt, + TransactionResponse as EvmTransactionResponse, +} from '@ethersproject/providers' import { AddressOrPair } from '@polkadot/api/types' import { ISubmittableResult } from '@polkadot/types/types' import { HexString } from '@polkadot/util/types' import BN from 'bn.js' import { Config } from '../CentrifugeBase' +type EvmTransactionResult = { + response: EvmTransactionResponse + receipt?: EvmTransactionReceipt +} + +type TransactionResultBase = { + data: ISubmittableResult | EvmTransactionResult + events: ISubmittableResult['events'] + status: ISubmittableResult['status']['type'] + txHash: string + blockNumber?: number + error: any +} + +export type TransactionPendingResult = TransactionResultBase & { error: null; blockNumber: undefined } +export type TransactionSuccessResult = TransactionResultBase & { error: null; blockNumber: number } +export type TransactionErrorResult = TransactionResultBase & { error: any; blockNumber: undefined } +export type TransactionResult = TransactionPendingResult | TransactionSuccessResult | TransactionErrorResult + export type TransactionOptions = { batch?: boolean signOnly?: boolean sendOnly?: boolean era?: number paymentInfo?: AddressOrPair - onStatusChange?: (result: ISubmittableResult) => void + onStatusChange?: (result: TransactionResult) => void createType?: 'immediate' | 'propose' | 'notePreimage' dryRun?: boolean proxies?: Config['proxies'] diff --git a/centrifuge-react/CHANGELOG.md b/centrifuge-react/CHANGELOG.md index 7aacd8042a..07b202b13b 100644 --- a/centrifuge-react/CHANGELOG.md +++ b/centrifuge-react/CHANGELOG.md @@ -2,6 +2,24 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +## 0.2.0 (2023-10-03) + + +### ⚠ BREAKING CHANGES + +* **centrifuge-js:** Centrifuge->getChainId() now returns a Promise + +### Features + +* implement global onboarding status endpoint ([#1364](https://github.com/centrifuge/apps/issues/1364)) ([b64db29](https://github.com/centrifuge/apps/commit/b64db2904ad670aa012bb9a69396bf28ab31d5d7)) + + +### Bug Fixes + +* autoconnect wallet when visiting through gnosis safe app ([#1375](https://github.com/centrifuge/apps/issues/1375)) ([0991b30](https://github.com/centrifuge/apps/commit/0991b30ee0ffead4b1799496f49a7401c6371a14)) +* **centrifuge-js:** Get chain ID from chain ([#1535](https://github.com/centrifuge/apps/issues/1535)) ([e36462f](https://github.com/centrifuge/apps/commit/e36462fcc58589830f9fb9a68e0ba11302b1eb6e)) +* **centrifuge-react:** Add useBalances hook ([#1092](https://github.com/centrifuge/apps/issues/1092)) ([2eef4e1](https://github.com/centrifuge/apps/commit/2eef4e133cac560f62b6db0023b23875563e03cf)) + ### [0.1.1](https://github.com/centrifuge/apps/compare/centrifuge-react/v0.1.0...centrifuge-react/v0.1.1) (2023-09-28) diff --git a/centrifuge-react/package.json b/centrifuge-react/package.json index 8a3992671f..711fbde885 100644 --- a/centrifuge-react/package.json +++ b/centrifuge-react/package.json @@ -1,6 +1,6 @@ { "name": "@centrifuge/centrifuge-react", - "version": "0.1.1", + "version": "0.2.0", "description": "Centrifuge React Library", "main": "./dist/index.js", "typings": "./dist/index.d.ts", @@ -9,7 +9,8 @@ ], "scripts": { "build": "tsc", - "prepare": "yarn build", + "build:deps": "cd ../centrifuge-js && yarn build && cd ../fabric && yarn build && cd ../centrifuge-react", + "prepare": "yarn build:deps && yarn build", "bump": "standard-version --sign", "storybook": "start-storybook -p 6006", "build-storybook": "build-storybook", diff --git a/centrifuge-react/src/hooks/useCentrifugeTransaction.ts b/centrifuge-react/src/hooks/useCentrifugeTransaction.ts index 30f4924898..23cdcb5be4 100644 --- a/centrifuge-react/src/hooks/useCentrifugeTransaction.ts +++ b/centrifuge-react/src/hooks/useCentrifugeTransaction.ts @@ -1,4 +1,4 @@ -import Centrifuge, { TransactionOptions } from '@centrifuge/centrifuge-js' +import Centrifuge, { TransactionOptions, TransactionSuccessResult } from '@centrifuge/centrifuge-js' import { ISubmittableResult } from '@polkadot/types/types' import * as React from 'react' import { lastValueFrom, Observable } from 'rxjs' @@ -18,7 +18,7 @@ export type CentrifugeTransactionOptions = Pick>( title: string, transactionCallback: (centrifuge: Centrifuge) => (args: T, options?: TransactionOptions) => Observable, - options: { onSuccess?: (args: T, result: ISubmittableResult) => void; onError?: (error: any) => void } = {} + options: { onSuccess?: (args: T, result: TransactionSuccessResult) => void; onError?: (error: any) => void } = {} ) { const { addOrUpdateTransaction, updateTransaction } = useTransactions() const { showWallets, substrate, walletDialog, evm, isEvmOnSubstrate } = useWallet() @@ -81,22 +81,28 @@ export function useCentrifugeTransaction>( }) let errorObject: any - if (result.dispatchError || errors.length) { + const { data } = result + + if (result.error) { + txError = result.error let errorMessage = 'Transaction failed' - txError = result.dispatchError || errors[0] - if (errors.length) { - const error = errors[0].event.data[0] as any - if (error.isModule) { - // for module errors, we have the section indexed, lookup - const decoded = api.registry.findMetaError(error.asModule) - const { section, method, docs } = decoded - errorObject = new PalletError(section, method) - errorMessage = errorObject.message || errorMessage - console.error(`${section}.${method}: ${docs.join(' ')}`) - } else { - // Other, CannotLookup, BadOrigin, no extra info - console.error(error.toString()) + if (isSubstrateResult(data)) { + if (errors.length) { + const error = errors[0].event.data[0] as any + if (error.isModule) { + // for module errors, we have the section indexed, lookup + const decoded = api.registry.findMetaError(error.asModule) + const { section, method, docs } = decoded + errorObject = new PalletError(section, method) + errorMessage = errorObject.message || errorMessage + console.error(`${section}.${method}: ${docs.join(' ')}`) + } else { + // Other, CannotLookup, BadOrigin, no extra info + console.error(error.toString()) + } } + } else { + console.error(result.error) } updateTransaction(id, (prev) => ({ @@ -105,14 +111,14 @@ export function useCentrifugeTransaction>( error: errorObject, dismissed: prev.status === 'failed' && prev.dismissed, })) - } else if (result.status.isInBlock || result.status.isFinalized) { + } else if (['InBlock', 'Finalized'].includes(result.status)) { updateTransaction(id, (prev) => prev.status === 'failed' ? {} : { status: 'succeeded', dismissed: prev.status === 'succeeded' && prev.dismissed } ) } else { - updateTransaction(id, { status: 'pending', hash: result.status.hash.toHex() }) + updateTransaction(id, { status: 'pending', hash: result.txHash }) } }, }) @@ -176,3 +182,7 @@ export function useCentrifugeTransaction>( : false, } } + +function isSubstrateResult(data: any): data is ISubmittableResult { + return 'toHuman' in data +} diff --git a/onboarding-api/env-vars/demo.env b/onboarding-api/env-vars/demo.env index a791f6cec1..f7c7e84d99 100644 --- a/onboarding-api/env-vars/demo.env +++ b/onboarding-api/env-vars/demo.env @@ -1,7 +1,7 @@ REDIRECT_URL=https://app-demo.k-f.dev MEMBERLIST_ADMIN_PURE_PROXY=kAM1ELFDHdHeLDAkAdwEnfufoCL5hpUycGs4ZQkSQKVpHFoXm -COLLATOR_WSS_URL=wss://fullnode.algol.cntrfg.com/public-ws -RELAY_WSS_URL=wss://fullnode-relay.algol.cntrfg.com +COLLATOR_WSS_URL=wss://fullnode.moonbase-dev.cntrfg.com/public-ws +RELAY_WSS_URL=wss://frag-moonbase-relay-rpc-ws.g.moonbase.moonbeam.network INFURA_KEY=bf808e7d3d924fbeb74672d9341d0550 EVM_NETWORK=goerli -ONBOARDING_STORAGE_BUCKET=centrifuge-onboarding-api-dev +ONBOARDING_STORAGE_BUCKET=centrifuge-onboarding-api-dev \ No newline at end of file diff --git a/onboarding-api/env-vars/moonbeam-alpha.env b/onboarding-api/env-vars/moonbeam-alpha.env deleted file mode 100644 index ce95c37a2d..0000000000 --- a/onboarding-api/env-vars/moonbeam-alpha.env +++ /dev/null @@ -1,7 +0,0 @@ -REDIRECT_URL=https://app-moonbase.k-f.dev -MEMBERLIST_ADMIN_PURE_PROXY=kAM1ELFDHdHeLDAkAdwEnfufoCL5hpUycGs4ZQkSQKVpHFoXm -COLLATOR_WSS_URL=wss://fullnode.moonbase-dev.cntrfg.com/public-ws -RELAY_WSS_URL=wss://frag-moonbase-relay-rpc-ws.g.moonbase.moonbeam.network -INFURA_KEY=bf808e7d3d924fbeb74672d9341d0550 -EVM_NETWORK=goerli -ONBOARDING_STORAGE_BUCKET=centrifuge-onboarding-api-dev \ No newline at end of file diff --git a/onboarding-api/env-vars/moonbeam-alpha.secrets b/onboarding-api/env-vars/moonbeam-alpha.secrets deleted file mode 100644 index ecdceefbd5..0000000000 --- a/onboarding-api/env-vars/moonbeam-alpha.secrets +++ /dev/null @@ -1,7 +0,0 @@ -SHUFTI_PRO_SECRET_KEY=projects/peak-vista-185616/secrets/SHUFTI_PRO_SECRET_KEY -SHUFTI_PRO_CLIENT_ID=projects/peak-vista-185616/secrets/SHUFTI_PRO_CLIENT_ID -JWT_SECRET=projects/peak-vista-185616/secrets/JWT_SECRET -SENDGRID_API_KEY=projects/peak-vista-185616/secrets/SENDGRID_API_KEY -COOKIE_SECRET=projects/peak-vista-185616/secrets/COOKIE_SECRET -PURE_PROXY_CONTROLLER_SEED=projects/peak-vista-185616/secrets/PURE_PROXY_CONTROLLER_SEED -EVM_MEMBERLIST_ADMIN_PRIVATE_KEY=projects/peak-vista-185616/secrets/EVM_MEMBERLIST_ADMIN_PRIVATE_KEY \ No newline at end of file diff --git a/pinning-api/env-vars/moonbeam-alpha.secrets b/pinning-api/env-vars/moonbeam-alpha.secrets deleted file mode 100644 index ed859fd326..0000000000 --- a/pinning-api/env-vars/moonbeam-alpha.secrets +++ /dev/null @@ -1,2 +0,0 @@ -PINATA_API_KEY=projects/peak-vista-185616/secrets/PINATA_API_KEY -PINATA_SECRET_API_KEY=projects/peak-vista-185616/secrets/PINATA_SECRET_API_KEY diff --git a/simulation-tests/tsconfig.json b/simulation-tests/tsconfig.json new file mode 100644 index 0000000000..98456fa09b --- /dev/null +++ b/simulation-tests/tsconfig.json @@ -0,0 +1,25 @@ +{ + "ts-node": { + "compilerOptions": { + "module": "commonjs" + } + }, + "compilerOptions": { + "target": "esnext", + "lib": ["dom", "dom.iterable", "esnext"], + "allowJs": false, + "skipLibCheck": true, + "esModuleInterop": false, + "allowSyntheticDefaultImports": true, + "strict": true, + "forceConsistentCasingInFileNames": true, + "noFallthroughCasesInSwitch": true, + "module": "esnext", + "moduleResolution": "node", + "resolveJsonModule": true, + "isolatedModules": true, + "noEmit": true, + "jsx": "react-jsx" + }, + "include": ["src", "**/*.d.ts", ".eslintrc.js", "functions"] +}