@rango-dev/widget-embedded 0.29.1-next.17 → 0.29.1-next.19
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/dist/components/Quote/Quote.styles.d.ts +1 -1
- package/dist/components/RefreshModal/RefreshModal.styles.d.ts +1 -1
- package/dist/containers/Wallets/Wallets.d.ts.map +1 -1
- package/dist/hooks/useWalletList.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +2 -2
- package/dist/store/slices/config.d.ts.map +1 -1
- package/dist/types/config.d.ts +7 -0
- package/dist/types/config.d.ts.map +1 -1
- package/dist/utils/providers.d.ts +1 -0
- package/dist/utils/providers.d.ts.map +1 -1
- package/dist/widget-embedded.build.json +1 -1
- package/package.json +6 -6
- package/src/components/TokenList/TokenList.tsx +4 -4
- package/src/containers/Wallets/Wallets.tsx +1 -0
- package/src/hooks/useWalletList.ts +1 -0
- package/src/store/slices/config.ts +4 -0
- package/src/types/config.ts +8 -0
- package/src/utils/providers.ts +4 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rango-dev/widget-embedded",
|
|
3
|
-
"version": "0.29.1-next.
|
|
3
|
+
"version": "0.29.1-next.19",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"source": "./src/index.ts",
|
|
@@ -25,14 +25,14 @@
|
|
|
25
25
|
"@lingui/core": "4.2.1",
|
|
26
26
|
"@lingui/react": "4.2.1",
|
|
27
27
|
"@rango-dev/logging-core": "^0.4.0",
|
|
28
|
-
"@rango-dev/provider-all": "^0.34.1-next.
|
|
28
|
+
"@rango-dev/provider-all": "^0.34.1-next.7",
|
|
29
29
|
"@rango-dev/queue-manager-core": "^0.26.0",
|
|
30
|
-
"@rango-dev/queue-manager-rango-preset": "^0.34.1-next.
|
|
30
|
+
"@rango-dev/queue-manager-rango-preset": "^0.34.1-next.7",
|
|
31
31
|
"@rango-dev/queue-manager-react": "^0.26.0",
|
|
32
32
|
"@rango-dev/signer-solana": "^0.29.1-next.1",
|
|
33
|
-
"@rango-dev/ui": "^0.35.1-next.
|
|
34
|
-
"@rango-dev/wallets-react": "^0.20.1-next.
|
|
35
|
-
"@rango-dev/wallets-shared": "^0.34.1-next.
|
|
33
|
+
"@rango-dev/ui": "^0.35.1-next.9",
|
|
34
|
+
"@rango-dev/wallets-react": "^0.20.1-next.5",
|
|
35
|
+
"@rango-dev/wallets-shared": "^0.34.1-next.5",
|
|
36
36
|
"bignumber.js": "^9.1.1",
|
|
37
37
|
"copy-to-clipboard": "^3.3.3",
|
|
38
38
|
"dayjs": "^1.11.7",
|
|
@@ -136,17 +136,17 @@ export function TokenList(props: PropTypes) {
|
|
|
136
136
|
) as BlockchainMeta;
|
|
137
137
|
const colors = createTintsAndShades(blockchain.color, 'main');
|
|
138
138
|
const customCssForTag = {
|
|
139
|
-
$$color: colors.
|
|
139
|
+
$$color: colors.main150,
|
|
140
140
|
[`.${darkTheme} &`]: {
|
|
141
|
-
$$color: colors.
|
|
141
|
+
$$color: colors.main750,
|
|
142
142
|
},
|
|
143
143
|
backgroundColor: '$$color',
|
|
144
144
|
};
|
|
145
145
|
|
|
146
146
|
const customCssForTagTitle = {
|
|
147
|
-
$$color: colors.
|
|
147
|
+
$$color: colors.main750,
|
|
148
148
|
[`.${darkTheme} &`]: {
|
|
149
|
-
$$color: colors.
|
|
149
|
+
$$color: colors.main150,
|
|
150
150
|
},
|
|
151
151
|
color: '$$color',
|
|
152
152
|
};
|
|
@@ -38,6 +38,7 @@ function Main(props: PropsWithChildren<PropTypes>) {
|
|
|
38
38
|
|
|
39
39
|
const walletOptions: ProvidersOptions = {
|
|
40
40
|
walletConnectProjectId: config?.walletConnectProjectId,
|
|
41
|
+
trezorManifest: config?.trezorManifest,
|
|
41
42
|
walletConnectListedDesktopWalletLink:
|
|
42
43
|
props.config.__UNSTABLE_OR_INTERNAL__
|
|
43
44
|
?.walletConnectListedDesktopWalletLink,
|
|
@@ -46,6 +46,7 @@ export function useWalletList(params: Params) {
|
|
|
46
46
|
/** It can be what has been set by widget config or as a fallback we use all the supported wallets by our library */
|
|
47
47
|
const listAvailableWalletTypes =
|
|
48
48
|
configWalletsToWalletName(config?.wallets, {
|
|
49
|
+
trezorManifest: config?.trezorManifest,
|
|
49
50
|
walletConnectProjectId: config?.walletConnectProjectId,
|
|
50
51
|
walletConnectListedDesktopWalletLink:
|
|
51
52
|
config.__UNSTABLE_OR_INTERNAL__?.walletConnectListedDesktopWalletLink,
|
|
@@ -9,6 +9,10 @@ export const DEFAULT_CONFIG: WidgetConfig = {
|
|
|
9
9
|
excludeLiquiditySources: true,
|
|
10
10
|
customDestination: true,
|
|
11
11
|
variant: 'default',
|
|
12
|
+
trezorManifest: {
|
|
13
|
+
appUrl: 'https://widget.rango.exchange/',
|
|
14
|
+
email: 'hi+trezorwidget@rango.exchange',
|
|
15
|
+
},
|
|
12
16
|
};
|
|
13
17
|
|
|
14
18
|
interface IframeConfigs {
|
package/src/types/config.ts
CHANGED
|
@@ -145,6 +145,11 @@ export type Features = Partial<
|
|
|
145
145
|
> &
|
|
146
146
|
Partial<Record<'experimentalRoute', 'disabled' | 'enabled'>>;
|
|
147
147
|
|
|
148
|
+
export type TrezorManifest = {
|
|
149
|
+
appUrl: string;
|
|
150
|
+
email: string;
|
|
151
|
+
};
|
|
152
|
+
|
|
148
153
|
/**
|
|
149
154
|
* The type WidgetConfig defines the configuration options for a widget, including API key, affiliate
|
|
150
155
|
* reference, amount, blockchain and token configurations, liquidity sources, wallet types, language,
|
|
@@ -158,6 +163,8 @@ export type Features = Partial<
|
|
|
158
163
|
* @property {BlockchainAndTokenConfig} from - The `from` property is an optional property of type
|
|
159
164
|
* `BlockchainAndTokenConfig` that specifies the default blockchain and token from which the user wants to
|
|
160
165
|
* exchange.It can also used to limit source swap blockchains/tokens to some limited ones.
|
|
166
|
+
* @property {TrezorManifest} trezorManifest - Trezor Connect Manifest requires that you,
|
|
167
|
+
* as a Trezor Connect integrator,share your e-mail and application url.
|
|
161
168
|
* @property {BlockchainAndTokenConfig} to - The "to" property is an optional property of type
|
|
162
169
|
* "BlockchainAndTokenConfig" that specifies the default blockchain and token to which the user wants to
|
|
163
170
|
* exchange.It can also used to limit destination swap blockchains/tokens to some limited ones.
|
|
@@ -203,6 +210,7 @@ export type WidgetConfig = {
|
|
|
203
210
|
apiUrl?: string;
|
|
204
211
|
title?: string;
|
|
205
212
|
walletConnectProjectId?: string;
|
|
213
|
+
trezorManifest?: TrezorManifest;
|
|
206
214
|
affiliate?: WidgetAffiliate;
|
|
207
215
|
amount?: number;
|
|
208
216
|
from?: BlockchainAndTokenConfig;
|
package/src/utils/providers.ts
CHANGED
|
@@ -8,6 +8,7 @@ export interface ProvidersOptions {
|
|
|
8
8
|
walletConnectListedDesktopWalletLink?: NonNullable<
|
|
9
9
|
WidgetConfig['__UNSTABLE_OR_INTERNAL__']
|
|
10
10
|
>['walletConnectListedDesktopWalletLink'];
|
|
11
|
+
trezorManifest: WidgetConfig['trezorManifest'];
|
|
11
12
|
}
|
|
12
13
|
|
|
13
14
|
/**
|
|
@@ -27,6 +28,9 @@ export function matchAndGenerateProviders(
|
|
|
27
28
|
options?.walletConnectListedDesktopWalletLink,
|
|
28
29
|
},
|
|
29
30
|
selectedProviders: providers,
|
|
31
|
+
trezor: options?.trezorManifest
|
|
32
|
+
? { manifest: options.trezorManifest }
|
|
33
|
+
: undefined,
|
|
30
34
|
});
|
|
31
35
|
|
|
32
36
|
if (providers) {
|