@reef-chain/react-lib 2.0.1 → 2.0.2-alpha2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,14 +1,7 @@
1
- import { Token } from './token';
2
- export type AvailableNetworks = 'mainnet' | 'testnet' | 'localhost';
3
- export interface Bond {
4
- name: string;
5
- description: string;
6
- contractAddress: string;
7
- validatorAddress: string;
8
- stake: Token;
9
- farm: Token;
10
- apy: string;
11
- }
1
+ import { network } from '@reef-chain/util-lib';
2
+ declare const networks: string[];
3
+ export type AvailableNetworks = typeof networks[number];
4
+ type Bond = typeof network.Bond;
12
5
  export interface Network {
13
6
  rpcUrl: string;
14
7
  reefscanUrl: string;
@@ -21,6 +14,6 @@ export interface Network {
21
14
  genesisHash: string;
22
15
  bonds: Bond[];
23
16
  }
24
- export declare const SS58_REEF = 42;
25
17
  export type Networks = Record<AvailableNetworks, Network>;
26
18
  export declare const availableNetworks: Networks;
19
+ export {};
@@ -58,6 +58,7 @@ export declare const createEmptyToken: () => Token;
58
58
  export declare const createEmptyTokenWithAmount: (isEmpty?: boolean) => TokenWithAmount;
59
59
  export declare const toTokenAmount: (token: Token, state: TokenState) => TokenWithAmount;
60
60
  export declare function isNativeTransfer(token: Token): boolean;
61
+ export declare const REEF_TOKEN: Token;
61
62
  export declare const checkMinExistentialReefAmount: (token: TokenWithAmount, reefBalance: BigNumber) => {
62
63
  valid: boolean;
63
64
  message?: string | undefined;
@@ -65,7 +66,6 @@ export declare const checkMinExistentialReefAmount: (token: TokenWithAmount, ree
65
66
  };
66
67
  export declare const ensureTokenAmount: (token: TokenWithAmount) => void;
67
68
  export declare const ensureExistentialReefAmount: (token: TokenWithAmount, reefBalance: BigNumber) => void;
68
- export declare const REEF_TOKEN: Token;
69
69
  export declare const reefTokenWithAmount: () => TokenWithAmount;
70
70
  export declare const getTokenPrice: (address: string, prices: TokenPrices) => BN;
71
71
  export declare const isNativeAddress: (toAddress: string) => boolean;
@@ -23,10 +23,4 @@ export declare const formatAgoDate: (timestamp: number | string) => string;
23
23
  export declare const dropDuplicatesMultiKey: <Obj, Key extends keyof Obj>(objects: Obj[], keys: Key[]) => Obj[];
24
24
  export declare const fromReefEVMAddressWithNotification: (address: string) => string;
25
25
  export declare const toReefEVMAddressWithNotification: (address: string) => string;
26
- /**
27
- * Returns icnUrl if exists, otherwise return sample icon based on calculated
28
- * checksum from provided address. Returned sample icon is svg encoded to base64
29
- * and prefixed with data string, so it can be used directly with <img /> tag.
30
- */
31
- export declare const getIconUrl: (tokenAddress?: string) => string;
32
26
  export declare const showEvmCopyAddressAlert: () => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reef-chain/react-lib",
3
- "version": "2.0.1",
3
+ "version": "2.0.2-alpha2",
4
4
  "description": "Reef React Library",
5
5
  "author": "Reef chain",
6
6
  "license": "MIT",
@@ -17,7 +17,8 @@
17
17
  "start": "yarn run mb watch --no-compress",
18
18
  "prepare": "run-s build",
19
19
  "test": "run-s test:unit test:lint test:build",
20
- "lint": "yarn prettier ./src && eslint --fix --ext .ts,.tsx ./src/",
20
+ "lint": "yarn prettier ./src && eslint --ext .ts,.tsx ./src/",
21
+ "lint:fix": "yarn prettier ./src && eslint --fix --ext .ts,.tsx ./src/",
21
22
  "test:build": "run-s build",
22
23
  "test:lint": "eslint .",
23
24
  "test:unit": "cross-env CI=1 react-scripts test --env=jsdom",
@@ -30,9 +31,9 @@
30
31
  "@fortawesome/free-solid-svg-icons": "^6.1.0",
31
32
  "@polkadot/extension-dapp": "^0.40.4",
32
33
  "@polkadot/react-identicon": "^0.86.4",
33
- "@reef-chain/evm-provider": "^1.0.12",
34
+ "@reef-chain/evm-provider": "^2.0.0-alpha6",
34
35
  "@reef-chain/ui-kit": "^1.1.5",
35
- "@reef-chain/util-lib": "^1.0.0-rc9",
36
+ "@reef-chain/util-lib": "^2.0.0-alpha2",
36
37
  "@reef-defi/extension-base": "^1.0.14",
37
38
  "@reef-defi/extension-dapp": "^1.0.14",
38
39
  "@reef-defi/extension-inject": "^1.0.14",
@@ -51,7 +52,8 @@
51
52
  "resolutions": {
52
53
  "@types/react": "17.0.2",
53
54
  "@types/react-dom": "17.0.2",
54
- "ethers": "^5.7.0"
55
+ "ethers": "^5.7.0",
56
+ "@reef-chain/util-lib": "2.0.0-alpha1"
55
57
  },
56
58
  "peerDependencies": {
57
59
  "react": "^17.0.2"