@lifi/widget 3.12.3 → 3.12.5
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.
- package/CHANGELOG.md +10 -0
- package/dist/esm/components/PoweredBy/PoweredBy.js +13 -1
- package/dist/esm/components/PoweredBy/PoweredBy.js.map +1 -1
- package/dist/esm/config/version.d.ts +1 -1
- package/dist/esm/config/version.js +1 -1
- package/dist/esm/hooks/useFromTokenSufficiency.js +1 -1
- package/dist/esm/hooks/useFromTokenSufficiency.js.map +1 -1
- package/dist/esm/types/widget.d.ts +2 -0
- package/package.json +16 -16
- package/src/components/PoweredBy/PoweredBy.tsx +16 -2
- package/src/config/version.ts +1 -1
- package/src/hooks/useFromTokenSufficiency.ts +1 -1
- package/src/types/widget.ts +3 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
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.
|
|
4
4
|
|
|
5
|
+
### [3.12.5](https://github.com/lifinance/widget/compare/v3.12.4...v3.12.5) (2024-12-13)
|
|
6
|
+
|
|
7
|
+
### [3.12.4](https://github.com/lifinance/widget/compare/v3.12.3...v3.12.4) (2024-12-12)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### Bug Fixes
|
|
11
|
+
|
|
12
|
+
* improve powered by with dynamic configuration ([#332](https://github.com/lifinance/widget/issues/332)) ([6ae3abb](https://github.com/lifinance/widget/commit/6ae3abbca2140fcda5c9a3ce1f014b27651141aa))
|
|
13
|
+
* keep previous data only when wallet is connected ([1b4df34](https://github.com/lifinance/widget/commit/1b4df3448f69c1639a1edc23d5b70ad66b0538e9))
|
|
14
|
+
|
|
5
15
|
### [3.12.3](https://github.com/lifinance/widget/compare/v3.12.2...v3.12.3) (2024-12-05)
|
|
6
16
|
|
|
7
17
|
### [3.12.2](https://github.com/lifinance/widget/compare/v3.12.1...v3.12.2) (2024-11-19)
|
|
@@ -1,12 +1,24 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Box, Tooltip, Typography } from '@mui/material';
|
|
3
3
|
import { version } from '../../config/version.js';
|
|
4
|
+
import { useWidgetConfig } from '../../providers/WidgetProvider/WidgetProvider.js';
|
|
4
5
|
import { Link } from './PoweredBy.style.js';
|
|
6
|
+
const poweredByConfig = {
|
|
7
|
+
default: {
|
|
8
|
+
url: 'https://li.fi',
|
|
9
|
+
text: 'LI.FI',
|
|
10
|
+
},
|
|
11
|
+
jumper: {
|
|
12
|
+
url: 'https://jumper.exchange',
|
|
13
|
+
text: 'Jumper',
|
|
14
|
+
},
|
|
15
|
+
};
|
|
5
16
|
export const PoweredBy = () => {
|
|
17
|
+
const { poweredBy = 'default' } = useWidgetConfig();
|
|
6
18
|
return (_jsx(Box, { pt: 1, pb: 2, flex: 1, sx: {
|
|
7
19
|
display: 'flex',
|
|
8
20
|
alignItems: 'flex-end',
|
|
9
21
|
justifyContent: 'flex-end',
|
|
10
|
-
}, children: _jsx(Tooltip, { title: `v${version}`, enterDelay: 1000, children: _jsxs(Link, { href:
|
|
22
|
+
}, children: _jsx(Tooltip, { title: `v${version}`, enterDelay: 1000, children: _jsxs(Link, { href: poweredByConfig[poweredBy].url, target: "_blank", underline: "none", color: "text.primary", children: [_jsx(Typography, { color: "text.secondary", fontSize: 12, fontWeight: 500, px: 0.5, children: "Powered by" }), _jsx(Typography, { color: "text.primary", fontSize: 12, fontWeight: 600, children: poweredByConfig[poweredBy].text })] }) }) }));
|
|
11
23
|
};
|
|
12
24
|
//# sourceMappingURL=PoweredBy.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PoweredBy.js","sourceRoot":"","sources":["../../../../src/components/PoweredBy/PoweredBy.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAC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,EAAE,UAAU;SAC3B,YAED,KAAC,OAAO,IAAC,KAAK,EAAE,IAAI,OAAO,EAAE,EAAE,UAAU,EAAE,IAAI,YAC7C,MAAC,IAAI,IACH,IAAI,EAAE,eAAe,CAAC,SAAS,CAAC,CAAC,GAAG,EACpC,MAAM,EAAC,QAAQ,EACf,SAAS,EAAC,MAAM,EAChB,KAAK,EAAC,cAAc,aAEpB,KAAC,UAAU,IACT,KAAK,EAAC,gBAAgB,EACtB,QAAQ,EAAE,EAAE,EACZ,UAAU,EAAE,GAAG,EACf,EAAE,EAAE,GAAG,2BAGI,EACb,KAAC,UAAU,IAAC,KAAK,EAAC,cAAc,EAAC,QAAQ,EAAE,EAAE,EAAE,UAAU,EAAE,GAAG,YAC3D,eAAe,CAAC,SAAS,CAAC,CAAC,IAAI,GACrB,IACR,GACC,GACN,CACP,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export declare const name = "@lifi/widget";
|
|
2
|
-
export declare const version = "3.12.
|
|
2
|
+
export declare const version = "3.12.5";
|
|
@@ -51,7 +51,7 @@ export const useFromTokenSufficiency = (route) => {
|
|
|
51
51
|
enabled: Boolean(account.address && token && !isTokenAddressBalanceLoading),
|
|
52
52
|
refetchInterval,
|
|
53
53
|
staleTime: refetchInterval,
|
|
54
|
-
placeholderData: keepPreviousData,
|
|
54
|
+
placeholderData: account.address ? keepPreviousData : undefined,
|
|
55
55
|
});
|
|
56
56
|
return {
|
|
57
57
|
insufficientFromToken,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useFromTokenSufficiency.js","sourceRoot":"","sources":["../../../src/hooks/useFromTokenSufficiency.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAA;AACpD,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAClE,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAA;AACjC,OA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AAC,EAAE,MAAM,IAAI,EAAE,CAAA;YACtD,MAAM,iBAAiB,GACrB,MAAM,CAAC,aAAa,CAAC,UAAU,CAAC,GAAG,mBAAmB,CAAA;YACxD,OAAO,iBAAiB,CAAA;QAC1B,CAAC;QAED,OAAO,EAAE,OAAO,CAAC,OAAO,CAAC,OAAO,IAAI,KAAK,IAAI,CAAC,4BAA4B,CAAC;QAC3E,eAAe;QACf,SAAS,EAAE,eAAe;QAC1B,eAAe,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,SAAS;KAChE,CAAC,CAAA;IAEF,OAAO;QACL,qBAAqB;QACrB,SAAS;KACV,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -124,6 +124,7 @@ export type WidgetTokens = {
|
|
|
124
124
|
export type WidgetLanguages = {
|
|
125
125
|
default?: LanguageKey;
|
|
126
126
|
} & AllowDeny<LanguageKey>;
|
|
127
|
+
export type PoweredByType = 'default' | 'jumper';
|
|
127
128
|
export interface WidgetConfig {
|
|
128
129
|
fromChain?: number;
|
|
129
130
|
toChain?: number;
|
|
@@ -166,6 +167,7 @@ export interface WidgetConfig {
|
|
|
166
167
|
languages?: WidgetLanguages;
|
|
167
168
|
languageResources?: LanguageResources;
|
|
168
169
|
explorerUrls?: Record<number, string[]> & Partial<Record<'internal', string[]>>;
|
|
170
|
+
poweredBy?: PoweredByType;
|
|
169
171
|
}
|
|
170
172
|
export interface FormFieldOptions {
|
|
171
173
|
setUrlSearchParam: boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lifi/widget",
|
|
3
|
-
"version": "3.12.
|
|
3
|
+
"version": "3.12.5",
|
|
4
4
|
"description": "LI.FI Widget for cross-chain bridging and swapping. It will drive your multi-chain strategy and attract new users from everywhere.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/esm/index.js",
|
|
@@ -30,33 +30,33 @@
|
|
|
30
30
|
"lifi"
|
|
31
31
|
],
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@bigmi/client": "^0.0.
|
|
34
|
-
"@bigmi/core": "^0.0.
|
|
35
|
-
"@bigmi/react": "^0.0.
|
|
36
|
-
"@emotion/react": "^11.
|
|
37
|
-
"@emotion/styled": "^11.
|
|
38
|
-
"@lifi/sdk": "^3.4.
|
|
39
|
-
"@mui/icons-material": "^5.16.
|
|
33
|
+
"@bigmi/client": "^0.0.6",
|
|
34
|
+
"@bigmi/core": "^0.0.6",
|
|
35
|
+
"@bigmi/react": "^0.0.6",
|
|
36
|
+
"@emotion/react": "^11.14.0",
|
|
37
|
+
"@emotion/styled": "^11.14.0",
|
|
38
|
+
"@lifi/sdk": "^3.4.3",
|
|
39
|
+
"@mui/icons-material": "^5.16.11",
|
|
40
40
|
"@mui/lab": "5.0.0-alpha.174",
|
|
41
|
-
"@mui/material": "^5.16.
|
|
41
|
+
"@mui/material": "^5.16.11",
|
|
42
42
|
"@mui/system": "^5.16.8",
|
|
43
43
|
"@solana/wallet-adapter-base": "^0.9.23",
|
|
44
44
|
"@solana/wallet-adapter-react": "^0.15.35",
|
|
45
45
|
"@solana/web3.js": "^1.95.8",
|
|
46
|
-
"@tanstack/react-query": "^5.62.
|
|
47
|
-
"@tanstack/react-virtual": "^3.
|
|
48
|
-
"i18next": "^24.0
|
|
46
|
+
"@tanstack/react-query": "^5.62.7",
|
|
47
|
+
"@tanstack/react-virtual": "^3.11.1",
|
|
48
|
+
"i18next": "^24.1.0",
|
|
49
49
|
"microdiff": "^1.4.0",
|
|
50
50
|
"mitt": "^3.0.1",
|
|
51
51
|
"react": "^18.3.1",
|
|
52
52
|
"react-dom": "^18.3.1",
|
|
53
|
-
"react-i18next": "^15.
|
|
53
|
+
"react-i18next": "^15.2.0",
|
|
54
54
|
"react-intersection-observer": "^9.13.1",
|
|
55
55
|
"react-router-dom": "^6.28.0",
|
|
56
|
-
"viem": "^2.21.
|
|
57
|
-
"wagmi": "^2.
|
|
56
|
+
"viem": "^2.21.55",
|
|
57
|
+
"wagmi": "^2.14.1",
|
|
58
58
|
"zustand": "^5.0.2",
|
|
59
|
-
"@lifi/wallet-management": "^3.4.
|
|
59
|
+
"@lifi/wallet-management": "^3.4.7"
|
|
60
60
|
},
|
|
61
61
|
"peerDependencies": {
|
|
62
62
|
"react": ">=18",
|
|
@@ -1,8 +1,22 @@
|
|
|
1
1
|
import { Box, Tooltip, Typography } from '@mui/material'
|
|
2
2
|
import { version } from '../../config/version.js'
|
|
3
|
+
import { useWidgetConfig } from '../../providers/WidgetProvider/WidgetProvider.js'
|
|
3
4
|
import { Link } from './PoweredBy.style.js'
|
|
4
5
|
|
|
6
|
+
const poweredByConfig = {
|
|
7
|
+
default: {
|
|
8
|
+
url: 'https://li.fi',
|
|
9
|
+
text: 'LI.FI',
|
|
10
|
+
},
|
|
11
|
+
jumper: {
|
|
12
|
+
url: 'https://jumper.exchange',
|
|
13
|
+
text: 'Jumper',
|
|
14
|
+
},
|
|
15
|
+
}
|
|
16
|
+
|
|
5
17
|
export const PoweredBy: React.FC = () => {
|
|
18
|
+
const { poweredBy = 'default' } = useWidgetConfig()
|
|
19
|
+
|
|
6
20
|
return (
|
|
7
21
|
<Box
|
|
8
22
|
pt={1}
|
|
@@ -16,7 +30,7 @@ export const PoweredBy: React.FC = () => {
|
|
|
16
30
|
>
|
|
17
31
|
<Tooltip title={`v${version}`} enterDelay={1000}>
|
|
18
32
|
<Link
|
|
19
|
-
href=
|
|
33
|
+
href={poweredByConfig[poweredBy].url}
|
|
20
34
|
target="_blank"
|
|
21
35
|
underline="none"
|
|
22
36
|
color="text.primary"
|
|
@@ -30,7 +44,7 @@ export const PoweredBy: React.FC = () => {
|
|
|
30
44
|
Powered by
|
|
31
45
|
</Typography>
|
|
32
46
|
<Typography color="text.primary" fontSize={12} fontWeight={600}>
|
|
33
|
-
|
|
47
|
+
{poweredByConfig[poweredBy].text}
|
|
34
48
|
</Typography>
|
|
35
49
|
</Link>
|
|
36
50
|
</Tooltip>
|
package/src/config/version.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export const name = '@lifi/widget'
|
|
2
|
-
export const version = '3.12.
|
|
2
|
+
export const version = '3.12.5'
|
|
@@ -77,7 +77,7 @@ export const useFromTokenSufficiency = (route?: RouteExtended) => {
|
|
|
77
77
|
enabled: Boolean(account.address && token && !isTokenAddressBalanceLoading),
|
|
78
78
|
refetchInterval,
|
|
79
79
|
staleTime: refetchInterval,
|
|
80
|
-
placeholderData: keepPreviousData,
|
|
80
|
+
placeholderData: account.address ? keepPreviousData : undefined,
|
|
81
81
|
})
|
|
82
82
|
|
|
83
83
|
return {
|
package/src/types/widget.ts
CHANGED
|
@@ -188,6 +188,8 @@ export type WidgetLanguages = {
|
|
|
188
188
|
default?: LanguageKey
|
|
189
189
|
} & AllowDeny<LanguageKey>
|
|
190
190
|
|
|
191
|
+
export type PoweredByType = 'default' | 'jumper'
|
|
192
|
+
|
|
191
193
|
export interface WidgetConfig {
|
|
192
194
|
fromChain?: number
|
|
193
195
|
toChain?: number
|
|
@@ -239,6 +241,7 @@ export interface WidgetConfig {
|
|
|
239
241
|
languageResources?: LanguageResources
|
|
240
242
|
explorerUrls?: Record<number, string[]> &
|
|
241
243
|
Partial<Record<'internal', string[]>>
|
|
244
|
+
poweredBy?: PoweredByType
|
|
242
245
|
}
|
|
243
246
|
|
|
244
247
|
export interface FormFieldOptions {
|