Skip to content

Commit b58c5a1

Browse files
authored
feat!: move to a new @Lifi scope (#85)
1 parent 865bc14 commit b58c5a1

31 files changed

+132
-174
lines changed

.github/workflows/beta-release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ jobs:
1717
publish:
1818
runs-on: ubuntu-latest
1919
steps:
20-
- uses: actions/checkout@v2
20+
- uses: actions/checkout@v3
2121
- name: Setup .npmrc file to publish to npm
22-
uses: actions/setup-node@v1
22+
uses: actions/setup-node@v3
2323
with:
2424
node-version: '14.x'
2525
registry-url: 'https://registry.npmjs.org'
@@ -38,7 +38,7 @@ jobs:
3838
env:
3939
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
4040
- name: Setup .npmrc file to publish to GitHub Packages
41-
uses: actions/setup-node@v1
41+
uses: actions/setup-node@v3
4242
with:
4343
node-version: '14.x'
4444
registry-url: 'https://npm.pkg.github.com'

.github/workflows/publish.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
runs-on: ubuntu-latest
1212
steps:
1313
- name: Checkout code
14-
uses: actions/checkout@v2
14+
uses: actions/checkout@v3
1515
- name: Create Release
1616
id: create_release
1717
uses: actions/create-release@v1
@@ -26,11 +26,11 @@ jobs:
2626
publish:
2727
runs-on: ubuntu-latest
2828
steps:
29-
- uses: actions/checkout@v2
29+
- uses: actions/checkout@v3
3030
- name: Setup .npmrc file to publish to npm
31-
uses: actions/setup-node@v1
31+
uses: actions/setup-node@v3
3232
with:
33-
node-version: '14.x'
33+
node-version: 14
3434
registry-url: 'https://registry.npmjs.org'
3535
- name: Install modules
3636
run: yarn install
@@ -41,9 +41,9 @@ jobs:
4141
env:
4242
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
4343
- name: Setup .npmrc file to publish to GitHub Packages
44-
uses: actions/setup-node@v1
44+
uses: actions/setup-node@v3
4545
with:
46-
node-version: '14.x'
46+
node-version: 14
4747
registry-url: 'https://npm.pkg.github.com'
4848
scope: '@lifinance'
4949
- run: npm run addscope

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
1-
# Li.Finance - SDK
1+
# LI.FI - SDK
22

3-
LiFi Any-to-Any Cross-Chain-Swap SDK
4-
Please checkout the [SDK docs](https://docs.li.finance/official-documentation/sdk-docs/quick-start) and our [API reference](https://apidocs.li.finance/reference/how-to-transfer-tokens) for further information.
3+
LI.FI Any-to-Any Cross-Chain-Swap SDK
4+
Please checkout the [SDK docs](https://docs.li.fi/official-documentation/sdk-docs/quick-start) and our [API reference](https://apidocs.li.fi) for further information.
55

66
## Installation
77

88
```bash
9-
yarn add @lifinance/sdk
9+
yarn add @lifi/sdk
1010
```
1111

1212
or
1313

1414
```bash
15-
npm install --save @lifinance/sdk
15+
npm install --save @lifi/sdk
1616
```
1717

1818
## Summary
1919

20-
This package allows accessing to LiFi API which finds the best cross-chain routes on different bridges. The routes can
21-
then be executed via the SDK. Learn more about LiFi on (https://li.finance).
20+
This package allows accessing to LI.FI API which finds the best cross-chain routes on different bridges. The routes can
21+
then be executed via the SDK. Learn more about LI.FI on (https://li.fi).
2222

2323
Check out the [Changelog](./CHANGELOG.md) to see what changed in the last releases.
2424

e2e/allowance.e2e.ts

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1+
import { ChainId, CoinKey, findDefaultToken, Token } from '@lifi/types'
2+
import BigNumber from 'bignumber.js'
3+
import { constants, providers, Signer, Wallet } from 'ethers'
14
import {
25
approveToken,
36
bulkGetTokenApproval,
47
getTokenApproval,
58
revokeTokenApproval,
69
} from '../src/allowance'
7-
import { constants, providers, Signer, Wallet } from 'ethers'
8-
import { ChainId, CoinKey, findDefaultToken, Token } from '@lifinance/types'
9-
import BigNumber from 'bignumber.js'
10-
import { sleep } from '../src/utils/utils'
1110
import { getApproved, setApproval } from '../src/allowance/utils'
11+
import { sleep } from '../src/utils/utils'
1212

1313
const USDC_ON_DAI = findDefaultToken(CoinKey.USDC, ChainId.DAI)
1414
const USDT_ON_DAI = findDefaultToken(CoinKey.USDT, ChainId.DAI)
@@ -71,8 +71,8 @@ describe('allowance e2e tests', () => {
7171
token: USDC_ON_DAI,
7272
approvalAddress: SUSHISWAP_APPROVAL_ADDRESS_ON_DAI,
7373
amount,
74-
infiniteApproval: false
75-
})
74+
infiniteApproval: false,
75+
})
7676

7777
await checkSetApproval(USDC_ON_DAI.address, amount)
7878
})
@@ -87,8 +87,8 @@ describe('allowance e2e tests', () => {
8787
token: USDC_ON_DAI,
8888
approvalAddress: SUSHISWAP_APPROVAL_ADDRESS_ON_DAI,
8989
amount,
90-
infiniteApproval: true
91-
})
90+
infiniteApproval: true,
91+
})
9292

