feat: use new smart contracts sdk (#479)
This commit is contained in:
parent
da0536f8a8
commit
29e6cb5074
@ -8,10 +8,11 @@
|
|||||||
"forceConsistentCasingInFileNames": true,
|
"forceConsistentCasingInFileNames": true,
|
||||||
"strict": true,
|
"strict": true,
|
||||||
"noImplicitOverride": true,
|
"noImplicitOverride": true,
|
||||||
"noPropertyAccessFromIndexSignature": true,
|
"noPropertyAccessFromIndexSignature": false,
|
||||||
"noImplicitReturns": true,
|
"noImplicitReturns": true,
|
||||||
"noFallthroughCasesInSwitch": true,
|
"noFallthroughCasesInSwitch": true,
|
||||||
"lib": ["es5", "es6", "dom", "dom.iterable"]
|
"lib": ["es5", "es6", "dom", "dom.iterable"],
|
||||||
|
"resolveJsonModule": true
|
||||||
},
|
},
|
||||||
"files": [],
|
"files": [],
|
||||||
"include": [],
|
"include": [],
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import type { TxData } from '@vegaprotocol/smart-contracts-sdk';
|
import type { TxData } from '@vegaprotocol/smart-contracts';
|
||||||
import { Dialog, EtherscanLink } from '@vegaprotocol/ui-toolkit';
|
import { Dialog, EtherscanLink } from '@vegaprotocol/ui-toolkit';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
import type { EthereumChainId } from '@vegaprotocol/smart-contracts-sdk';
|
import type { EthereumChainId } from '@vegaprotocol/smart-contracts';
|
||||||
import {
|
import {
|
||||||
EnvironmentConfig,
|
EnvironmentConfig,
|
||||||
EthereumChainIds,
|
EthereumChainIds,
|
||||||
} from '@vegaprotocol/smart-contracts-sdk';
|
} from '@vegaprotocol/smart-contracts';
|
||||||
|
|
||||||
import type { Networks } from './vega';
|
import type { Networks } from './vega';
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import type { Tranche } from '@vegaprotocol/smart-contracts-sdk';
|
import type { Tranche } from '@vegaprotocol/smart-contracts';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
|
||||||
import type { BigNumber } from '../../lib/bignumber';
|
import type { BigNumber } from '../../lib/bignumber';
|
||||||
|
@ -5,7 +5,7 @@ import type {
|
|||||||
VegaStaking,
|
VegaStaking,
|
||||||
ERC20Token,
|
ERC20Token,
|
||||||
VegaVesting,
|
VegaVesting,
|
||||||
} from '@vegaprotocol/smart-contracts-sdk';
|
} from '@vegaprotocol/smart-contracts';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
|
||||||
export interface ContractsContextShape {
|
export interface ContractsContextShape {
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
import type { TxData } from '@vegaprotocol/smart-contracts-sdk';
|
import type { TxData } from '@vegaprotocol/smart-contracts';
|
||||||
import {
|
import {
|
||||||
VegaClaim,
|
VegaClaim,
|
||||||
VegaErc20Bridge,
|
VegaErc20Bridge,
|
||||||
VegaStaking,
|
VegaStaking,
|
||||||
ERC20Token,
|
ERC20Token,
|
||||||
VegaVesting,
|
VegaVesting,
|
||||||
} from '@vegaprotocol/smart-contracts-sdk';
|
} from '@vegaprotocol/smart-contracts';
|
||||||
import { Splash } from '@vegaprotocol/ui-toolkit';
|
import { Splash } from '@vegaprotocol/ui-toolkit';
|
||||||
import { useWeb3React } from '@web3-react/core';
|
import { useWeb3React } from '@web3-react/core';
|
||||||
import uniqBy from 'lodash/uniqBy';
|
import uniqBy from 'lodash/uniqBy';
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import parseJSON from 'date-fns/parseJSON';
|
import parseJSON from 'date-fns/parseJSON';
|
||||||
import { BigNumber } from '../../lib/bignumber';
|
import { BigNumber } from '../../lib/bignumber';
|
||||||
import type { Tranche } from '@vegaprotocol/smart-contracts-sdk';
|
import type { Tranche } from '@vegaprotocol/smart-contracts';
|
||||||
|
|
||||||
const json: Tranche[] = [
|
const json: Tranche[] = [
|
||||||
{
|
{
|
||||||
@ -71,7 +71,7 @@ const json: Tranche[] = [
|
|||||||
],
|
],
|
||||||
withdrawals: [],
|
withdrawals: [],
|
||||||
total_tokens: new BigNumber('112323.67'),
|
total_tokens: new BigNumber('112323.67'),
|
||||||
withdrawn_tokens: '0',
|
withdrawn_tokens: new BigNumber('0'),
|
||||||
remaining_tokens: new BigNumber('112323.67'),
|
remaining_tokens: new BigNumber('112323.67'),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
@ -254,7 +254,7 @@ const json: Tranche[] = [
|
|||||||
],
|
],
|
||||||
withdrawals: [],
|
withdrawals: [],
|
||||||
total_tokens: new BigNumber('44499.2'),
|
total_tokens: new BigNumber('44499.2'),
|
||||||
withdrawn_tokens: '0',
|
withdrawn_tokens: new BigNumber('0'),
|
||||||
remaining_tokens: new BigNumber('44499.2'),
|
remaining_tokens: new BigNumber('44499.2'),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -373,7 +373,7 @@ const json: Tranche[] = [
|
|||||||
],
|
],
|
||||||
withdrawals: [],
|
withdrawals: [],
|
||||||
total_tokens: new BigNumber('1104995.291'),
|
total_tokens: new BigNumber('1104995.291'),
|
||||||
withdrawn_tokens: '0',
|
withdrawn_tokens: new BigNumber('0'),
|
||||||
remaining_tokens: new BigNumber('1104995.291'),
|
remaining_tokens: new BigNumber('1104995.291'),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { useContracts } from '../../contexts/contracts/contracts-context';
|
import { useContracts } from '../../contexts/contracts/contracts-context';
|
||||||
import mock from './tranches-mock';
|
import mock from './tranches-mock';
|
||||||
import type { Tranche } from '@vegaprotocol/smart-contracts-sdk';
|
import type { Tranche } from '@vegaprotocol/smart-contracts';
|
||||||
|
|
||||||
export function useTranches() {
|
export function useTranches() {
|
||||||
const { vesting } = useContracts();
|
const { vesting } = useContracts();
|
||||||
|
@ -1,9 +1,6 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import * as Sentry from '@sentry/react';
|
import * as Sentry from '@sentry/react';
|
||||||
import type {
|
import type { VegaStaking, VegaVesting } from '@vegaprotocol/smart-contracts';
|
||||||
VegaStaking,
|
|
||||||
VegaVesting,
|
|
||||||
} from '@vegaprotocol/smart-contracts-sdk';
|
|
||||||
|
|
||||||
import {
|
import {
|
||||||
AppStateActionType,
|
AppStateActionType,
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import * as Sentry from '@sentry/react';
|
import * as Sentry from '@sentry/react';
|
||||||
import type { VegaVesting } from '@vegaprotocol/smart-contracts-sdk';
|
import type { VegaVesting } from '@vegaprotocol/smart-contracts';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
AppStateActionType,
|
AppStateActionType,
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { useFetch } from '@vegaprotocol/react-helpers';
|
import { useFetch } from '@vegaprotocol/react-helpers';
|
||||||
import type { Networks, Tranche } from '@vegaprotocol/smart-contracts-sdk';
|
import type { Networks, Tranche } from '@vegaprotocol/smart-contracts';
|
||||||
import React, { useEffect } from 'react';
|
import React, { useEffect } from 'react';
|
||||||
import { APP_ENV } from '../config';
|
import { APP_ENV } from '../config';
|
||||||
|
|
||||||
|
@ -17,8 +17,14 @@
|
|||||||
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
|
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
|
||||||
-->
|
-->
|
||||||
<link rel="manifest" href="assets/manifest.json" />
|
<link rel="manifest" href="assets/manifest.json" />
|
||||||
|
<link
|
||||||
|
rel="preload"
|
||||||
|
href="https://static.vega.xyz/AlphaLyrae-Medium.woff2"
|
||||||
|
as="font"
|
||||||
|
type="font/woff2"
|
||||||
|
crossorigin="anonymous"
|
||||||
|
/>
|
||||||
<title>Vega Token dApp</title>
|
<title>Vega Token dApp</title>
|
||||||
<link rel="stylesheet" href="https://static.vega.xyz/fonts.css" />
|
|
||||||
</head>
|
</head>
|
||||||
<body class="h-full">
|
<body class="h-full">
|
||||||
<noscript>You need to enable JavaScript to run this app.</noscript>
|
<noscript>You need to enable JavaScript to run this app.</noscript>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import type { Tranche } from '@vegaprotocol/smart-contracts-sdk';
|
import type { Tranche } from '@vegaprotocol/smart-contracts';
|
||||||
|
|
||||||
import { BigNumber } from '../bignumber';
|
import { BigNumber } from '../bignumber';
|
||||||
|
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
import * as Sentry from '@sentry/react';
|
import * as Sentry from '@sentry/react';
|
||||||
import { UNSPENT_CODE } from '@vegaprotocol/smart-contracts-sdk';
|
import { UNSPENT_CODE } from '@vegaprotocol/smart-contracts';
|
||||||
import { format } from 'date-fns';
|
import { format } from 'date-fns';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { Trans, useTranslation } from 'react-i18next';
|
import { Trans, useTranslation } from 'react-i18next';
|
||||||
import { Link } from 'react-router-dom';
|
import { Link } from 'react-router-dom';
|
||||||
import type { Tranche } from '@vegaprotocol/smart-contracts-sdk';
|
import type { Tranche } from '@vegaprotocol/smart-contracts';
|
||||||
|
|
||||||
import { KeyValueTable, KeyValueTableRow } from '@vegaprotocol/ui-toolkit';
|
import { KeyValueTable, KeyValueTableRow } from '@vegaprotocol/ui-toolkit';
|
||||||
import { useContracts } from '../../contexts/contracts/contracts-context';
|
import { useContracts } from '../../contexts/contracts/contracts-context';
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import { format } from 'date-fns';
|
import { format } from 'date-fns';
|
||||||
import type { Tranche } from '@vegaprotocol/smart-contracts-sdk';
|
import type { Tranche } from '@vegaprotocol/smart-contracts';
|
||||||
|
|
||||||
import { DATE_FORMAT_LONG } from '../../lib/date-formats';
|
import { DATE_FORMAT_LONG } from '../../lib/date-formats';
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { BigNumber } from '../../lib/bignumber';
|
import { BigNumber } from '../../lib/bignumber';
|
||||||
import { addDecimal } from '../../lib/decimals';
|
import { addDecimal } from '../../lib/decimals';
|
||||||
import type { IClaimTokenParams } from '@vegaprotocol/smart-contracts-sdk';
|
import type { IClaimTokenParams } from '@vegaprotocol/smart-contracts';
|
||||||
|
|
||||||
export enum ClaimStatus {
|
export enum ClaimStatus {
|
||||||
Ready,
|
Ready,
|
||||||
|
@ -13,7 +13,7 @@ import {
|
|||||||
initialClaimState,
|
initialClaimState,
|
||||||
} from './claim-reducer';
|
} from './claim-reducer';
|
||||||
|
|
||||||
import type { Tranche } from '@vegaprotocol/smart-contracts-sdk';
|
import type { Tranche } from '@vegaprotocol/smart-contracts';
|
||||||
|
|
||||||
const Claim = ({
|
const Claim = ({
|
||||||
address,
|
address,
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { useContracts } from '../../contexts/contracts/contracts-context';
|
import { useContracts } from '../../contexts/contracts/contracts-context';
|
||||||
import { useTransaction } from '../../hooks/use-transaction';
|
import { useTransaction } from '../../hooks/use-transaction';
|
||||||
import type { IClaimTokenParams } from '@vegaprotocol/smart-contracts-sdk';
|
import type { IClaimTokenParams } from '@vegaprotocol/smart-contracts';
|
||||||
|
|
||||||
export const useClaim = (claimData: IClaimTokenParams, address: string) => {
|
export const useClaim = (claimData: IClaimTokenParams, address: string) => {
|
||||||
const claimArgs = {
|
const claimArgs = {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import type { IClaimTokenParams } from '@vegaprotocol/smart-contracts-sdk';
|
import type { IClaimTokenParams } from '@vegaprotocol/smart-contracts';
|
||||||
import { FormGroup } from '@vegaprotocol/ui-toolkit';
|
import { FormGroup } from '@vegaprotocol/ui-toolkit';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import type { IClaimTokenParams } from '@vegaprotocol/smart-contracts-sdk';
|
import type { IClaimTokenParams } from '@vegaprotocol/smart-contracts';
|
||||||
import { FormGroup } from '@vegaprotocol/ui-toolkit';
|
import { FormGroup } from '@vegaprotocol/ui-toolkit';
|
||||||
import { BigNumber } from '../../../lib/bignumber';
|
import { BigNumber } from '../../../lib/bignumber';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { BigNumber } from '../../../lib/bignumber';
|
import { BigNumber } from '../../../lib/bignumber';
|
||||||
import { sumCirculatingTokens } from './token-details-circulating';
|
import { sumCirculatingTokens } from './token-details-circulating';
|
||||||
import type { Tranche } from '@vegaprotocol/smart-contracts-sdk';
|
import type { Tranche } from '@vegaprotocol/smart-contracts';
|
||||||
|
|
||||||
test('It sums some easy tranches correctly', () => {
|
test('It sums some easy tranches correctly', () => {
|
||||||
const tranches: Partial<Tranche>[] = [
|
const tranches: Partial<Tranche>[] = [
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { BigNumber } from '../../../lib/bignumber';
|
import { BigNumber } from '../../../lib/bignumber';
|
||||||
import { formatNumber } from '../../../lib/format-number';
|
import { formatNumber } from '../../../lib/format-number';
|
||||||
import type { Tranche } from '@vegaprotocol/smart-contracts-sdk';
|
import type { Tranche } from '@vegaprotocol/smart-contracts';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add together the circulating tokens from all tranches
|
* Add together the circulating tokens from all tranches
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import type { Tranche } from '@vegaprotocol/smart-contracts-sdk';
|
import type { Tranche } from '@vegaprotocol/smart-contracts';
|
||||||
import type { BigNumber } from '../../lib/bignumber';
|
import type { BigNumber } from '../../lib/bignumber';
|
||||||
|
|
||||||
export interface TrancheBalance {
|
export interface TrancheBalance {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import type { Tranche as ITranche } from '@vegaprotocol/smart-contracts-sdk';
|
import type { Tranche as ITranche } from '@vegaprotocol/smart-contracts';
|
||||||
import { useWeb3React } from '@web3-react/core';
|
import { useWeb3React } from '@web3-react/core';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
@ -75,8 +75,10 @@ export const Tranche = () => {
|
|||||||
{tranche.users.length ? (
|
{tranche.users.length ? (
|
||||||
<ul role="list">
|
<ul role="list">
|
||||||
{tranche.users.map((user, i) => {
|
{tranche.users.map((user, i) => {
|
||||||
const unlocked = user.remaining_tokens.times(lockedData?.unlocked);
|
const unlocked = user.remaining_tokens.times(
|
||||||
const locked = user.remaining_tokens.times(lockedData?.locked);
|
lockedData?.unlocked || 0
|
||||||
|
);
|
||||||
|
const locked = user.remaining_tokens.times(lockedData?.locked || 0);
|
||||||
return (
|
return (
|
||||||
<li className="pb-4" key={i}>
|
<li className="pb-4" key={i}>
|
||||||
<EtherscanLink address={user.address} text={user.address} />
|
<EtherscanLink address={user.address} text={user.address} />
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { useOutletContext } from 'react-router-dom';
|
import { useOutletContext } from 'react-router-dom';
|
||||||
import type { Tranche } from '@vegaprotocol/smart-contracts-sdk';
|
import type { Tranche } from '@vegaprotocol/smart-contracts';
|
||||||
import { useWeb3React } from '@web3-react/core';
|
import { useWeb3React } from '@web3-react/core';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
"forceConsistentCasingInFileNames": true,
|
"forceConsistentCasingInFileNames": true,
|
||||||
"strict": true,
|
"strict": true,
|
||||||
"noImplicitOverride": true,
|
"noImplicitOverride": true,
|
||||||
"noPropertyAccessFromIndexSignature": true,
|
"noPropertyAccessFromIndexSignature": false,
|
||||||
"noImplicitReturns": true,
|
"noImplicitReturns": true,
|
||||||
"noFallthroughCasesInSwitch": true,
|
"noFallthroughCasesInSwitch": true,
|
||||||
"resolveJsonModule": true
|
"resolveJsonModule": true
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import type { ERC20Token } from '@vegaprotocol/smart-contracts-sdk';
|
import type { ERC20Token } from '@vegaprotocol/smart-contracts';
|
||||||
import { useWeb3React } from '@web3-react/core';
|
import { useWeb3React } from '@web3-react/core';
|
||||||
import { useCallback } from 'react';
|
import { useCallback } from 'react';
|
||||||
import { useEthereumReadContract } from '@vegaprotocol/web3';
|
import { useEthereumReadContract } from '@vegaprotocol/web3';
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { useEthereumReadContract } from '@vegaprotocol/web3';
|
import { useEthereumReadContract } from '@vegaprotocol/web3';
|
||||||
import type { ERC20Token } from '@vegaprotocol/smart-contracts-sdk';
|
import type { ERC20Token } from '@vegaprotocol/smart-contracts';
|
||||||
import { useWeb3React } from '@web3-react/core';
|
import { useWeb3React } from '@web3-react/core';
|
||||||
import { useCallback } from 'react';
|
import { useCallback } from 'react';
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import type BigNumber from 'bignumber.js';
|
import type BigNumber from 'bignumber.js';
|
||||||
import { useCallback } from 'react';
|
import { useCallback } from 'react';
|
||||||
import type { VegaErc20Bridge } from '@vegaprotocol/smart-contracts-sdk';
|
import type { VegaErc20Bridge } from '@vegaprotocol/smart-contracts';
|
||||||
import type { Asset } from './deposit-manager';
|
import type { Asset } from './deposit-manager';
|
||||||
import { useEthereumReadContract } from '@vegaprotocol/web3';
|
import { useEthereumReadContract } from '@vegaprotocol/web3';
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import type { ERC20Token } from '@vegaprotocol/smart-contracts-sdk';
|
import type { ERC20Token } from '@vegaprotocol/smart-contracts';
|
||||||
import { useEthereumTransaction } from '@vegaprotocol/web3';
|
import { useEthereumTransaction } from '@vegaprotocol/web3';
|
||||||
|
|
||||||
export const useSubmitApproval = (
|
export const useSubmitApproval = (
|
||||||
|
@ -8,7 +8,7 @@ import { DepositStatus } from '@vegaprotocol/types';
|
|||||||
import { useState } from 'react';
|
import { useState } from 'react';
|
||||||
import { remove0x } from '@vegaprotocol/react-helpers';
|
import { remove0x } from '@vegaprotocol/react-helpers';
|
||||||
import { useEthereumTransaction } from '@vegaprotocol/web3';
|
import { useEthereumTransaction } from '@vegaprotocol/web3';
|
||||||
import type { VegaErc20Bridge } from '@vegaprotocol/smart-contracts-sdk';
|
import type { VegaErc20Bridge } from '@vegaprotocol/smart-contracts';
|
||||||
|
|
||||||
const DEPOSIT_EVENT_SUB = gql`
|
const DEPOSIT_EVENT_SUB = gql`
|
||||||
subscription DepositEvent($partyId: ID!) {
|
subscription DepositEvent($partyId: ID!) {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import type { ERC20Token } from '@vegaprotocol/smart-contracts-sdk';
|
import type { ERC20Token } from '@vegaprotocol/smart-contracts';
|
||||||
import { useEthereumTransaction } from '@vegaprotocol/web3';
|
import { useEthereumTransaction } from '@vegaprotocol/web3';
|
||||||
|
|
||||||
export const useSubmitFaucet = (contract: ERC20Token | null) => {
|
export const useSubmitFaucet = (contract: ERC20Token | null) => {
|
||||||
|
3
libs/smart-contracts/.babelrc
Normal file
3
libs/smart-contracts/.babelrc
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"presets": ["@babel/preset-typescript"]
|
||||||
|
}
|
@ -1,5 +1,5 @@
|
|||||||
import type { Networks } from '@vegaprotocol/smart-contracts-sdk';
|
import type { Networks } from '@vegaprotocol/smart-contracts';
|
||||||
import { VegaErc20Bridge } from '@vegaprotocol/smart-contracts-sdk';
|
import { VegaErc20Bridge } from '@vegaprotocol/smart-contracts';
|
||||||
import { useWeb3React } from '@web3-react/core';
|
import { useWeb3React } from '@web3-react/core';
|
||||||
import { useMemo } from 'react';
|
import { useMemo } from 'react';
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { ERC20Token } from '@vegaprotocol/smart-contracts-sdk';
|
import { ERC20Token } from '@vegaprotocol/smart-contracts';
|
||||||
import { useWeb3React } from '@web3-react/core';
|
import { useWeb3React } from '@web3-react/core';
|
||||||
import { useMemo } from 'react';
|
import { useMemo } from 'react';
|
||||||
|
|
||||||
|
@ -2,7 +2,8 @@ module.exports = {
|
|||||||
displayName: 'withdraws',
|
displayName: 'withdraws',
|
||||||
preset: '../../jest.preset.js',
|
preset: '../../jest.preset.js',
|
||||||
transform: {
|
transform: {
|
||||||
'^.+\\.[tj]sx?$': 'babel-jest',
|
'^(?!.*\\.(js|jsx|ts|tsx|css|json)$)': '@nrwl/react/plugins/jest',
|
||||||
|
'^.+\\.[tj]sx?$': 'ts-jest',
|
||||||
},
|
},
|
||||||
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'],
|
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'],
|
||||||
coverageDirectory: '../../coverage/libs/withdraws',
|
coverageDirectory: '../../coverage/libs/withdraws',
|
||||||
|
@ -3,14 +3,15 @@
|
|||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"jsx": "react-jsx",
|
"jsx": "react-jsx",
|
||||||
"allowJs": true,
|
"allowJs": true,
|
||||||
"esModuleInterop": true,
|
|
||||||
"allowSyntheticDefaultImports": true,
|
"allowSyntheticDefaultImports": true,
|
||||||
"forceConsistentCasingInFileNames": true,
|
"forceConsistentCasingInFileNames": true,
|
||||||
"strict": true,
|
"strict": true,
|
||||||
"noImplicitOverride": true,
|
"noImplicitOverride": true,
|
||||||
"noPropertyAccessFromIndexSignature": true,
|
"noPropertyAccessFromIndexSignature": false,
|
||||||
"noImplicitReturns": true,
|
"noImplicitReturns": true,
|
||||||
"noFallthroughCasesInSwitch": true
|
"noFallthroughCasesInSwitch": true,
|
||||||
|
"resolveJsonModule": true,
|
||||||
|
"esModuleInterop": true
|
||||||
},
|
},
|
||||||
"files": [],
|
"files": [],
|
||||||
"include": [],
|
"include": [],
|
||||||
|
@ -27,7 +27,6 @@
|
|||||||
"@sentry/nextjs": "^6.19.3",
|
"@sentry/nextjs": "^6.19.3",
|
||||||
"@sentry/react": "^6.19.2",
|
"@sentry/react": "^6.19.2",
|
||||||
"@sentry/tracing": "^6.19.2",
|
"@sentry/tracing": "^6.19.2",
|
||||||
"@vegaprotocol/smart-contracts-sdk": "^1.6.0",
|
|
||||||
"@vegaprotocol/vegawallet-service-api-client": "^0.4.11",
|
"@vegaprotocol/vegawallet-service-api-client": "^0.4.11",
|
||||||
"@walletconnect/ethereum-provider": "^1.7.5",
|
"@walletconnect/ethereum-provider": "^1.7.5",
|
||||||
"@web3-react/core": "8.0.20-beta.0",
|
"@web3-react/core": "8.0.20-beta.0",
|
||||||
|
16
yarn.lock
16
yarn.lock
@ -6179,15 +6179,6 @@
|
|||||||
"@typescript-eslint/types" "5.22.0"
|
"@typescript-eslint/types" "5.22.0"
|
||||||
eslint-visitor-keys "^3.0.0"
|
eslint-visitor-keys "^3.0.0"
|
||||||
|
|
||||||
"@vegaprotocol/smart-contracts-sdk@^1.6.0":
|
|
||||||
version "1.6.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/@vegaprotocol/smart-contracts-sdk/-/smart-contracts-sdk-1.6.0.tgz#c689d5928148113dddbe39ed963c74817f432d5e"
|
|
||||||
integrity sha512-cNFDywrtrvR3V5WQL5BadMS8pckRaetXyxA5ttLZEghlpkMcz5BQ51GuAfK0ufank8vY3xYN0m1DalbfADQIGw==
|
|
||||||
dependencies:
|
|
||||||
deprecated-decorator "^0.1.6"
|
|
||||||
ethers "^5.5.2"
|
|
||||||
lodash "^4.17.21"
|
|
||||||
|
|
||||||
"@vegaprotocol/vegawallet-service-api-client@^0.4.11":
|
"@vegaprotocol/vegawallet-service-api-client@^0.4.11":
|
||||||
version "0.4.11"
|
version "0.4.11"
|
||||||
resolved "https://registry.yarnpkg.com/@vegaprotocol/vegawallet-service-api-client/-/vegawallet-service-api-client-0.4.11.tgz#41a623afc9957dcf8b5425f74280ba7861e92b74"
|
resolved "https://registry.yarnpkg.com/@vegaprotocol/vegawallet-service-api-client/-/vegawallet-service-api-client-0.4.11.tgz#41a623afc9957dcf8b5425f74280ba7861e92b74"
|
||||||
@ -10407,11 +10398,6 @@ depd@~1.1.2:
|
|||||||
resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9"
|
resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9"
|
||||||
integrity sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=
|
integrity sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=
|
||||||
|
|
||||||
deprecated-decorator@^0.1.6:
|
|
||||||
version "0.1.6"
|
|
||||||
resolved "https://registry.yarnpkg.com/deprecated-decorator/-/deprecated-decorator-0.1.6.tgz#00966317b7a12fe92f3cc831f7583af329b86c37"
|
|
||||||
integrity sha1-AJZjF7ehL+kvPMgx91g68ym4bDc=
|
|
||||||
|
|
||||||
deps-sort@^2.0.0, deps-sort@^2.0.1:
|
deps-sort@^2.0.0, deps-sort@^2.0.1:
|
||||||
version "2.0.1"
|
version "2.0.1"
|
||||||
resolved "https://registry.yarnpkg.com/deps-sort/-/deps-sort-2.0.1.tgz#9dfdc876d2bcec3386b6829ac52162cda9fa208d"
|
resolved "https://registry.yarnpkg.com/deps-sort/-/deps-sort-2.0.1.tgz#9dfdc876d2bcec3386b6829ac52162cda9fa208d"
|
||||||
@ -11478,7 +11464,7 @@ etag@1.8.1, etag@~1.8.1:
|
|||||||
resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887"
|
resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887"
|
||||||
integrity sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=
|
integrity sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=
|
||||||
|
|
||||||
ethers@^5.5.2, ethers@^5.6.0:
|
ethers@^5.6.0:
|
||||||
version "5.6.2"
|
version "5.6.2"
|
||||||
resolved "https://registry.yarnpkg.com/ethers/-/ethers-5.6.2.tgz#e75bac7f038c5e0fdde667dba62fc223924143a2"
|
resolved "https://registry.yarnpkg.com/ethers/-/ethers-5.6.2.tgz#e75bac7f038c5e0fdde667dba62fc223924143a2"
|
||||||
integrity sha512-EzGCbns24/Yluu7+ToWnMca3SXJ1Jk1BvWB7CCmVNxyOeM4LLvw2OLuIHhlkhQk1dtOcj9UMsdkxUh8RiG1dxQ==
|
integrity sha512-EzGCbns24/Yluu7+ToWnMca3SXJ1Jk1BvWB7CCmVNxyOeM4LLvw2OLuIHhlkhQk1dtOcj9UMsdkxUh8RiG1dxQ==
|
||||||
|
Loading…
Reference in New Issue
Block a user