9393
await checkSetApproval(
9494
USDC_ON_DAI.address,
@@ -108,8 +108,8 @@ describe('allowance e2e tests', () => {
108108
token: USDC_ON_DAI,
109109
approvalAddress: SUSHISWAP_APPROVAL_ADDRESS_ON_DAI,
110110
amount,
111-
infiniteApproval: false
112-
})
111+
infiniteApproval: false,
112+
})
113113

114114
await sleep(2000)
115115

@@ -120,7 +120,7 @@ describe('allowance e2e tests', () => {
120120
await revokeTokenApproval({
121121
signer,
122122
token: USDC_ON_DAI,
123-
approvalAddress: SUSHISWAP_APPROVAL_ADDRESS_ON_DAI
123+
approvalAddress: SUSHISWAP_APPROVAL_ADDRESS_ON_DAI,
124124
})
125125

126126
await sleep(2000)
@@ -140,7 +140,7 @@ describe('allowance e2e tests', () => {
140140
token: USDC_ON_DAI,
141141
approvalAddress: SUSHISWAP_APPROVAL_ADDRESS_ON_DAI,
142142
amount,
143-
infiniteApproval: false
143+
infiniteApproval: false,
144144
})
145145

146146
await sleep(2000)
@@ -173,7 +173,7 @@ describe('allowance e2e tests', () => {
173173
token: USDT_ON_DAI,
174174
approvalAddress: SUSHISWAP_APPROVAL_ADDRESS_ON_DAI,
175175
amount,
176-
infiniteApproval: false
176+
infiniteApproval: false,
177177
})
178178

179179
await sleep(2000)

npm.README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
### Installation
22

33
```bash
4-
yarn add @lifinance/sdk
4+
yarn add @lifi/sdk
55
```
66

77
or
88

99
```bash
10-
npm install --save @lifinance/sdk
10+
npm install --save @lifi/sdk
1111
```
1212

1313
### Summary
1414

15-
This package allows accessing to LiFi API which finds the best cross-chain routes on different bridges. The routes can
16-
then be executed via the SDK. Learn more about LiFi on (https://li.finance).
15+
This package allows accessing to LI.FI API which finds the best cross-chain routes on different bridges. The routes can
16+
then be executed via the SDK. Learn more about LI.FI on (https://li.fi).

package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
2-
"name": "@lifinance/sdk",
2+
"name": "@lifi/sdk",
33
"version": "1.0.0",
4-
"description": "LiFi Any-to-Any Cross-Chain-Swap SDK",
4+
"description": "LI.FI Any-to-Any Cross-Chain-Swap SDK",
55
"main": "./dist/index.js",
66
"types": "./dist/index.d.ts",
77
"scripts": {
@@ -13,7 +13,7 @@
1313
"test:unit": "yarn test .unit.spec.ts",
1414
"test:cov": "jest --coverage --no-cache --runInBand --forceExit",
1515
"test:e2e": "jest -c jest.e2e.config.js",
16-
"addscope": "node tools/packagejson name @lifinance/sdk",
16+
"addscope": "node tools/packagejson name @lifi/sdk",
1717
"pre-commit": "lint-staged",
1818
"pre-push": "yarn types:check && yarn build && yarn test:unit",
1919
"lint": "eslint --ext .tsx --ext .ts ./src",
@@ -52,7 +52,7 @@
5252
"dependencies": {
5353
"@ethersproject/abi": "^5.6.4",
5454
"@ethersproject/contracts": "^5.6.2",
55-
"@lifinance/types": "^0.14.16",
55+
"@lifi/types": "^1.0.0",
5656
"axios": "^0.27.2",
5757
"bignumber.js": "^9.0.1",
5858
"eth-rpc-errors": "^4.0.3",
@@ -66,8 +66,8 @@
6666
"@types/hdkey": "^2.0.0",
6767
"@types/jest": "^28.1.4",
6868
"@types/websocket": "^1.0.4",
69-
"@typescript-eslint/eslint-plugin": "^5.30.5",
70-
"@typescript-eslint/parser": "^5.30.5",
69+
"@typescript-eslint/eslint-plugin": "^5.30.6",
70+
"@typescript-eslint/parser": "^5.30.6",
7171
"eslint": "^8.19.0",
7272
"eslint-config-prettier": "^8.3.0",
7373
"eslint-plugin-prettier": "^4.2.1",

src/Lifi.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import {
1919
TokensResponse,
2020
ToolsRequest,
2121
ToolsResponse,
22-
} from '@lifinance/types'
22+
} from '@lifi/types'
2323
import { Signer } from 'ethers'
2424
import {
2525
approveToken,

src/Lifi.unit.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ChainId, CoinKey, findDefaultToken, Token } from '@lifinance/types'
1+
import { ChainId, CoinKey, findDefaultToken, Token } from '@lifi/types'
22
import balances from './balances'
33
import Lifi from './Lifi'
44

src/allowance/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Token } from '@lifinance/types'
1+
import { Token } from '@lifi/types'
22
import BigNumber from 'bignumber.js'
33
import { constants, Signer } from 'ethers'
44
import { isSameToken } from '../helpers'

src/allowance/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ChainId, Token } from '@lifinance/types'
1+
import { ChainId, Token } from '@lifi/types'
22
import BigNumber from 'bignumber.js'
33
import { Contract, ContractTransaction, Signer } from 'ethers'
44
import ChainsService from '../services/ChainsService'

0 commit comments

Comments
 (0)