@rango-dev/widget-embedded 0.17.1-next.32 → 0.17.1-next.34
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/BlockchainsSection/BlockchainsSection.d.ts.map +1 -1
- package/dist/components/BlockchainsSection/BlockchainsSection.styles.d.ts +1 -1
- package/dist/components/BlockchainsSection/BlockchainsSection.styles.d.ts.map +1 -1
- package/dist/components/ConfirmWalletsModal/ConfirmWallets.styles.d.ts +315 -0
- package/dist/components/ConfirmWalletsModal/ConfirmWallets.styles.d.ts.map +1 -1
- package/dist/components/Layout/Layout.styles.d.ts.map +1 -1
- package/dist/components/LoadingSwapDetails/LoadingSwapDetails.d.ts.map +1 -1
- package/dist/components/LoadingSwapDetails/LoadingSwapDetails.styles.d.ts.map +1 -1
- package/dist/components/Quote/Quote.d.ts.map +1 -1
- package/dist/components/Quote/Quote.styles.d.ts +158 -0
- package/dist/components/Quote/Quote.styles.d.ts.map +1 -1
- package/dist/components/Quote/index.d.ts +0 -1
- package/dist/components/Quote/index.d.ts.map +1 -1
- package/dist/components/QuoteSkeleton/QuoteSkeleton.d.ts.map +1 -0
- package/dist/components/{Quote → QuoteSkeleton}/QuoteSkeleton.styles.d.ts +314 -0
- package/dist/components/QuoteSkeleton/QuoteSkeleton.styles.d.ts.map +1 -0
- package/dist/components/QuoteSkeleton/QuoteSkeleton.types.d.ts.map +1 -0
- package/dist/components/QuoteSkeleton/QuoteSummarySkeleton.d.ts +4 -0
- package/dist/components/QuoteSkeleton/QuoteSummarySkeleton.d.ts.map +1 -0
- package/dist/components/QuoteSkeleton/QuoteSummarySkeleton.styles.d.ts +1571 -0
- package/dist/components/QuoteSkeleton/QuoteSummarySkeleton.styles.d.ts.map +1 -0
- package/dist/components/QuoteSkeleton/QuoteSummarySkeleton.types.d.ts +6 -0
- package/dist/components/QuoteSkeleton/QuoteSummarySkeleton.types.d.ts.map +1 -0
- package/dist/components/QuoteSkeleton/StepSkeleton.d.ts +4 -0
- package/dist/components/QuoteSkeleton/StepSkeleton.d.ts.map +1 -0
- package/dist/components/QuoteSkeleton/StepSkeleton.styles.d.ts +786 -0
- package/dist/components/QuoteSkeleton/StepSkeleton.styles.d.ts.map +1 -0
- package/dist/components/QuoteSkeleton/StepSkeleton.types.d.ts +4 -0
- package/dist/components/QuoteSkeleton/StepSkeleton.types.d.ts.map +1 -0
- package/dist/components/QuoteSkeleton/index.d.ts +4 -0
- package/dist/components/QuoteSkeleton/index.d.ts.map +1 -0
- package/dist/components/Slippage/Slippage.d.ts.map +1 -1
- package/dist/components/Slippage/Slippage.styles.d.ts +158 -0
- package/dist/components/Slippage/Slippage.styles.d.ts.map +1 -1
- package/dist/components/SwapDetails/SwapDetails.Placeholder.d.ts.map +1 -1
- package/dist/components/SwapDetails/SwapDetails.styles.d.ts.map +1 -1
- package/dist/components/TokenList/TokenList.d.ts.map +1 -1
- package/dist/components/TokenList/TokenList.styles.d.ts +158 -1
- package/dist/components/TokenList/TokenList.styles.d.ts.map +1 -1
- package/dist/components/TokenList/TokenList.types.d.ts +1 -0
- package/dist/components/TokenList/TokenList.types.d.ts.map +1 -1
- package/dist/containers/QuoteInfo/QuoteInfo.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +4 -4
- package/dist/pages/Home.d.ts.map +1 -1
- package/dist/pages/SelectSwapItemsPage.d.ts.map +1 -1
- package/dist/pages/SettingsPage.d.ts.map +1 -1
- package/dist/pages/WalletsPage.d.ts.map +1 -1
- package/dist/store/slices/config.d.ts.map +1 -1
- package/dist/store/slices/data.d.ts +2 -2
- package/dist/store/slices/data.d.ts.map +1 -1
- package/dist/types/config.d.ts +3 -3
- package/dist/types/config.d.ts.map +1 -1
- package/dist/utils/wallets.d.ts +2 -1
- package/dist/utils/wallets.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/components/BlockchainsSection/BlockchainsSection.styles.ts +1 -1
- package/src/components/BlockchainsSection/BlockchainsSection.tsx +19 -10
- package/src/components/ConfirmWalletsModal/ConfirmWallets.styles.ts +20 -7
- package/src/components/ConfirmWalletsModal/WalletList.tsx +3 -3
- package/src/components/Layout/Layout.styles.ts +2 -0
- package/src/components/LoadingSwapDetails/LoadingSwapDetails.styles.ts +2 -1
- package/src/components/LoadingSwapDetails/LoadingSwapDetails.tsx +25 -40
- package/src/components/Quote/Quote.styles.ts +9 -2
- package/src/components/Quote/Quote.tsx +3 -5
- package/src/components/Quote/index.ts +0 -1
- package/src/components/QuoteSkeleton/QuoteSkeleton.styles.ts +42 -0
- package/src/components/QuoteSkeleton/QuoteSkeleton.tsx +30 -0
- package/src/components/QuoteSkeleton/QuoteSummarySkeleton.styles.ts +57 -0
- package/src/components/QuoteSkeleton/QuoteSummarySkeleton.tsx +76 -0
- package/src/components/QuoteSkeleton/QuoteSummarySkeleton.types.ts +6 -0
- package/src/components/QuoteSkeleton/StepSkeleton.styles.ts +33 -0
- package/src/components/QuoteSkeleton/StepSkeleton.tsx +44 -0
- package/src/components/QuoteSkeleton/StepSkeleton.types.ts +1 -0
- package/src/components/QuoteSkeleton/index.ts +3 -0
- package/src/components/Slippage/Slippage.styles.ts +15 -5
- package/src/components/Slippage/Slippage.tsx +8 -5
- package/src/components/SwapDetails/SwapDetails.Placeholder.tsx +0 -1
- package/src/components/SwapDetails/SwapDetails.styles.ts +0 -1
- package/src/components/TokenList/TokenList.styles.ts +17 -2
- package/src/components/TokenList/TokenList.tsx +7 -3
- package/src/components/TokenList/TokenList.types.ts +1 -0
- package/src/containers/QuoteInfo/QuoteInfo.tsx +2 -1
- package/src/pages/Home.tsx +5 -1
- package/src/pages/SelectSwapItemsPage.tsx +8 -4
- package/src/pages/SettingsPage.tsx +4 -3
- package/src/pages/WalletsPage.tsx +5 -4
- package/src/store/slices/config.ts +1 -0
- package/src/store/slices/data.ts +10 -6
- package/src/types/config.ts +3 -3
- package/src/utils/wallets.ts +60 -23
- package/dist/components/LoadingSwapDetails/LoadingSwapDetailStep.d.ts +0 -4
- package/dist/components/LoadingSwapDetails/LoadingSwapDetailStep.d.ts.map +0 -1
- package/dist/components/LoadingSwapDetails/LoadingSwapDetails.types.d.ts +0 -4
- package/dist/components/LoadingSwapDetails/LoadingSwapDetails.types.d.ts.map +0 -1
- package/dist/components/Quote/QuoteSkeleton.d.ts.map +0 -1
- package/dist/components/Quote/QuoteSkeleton.styles.d.ts.map +0 -1
- package/dist/components/Quote/QuoteSkeleton.types.d.ts.map +0 -1
- package/src/components/LoadingSwapDetails/LoadingSwapDetailStep.tsx +0 -48
- package/src/components/LoadingSwapDetails/LoadingSwapDetails.types.ts +0 -3
- package/src/components/Quote/QuoteSkeleton.styles.ts +0 -110
- package/src/components/Quote/QuoteSkeleton.tsx +0 -108
- /package/dist/components/{Quote → QuoteSkeleton}/QuoteSkeleton.d.ts +0 -0
- /package/dist/components/{Quote → QuoteSkeleton}/QuoteSkeleton.types.d.ts +0 -0
- /package/src/components/{Quote → QuoteSkeleton}/QuoteSkeleton.types.ts +0 -0
package/dist/pages/Home.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Home.d.ts","sourceRoot":"","sources":["../../src/pages/Home.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAsC,MAAM,OAAO,CAAC;AA8C3D,wBAAgB,IAAI,
|
|
1
|
+
{"version":3,"file":"Home.d.ts","sourceRoot":"","sources":["../../src/pages/Home.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAsC,MAAM,OAAO,CAAC;AA8C3D,wBAAgB,IAAI,sBAgOnB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectSwapItemsPage.d.ts","sourceRoot":"","sources":["../../src/pages/SelectSwapItemsPage.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAcxC,UAAU,SAAS;IACjB,IAAI,EAAE,QAAQ,GAAG,aAAa,CAAC;CAChC;AAED,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,SAAS,
|
|
1
|
+
{"version":3,"file":"SelectSwapItemsPage.d.ts","sourceRoot":"","sources":["../../src/pages/SelectSwapItemsPage.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAcxC,UAAU,SAAS;IACjB,IAAI,EAAE,QAAQ,GAAG,aAAa,CAAC;CAChC;AAED,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,SAAS,qBA+FnD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SettingsPage.d.ts","sourceRoot":"","sources":["../../src/pages/SettingsPage.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,MAAM,OAAO,CAAC;AAY1B,wBAAgB,YAAY,
|
|
1
|
+
{"version":3,"file":"SettingsPage.d.ts","sourceRoot":"","sources":["../../src/pages/SettingsPage.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,MAAM,OAAO,CAAC;AAY1B,wBAAgB,YAAY,sBA4K3B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WalletsPage.d.ts","sourceRoot":"","sources":["../../src/pages/WalletsPage.tsx"],"names":[],"mappings":"AAIA,OAAO,KAA6B,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"WalletsPage.d.ts","sourceRoot":"","sources":["../../src/pages/WalletsPage.tsx"],"names":[],"mappings":"AAIA,OAAO,KAA6B,MAAM,OAAO,CAAC;AAsBlD,eAAO,MAAM,mBAAmB,OAAQ,CAAC;AACzC,eAAO,MAAM,oBAAoB,MAAM,CAAC;AAExC,wBAAgB,WAAW,sBAmE1B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/store/slices/config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,QAAQ,CAAC;AAE1D,eAAO,MAAM,cAAc,EAAE,
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/store/slices/config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,QAAQ,CAAC;AAE1D,eAAO,MAAM,cAAc,EAAE,YAK5B,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACxB,MAAM,EAAE,YAAY,CAAC;IAErB,YAAY,EAAE,CAAC,MAAM,EAAE,YAAY,KAAK,IAAI,CAAC;CAC9C,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,2BAA2B,CACzD,YAAY,EACZ,WAAW,EACX,WAAW,CAiBZ,CAAC"}
|
|
@@ -5,7 +5,7 @@ type BlockchainOptions = {
|
|
|
5
5
|
type?: 'source' | 'destination';
|
|
6
6
|
};
|
|
7
7
|
type TokenOptions = {
|
|
8
|
-
type
|
|
8
|
+
type: 'source' | 'destination';
|
|
9
9
|
blockchain?: string;
|
|
10
10
|
searchFor?: string;
|
|
11
11
|
};
|
|
@@ -19,7 +19,7 @@ export interface DataSlice {
|
|
|
19
19
|
blockchains: (options?: BlockchainOptions) => BlockchainMeta[];
|
|
20
20
|
tokens: (options?: TokenOptions) => Token[];
|
|
21
21
|
swappers: () => SwapperMeta[];
|
|
22
|
-
isTokenPinned: (token: Token) => boolean;
|
|
22
|
+
isTokenPinned: (token: Token, type: 'source' | 'destination') => boolean;
|
|
23
23
|
fetch: () => Promise<void>;
|
|
24
24
|
}
|
|
25
25
|
export declare const createDataSlice: StateCreator<DataSlice & ConfigSlice, [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data.d.ts","sourceRoot":"","sources":["../../../src/store/slices/data.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAC5C,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,KAAK,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AE,QAAQ,GAAG,aAAa,KAAK,OAAO,CAAC;IAEzE,KAAK,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAC5B;AAED,eAAO,MAAM,eAAe,EAAE,YAAY,CACxC,SAAS,GAAG,WAAW,EACvB;CAAE,EACF;CAAE,EACF,SAAS,CAyMT,CAAC"}
|
package/dist/types/config.d.ts
CHANGED
|
@@ -78,12 +78,15 @@ export type WidgetAffiliate = {
|
|
|
78
78
|
* blockchains. e.g. ['BSC','ETHEREUM']
|
|
79
79
|
* @property {Asset[]} tokens - The `tokens` property is an optional array of `Asset` objects that
|
|
80
80
|
* you could use that to limit tokens to some limited ones.
|
|
81
|
+
* @property {Asset} pinnedTokens - The `pinnedTokens` property is an optional array of `Asset` objects that
|
|
82
|
+
* you could use to pin tokens of your choice to the top of the token list.
|
|
81
83
|
*/
|
|
82
84
|
export type BlockchainAndTokenConfig = {
|
|
83
85
|
blockchain?: string;
|
|
84
86
|
token?: Asset;
|
|
85
87
|
blockchains?: string[];
|
|
86
88
|
tokens?: Asset[];
|
|
89
|
+
pinnedTokens?: Asset[];
|
|
87
90
|
};
|
|
88
91
|
/**
|
|
89
92
|
* `Features`
|
|
@@ -142,8 +145,6 @@ export type Features = Partial<Record<'theme' | 'language' | 'connectWalletButto
|
|
|
142
145
|
* that defines the various properties of the theme, such as colors, fonts, and others.
|
|
143
146
|
* @property {boolean} externalWallets
|
|
144
147
|
* If `externalWallets` is `true`, you should add `WidgetWallets` to your app.
|
|
145
|
-
* @property {Asset} pinnedTokens - The `pinnedTokens` property is an optional array of `Asset` objects that
|
|
146
|
-
* you could use to pin tokens of your choice to the top of the token list.
|
|
147
148
|
* @property {boolean} enableNewLiquiditySources - The `enableNewLiquiditySources` property is a boolean value that when you
|
|
148
149
|
* set it to true, whenever a new liquidity source is added, it will be added to your list as well.
|
|
149
150
|
* @property {Features} features - An optional object for configuring the visibility or enablement of various features.
|
|
@@ -170,7 +171,6 @@ export type WidgetConfig = {
|
|
|
170
171
|
language?: Language;
|
|
171
172
|
theme?: WidgetTheme;
|
|
172
173
|
externalWallets?: boolean;
|
|
173
|
-
pinnedTokens?: Asset[];
|
|
174
174
|
enableNewLiquiditySources?: boolean;
|
|
175
175
|
features?: Features;
|
|
176
176
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/types/config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAEvC;;;;;;;GAOG;AACH,MAAM,MAAM,gBAAgB,GAAG,MAAM,YAAY,CAAC;AAClD,MAAM,MAAM,YAAY,GAAG;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAEF;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,MAAM,WAAW,GAAG;IACxB,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,MAAM,CAAC;IACjC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,YAAY,CAAC;QAAC,IAAI,CAAC,EAAE,YAAY,CAAA;KAAE,CAAC;IACvD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAA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C;IAC9B,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC5B,OAAO,CAAC,EAAE,CAAC,UAAU,GAAG,iBAAiB,CAAC,EAAE,CAAC;IAC7C,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,yBAAyB,CAAC,EAAE,OAAO,CAAC;IACpC,QAAQ,CAAC,EAAE,QAAQ,CAAC;CACrB,CAAC"}
|
package/dist/utils/wallets.d.ts
CHANGED
|
@@ -17,7 +17,7 @@ export declare const getUsdPrice: (blockchain: string, symbol: string, address:
|
|
|
17
17
|
export declare const isExperimentalChain: (blockchains: BlockchainMeta[], wallet: string) => boolean;
|
|
18
18
|
export declare const getKeplrCompatibleConnectedWallets: (selectableWallets: Wallet[]) => WalletType[];
|
|
19
19
|
export declare function formatBalance(balance: Balance | null): Balance | null;
|
|
20
|
-
export declare function
|
|
20
|
+
export declare function sortTokens(tokens: Token[], getBalanceFor: (token: Token) => Balance | null, isTokenPinned: (token: Token) => boolean): Token[];
|
|
21
21
|
export declare function tokensAreEqual(tokenA: Pick<Token, 'blockchain' | 'symbol' | 'address'> | null, tokenB: Pick<Token, 'blockchain' | 'symbol' | 'address'> | null): boolean;
|
|
22
22
|
export declare function sortWalletsBasedOnConnectionState(wallets: ModalWalletInfo[]): ModalWalletInfo[];
|
|
23
23
|
export declare function getConciseAddress(address: string, maxChars?: number, ellipsisLength?: number): string;
|
|
@@ -28,4 +28,5 @@ export declare function getAddress({ chain, connectedWallets, walletType, }: {
|
|
|
28
28
|
}): string | undefined;
|
|
29
29
|
export declare function createTokenHash(token: Asset): TokenHash;
|
|
30
30
|
export declare function makeTokensBalance(connectedWallets: ConnectedWallet[]): TokensBalance;
|
|
31
|
+
export declare const isFetchingBalance: (connectedWallets: ConnectedWallet[], blockchain: string) => boolean;
|
|
31
32
|
//# sourceMappingURL=wallets.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wallets.d.ts","sourceRoot":"","sources":["../../src/utils/wallets.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACtE,OAAO,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAC1E,OAAO,KAAK,EAAE,UAAU,IAAI,eAAe,EAAE,MAAM,eAAe,CAAC;AACnE,OAAO,KAAK,EACV,KAAK,EACL,OAAO,EACP,UAAU,EACV,WAAW,EACX,UAAU,EAEX,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,EACV,iBAAiB,EACjB,cAAc,EACd,KAAK,EACL,YAAY,EACb,MAAM,WAAW,CAAC;AAEnB,OAAO,EAAE,WAAW,IAAI,YAAY,EAAE,MAAM,eAAe,CAAC;AAuB5D,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,WAAW,GAAG,YAAY,CAWvE;AAED,wBAAgB,0BAA0B,CACxC,QAAQ,EAAE,CAAC,IAAI,EAAE,UAAU,KAAK,WAAW,EAC3C,aAAa,EAAE,CAAC,IAAI,EAAE,UAAU,KAAK,UAAU,EAC/C,IAAI,EAAE,UAAU,EAAE,EAClB,KAAK,CAAC,EAAE,MAAM,GACb,eAAe,EAAE,CA6BnB;AAED,wBAAgB,6BAA6B,CAC3C,oBAAoB,EAAE,cAAc,EAAE,GACrC,OAAO,EAAE,GAAG,IAAI,CAUlB;AAED,wBAAgB,6BAA6B,CAC3C,MAAM,EAAE,UAAU,EAClB,QAAQ,EAAE,MAAM,EAAE,EAClB,cAAc,EAAE,MAAM,EAAE,EACxB,mBAAmB,EAAE,OAAO,EAAE,GAAG,IAAI,EACrC,gBAAgB,EAAE,OAAO,GACxB,MAAM,EAAE,CAkFV;AAED,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": "0.17.1-next.34",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"source": "./src/index.ts",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"@rango-dev/queue-manager-core": "^0.22.1-next.3",
|
|
26
26
|
"@rango-dev/queue-manager-rango-preset": "^0.22.1-next.12",
|
|
27
27
|
"@rango-dev/queue-manager-react": "^0.22.1-next.3",
|
|
28
|
-
"@rango-dev/ui": "^0.22.1-next.
|
|
28
|
+
"@rango-dev/ui": "^0.22.1-next.20",
|
|
29
29
|
"@rango-dev/wallets-react": "^0.8.1-next.6",
|
|
30
30
|
"@rango-dev/wallets-shared": "^0.21.1-next.6",
|
|
31
31
|
"bignumber.js": "^9.1.1",
|
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
Divider,
|
|
8
8
|
Image,
|
|
9
9
|
Skeleton,
|
|
10
|
+
Tooltip,
|
|
10
11
|
Typography,
|
|
11
12
|
} from '@rango-dev/ui';
|
|
12
13
|
import React from 'react';
|
|
@@ -15,8 +16,9 @@ import { BLOCKCHAIN_LIST_SIZE } from '../../constants/configs';
|
|
|
15
16
|
import { usePrepareBlockchainList } from '../../hooks/usePrepareBlockchainList';
|
|
16
17
|
import { useAppStore } from '../../store/AppStore';
|
|
17
18
|
import { useQuoteStore } from '../../store/quote';
|
|
19
|
+
import { getContainer } from '../../utils/common';
|
|
18
20
|
|
|
19
|
-
import {
|
|
21
|
+
import { Blockchains } from './BlockchainsSection.styles';
|
|
20
22
|
|
|
21
23
|
const NUMBER_OF_LOADING = 12;
|
|
22
24
|
|
|
@@ -38,13 +40,13 @@ export function BlockchainsSection(props: PropTypes) {
|
|
|
38
40
|
const showMoreButton = !onlyOneItemInList && hasMoreItemsInList;
|
|
39
41
|
|
|
40
42
|
return (
|
|
41
|
-
|
|
43
|
+
<>
|
|
42
44
|
<Divider size={12} />
|
|
43
45
|
<Typography variant="label" size="large">
|
|
44
46
|
{i18n.t('Select Blockchain')}
|
|
45
47
|
</Typography>
|
|
46
48
|
<Divider size={12} />
|
|
47
|
-
<
|
|
49
|
+
<Blockchains>
|
|
48
50
|
{fetchStatus === 'loading' &&
|
|
49
51
|
Array.from(Array(NUMBER_OF_LOADING), (e) => (
|
|
50
52
|
<Skeleton key={e} variant="rounded" height={50} />
|
|
@@ -65,12 +67,19 @@ export function BlockchainsSection(props: PropTypes) {
|
|
|
65
67
|
</Typography>
|
|
66
68
|
</BlockchainsChip>
|
|
67
69
|
{blockchainsList.list.map((item) => (
|
|
68
|
-
<
|
|
70
|
+
<Tooltip
|
|
69
71
|
key={item.name}
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
72
|
+
content={item.shortName}
|
|
73
|
+
side="bottom"
|
|
74
|
+
sideOffset={2}
|
|
75
|
+
container={getContainer()}>
|
|
76
|
+
<BlockchainsChip
|
|
77
|
+
key={item.name}
|
|
78
|
+
selected={!!blockchain && blockchain.name === item.name}
|
|
79
|
+
onClick={() => onChange(item)}>
|
|
80
|
+
<Image src={item.logo} size={30} />
|
|
81
|
+
</BlockchainsChip>
|
|
82
|
+
</Tooltip>
|
|
74
83
|
))}
|
|
75
84
|
|
|
76
85
|
{onlyOneItemInList ? (
|
|
@@ -96,7 +105,7 @@ export function BlockchainsSection(props: PropTypes) {
|
|
|
96
105
|
) : null}
|
|
97
106
|
</>
|
|
98
107
|
)}
|
|
99
|
-
</
|
|
100
|
-
|
|
108
|
+
</Blockchains>
|
|
109
|
+
</>
|
|
101
110
|
);
|
|
102
111
|
}
|
|
@@ -37,10 +37,13 @@ export const Title = styled('div', {
|
|
|
37
37
|
});
|
|
38
38
|
|
|
39
39
|
export const ListContainer = styled('div', {
|
|
40
|
-
display: '
|
|
40
|
+
display: 'flex',
|
|
41
|
+
justifyContent: 'space-evenly',
|
|
42
|
+
alignItems: 'center',
|
|
41
43
|
gap: '$10',
|
|
42
|
-
|
|
43
|
-
|
|
44
|
+
flexWrap: 'wrap',
|
|
45
|
+
paddingTop: '$5',
|
|
46
|
+
height: '100%',
|
|
44
47
|
});
|
|
45
48
|
|
|
46
49
|
export const WalletButton = styled('button', {
|
|
@@ -85,6 +88,12 @@ export const WalletButton = styled('button', {
|
|
|
85
88
|
},
|
|
86
89
|
},
|
|
87
90
|
});
|
|
91
|
+
|
|
92
|
+
export const ShowMoreWallets = styled(WalletButton, {
|
|
93
|
+
alignSelf: 'stretch',
|
|
94
|
+
minHeight: '93px',
|
|
95
|
+
});
|
|
96
|
+
|
|
88
97
|
export const Trigger = styled(Collapsible.Trigger, {
|
|
89
98
|
padding: '$0',
|
|
90
99
|
border: 'none',
|
|
@@ -114,10 +123,13 @@ export const WalletsContainer = styled('div', {
|
|
|
114
123
|
});
|
|
115
124
|
|
|
116
125
|
export const walletsListStyles = css({
|
|
117
|
-
display: '
|
|
126
|
+
display: 'flex',
|
|
127
|
+
justifyContent: 'space-evenly',
|
|
128
|
+
alignItems: 'center',
|
|
118
129
|
gap: '$10',
|
|
119
|
-
|
|
120
|
-
|
|
130
|
+
flexWrap: 'wrap',
|
|
131
|
+
paddingTop: '$5',
|
|
132
|
+
height: '100%',
|
|
121
133
|
});
|
|
122
134
|
|
|
123
135
|
export const CollapsibleRoot = styled(Collapsible.Root, {
|
|
@@ -167,7 +179,6 @@ export const CustomDestination = styled('div', {
|
|
|
167
179
|
padding: '$10 $0',
|
|
168
180
|
'& .button__content': {
|
|
169
181
|
display: 'flex',
|
|
170
|
-
justifyContent: 'center',
|
|
171
182
|
alignItems: 'center',
|
|
172
183
|
},
|
|
173
184
|
'& .alarms': { paddingTop: '5px' },
|
|
@@ -196,10 +207,12 @@ export const ConfirmButton = styled('div', {
|
|
|
196
207
|
});
|
|
197
208
|
|
|
198
209
|
export const StyledTextField = styled(TextField, {
|
|
210
|
+
backgroundColor: '$neutral100',
|
|
199
211
|
padding: '$0 $15 $15 $15',
|
|
200
212
|
});
|
|
201
213
|
|
|
202
214
|
export const CollapsibleContent = styled(Collapsible.Content, {
|
|
215
|
+
backgroundColor: '$neutral100',
|
|
203
216
|
overflow: 'hidden',
|
|
204
217
|
variants: {
|
|
205
218
|
open: {
|
|
@@ -33,7 +33,7 @@ import {
|
|
|
33
33
|
} from '../../utils/wallets';
|
|
34
34
|
import { WalletModal } from '../WalletModal';
|
|
35
35
|
|
|
36
|
-
import {
|
|
36
|
+
import { ShowMoreWallets } from './ConfirmWallets.styles';
|
|
37
37
|
import {
|
|
38
38
|
LogoContainer,
|
|
39
39
|
Spinner,
|
|
@@ -292,14 +292,14 @@ export function WalletList(props: PropTypes) {
|
|
|
292
292
|
);
|
|
293
293
|
})}
|
|
294
294
|
{shouldShowMoreWallets && (
|
|
295
|
-
<
|
|
295
|
+
<ShowMoreWallets selected={false} onClick={onShowMore}>
|
|
296
296
|
<Typography variant="label" size="medium">
|
|
297
297
|
{i18n.t('Show more wallets')}
|
|
298
298
|
<Typography variant="label" size="medium" color="$primary">
|
|
299
299
|
+{numberOfSupportedWallets - (limit ?? 0)}
|
|
300
300
|
</Typography>
|
|
301
301
|
</Typography>
|
|
302
|
-
</
|
|
302
|
+
</ShowMoreWallets>
|
|
303
303
|
)}
|
|
304
304
|
</>
|
|
305
305
|
);
|
|
@@ -8,8 +8,10 @@ export const Container = styled('div', {
|
|
|
8
8
|
overflow: 'hidden !important',
|
|
9
9
|
boxShadow: '15px 15px 15px 0px rgba(0, 0, 0, 0.05)',
|
|
10
10
|
width: '95vw',
|
|
11
|
+
minWidth: '300px',
|
|
11
12
|
maxWidth: '390px',
|
|
12
13
|
maxHeight: '700px',
|
|
14
|
+
textAlign: 'left',
|
|
13
15
|
$$color: '$colors$neutral100',
|
|
14
16
|
[`.${darkTheme} &`]: {
|
|
15
17
|
$$color: '$colors$neutral300',
|
|
@@ -3,7 +3,7 @@ import { css, styled } from '@rango-dev/ui';
|
|
|
3
3
|
export const Container = styled('div', {
|
|
4
4
|
width: '100%',
|
|
5
5
|
height: '100%',
|
|
6
|
-
padding: '$
|
|
6
|
+
padding: '$10 $20',
|
|
7
7
|
});
|
|
8
8
|
|
|
9
9
|
export const StepContainer = styled('div', {
|
|
@@ -11,6 +11,7 @@ export const StepContainer = styled('div', {
|
|
|
11
11
|
borderRadius: '$xm',
|
|
12
12
|
padding: '$10 $15',
|
|
13
13
|
});
|
|
14
|
+
|
|
14
15
|
export const StepSeparator = styled('div', {
|
|
15
16
|
width: '0px',
|
|
16
17
|
height: '$20',
|
|
@@ -1,62 +1,47 @@
|
|
|
1
1
|
import { i18n } from '@lingui/core';
|
|
2
|
-
import {
|
|
2
|
+
import { Divider, Skeleton, Typography } from '@rango-dev/ui';
|
|
3
3
|
import React from 'react';
|
|
4
4
|
|
|
5
|
+
import { QuoteSummarySkeleton, StepSkeleton } from '../QuoteSkeleton';
|
|
6
|
+
|
|
5
7
|
import {
|
|
6
8
|
Container,
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
quoteSummarySeparatorStyles,
|
|
10
|
-
quoteSummaryStyles,
|
|
9
|
+
extraInfoStyles,
|
|
10
|
+
StepContainer,
|
|
11
11
|
StepSeparator,
|
|
12
|
-
swapsStepsStyles,
|
|
13
|
-
tokenAmountStyles,
|
|
14
12
|
} from './LoadingSwapDetails.styles';
|
|
15
|
-
import { LoadingSwapDetailStep } from './LoadingSwapDetailStep';
|
|
16
13
|
|
|
17
14
|
export function LoadingSwapDetails() {
|
|
18
|
-
const quoteSummary = (
|
|
19
|
-
<div className={quoteSummaryItemStyles()}>
|
|
20
|
-
<div className={tokenAmountStyles()}>
|
|
21
|
-
<ChainToken loading size="medium" chainImage="" tokenImage="" />
|
|
22
|
-
<Divider size={8} direction="horizontal" />
|
|
23
|
-
<Skeleton height={15} width={148} variant="rounded" />
|
|
24
|
-
</div>
|
|
25
|
-
<Skeleton height={12} width={64} variant="rounded" />
|
|
26
|
-
</div>
|
|
27
|
-
);
|
|
28
|
-
|
|
29
15
|
return (
|
|
30
16
|
<Container>
|
|
31
|
-
<
|
|
32
|
-
|
|
33
|
-
<Divider size={4} direction="horizontal" />
|
|
34
|
-
<Skeleton width={60} height={10} variant="rounded" />
|
|
35
|
-
<Divider size={4} direction="horizontal" />
|
|
36
|
-
<Skeleton width={60} height={10} variant="rounded" />
|
|
37
|
-
</div>
|
|
38
|
-
|
|
39
|
-
<div className={quoteSummaryStyles()}>
|
|
40
|
-
{quoteSummary}
|
|
41
|
-
<div className={quoteSummarySeparatorStyles()}></div>
|
|
42
|
-
{quoteSummary}
|
|
43
|
-
</div>
|
|
44
|
-
|
|
45
|
-
<div className={swapsStepsStyles()}>
|
|
17
|
+
<QuoteSummarySkeleton type="swap-preview" />
|
|
18
|
+
<div className="swaps-steps">
|
|
46
19
|
<Typography variant="title" size="small">
|
|
47
20
|
{i18n.t('Swaps steps')}
|
|
48
21
|
</Typography>
|
|
49
22
|
</div>
|
|
50
23
|
|
|
51
|
-
|
|
52
|
-
<
|
|
24
|
+
<>
|
|
25
|
+
<StepContainer>
|
|
26
|
+
<StepSkeleton separator={false} />
|
|
27
|
+
<div className={extraInfoStyles()}>
|
|
28
|
+
<Divider direction="horizontal" size={20} />
|
|
29
|
+
<Skeleton height={22} variant="rectangular" />
|
|
30
|
+
</div>
|
|
31
|
+
</StepContainer>
|
|
53
32
|
<StepSeparator />
|
|
54
|
-
<
|
|
33
|
+
<StepContainer>
|
|
34
|
+
<StepSkeleton separator={false} />
|
|
35
|
+
</StepContainer>
|
|
55
36
|
<StepSeparator />
|
|
56
|
-
<
|
|
37
|
+
<StepContainer>
|
|
38
|
+
<StepSkeleton separator={false} />
|
|
39
|
+
</StepContainer>
|
|
57
40
|
<StepSeparator />
|
|
58
|
-
<
|
|
59
|
-
|
|
41
|
+
<StepContainer>
|
|
42
|
+
<StepSkeleton separator={false} />
|
|
43
|
+
</StepContainer>
|
|
44
|
+
</>
|
|
60
45
|
</Container>
|
|
61
46
|
);
|
|
62
47
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as Collapsible from '@radix-ui/react-collapsible';
|
|
2
|
-
import { css, darkTheme, Image, styled } from '@rango-dev/ui';
|
|
2
|
+
import { css, darkTheme, Image, styled, Typography } from '@rango-dev/ui';
|
|
3
3
|
|
|
4
4
|
import { CollapsibleContent } from '../ConfirmWalletsModal/ConfirmWallets.styles';
|
|
5
5
|
|
|
@@ -109,7 +109,6 @@ export const SummaryContainer = styled('div', {
|
|
|
109
109
|
});
|
|
110
110
|
|
|
111
111
|
export const summaryStyles = css({
|
|
112
|
-
width: '100%',
|
|
113
112
|
padding: '$15 $15 $10 $15',
|
|
114
113
|
cursor: 'default',
|
|
115
114
|
});
|
|
@@ -194,6 +193,7 @@ export const ChainImageContainer = styled('div', {
|
|
|
194
193
|
|
|
195
194
|
export const Content = styled(CollapsibleContent, {
|
|
196
195
|
width: '100%',
|
|
196
|
+
background: 'inherit',
|
|
197
197
|
});
|
|
198
198
|
|
|
199
199
|
export const IconContainer = styled('div', {
|
|
@@ -240,3 +240,10 @@ export const FrameIcon = styled('div', {
|
|
|
240
240
|
alignItems: 'center',
|
|
241
241
|
display: 'flex',
|
|
242
242
|
});
|
|
243
|
+
|
|
244
|
+
export const BasicInfoOutput = styled(Typography, {
|
|
245
|
+
width: '100%',
|
|
246
|
+
overflow: 'hidden',
|
|
247
|
+
textOverflow: 'ellipsis',
|
|
248
|
+
letterSpacing: 0.4,
|
|
249
|
+
});
|
|
@@ -48,6 +48,7 @@ import { getPriceImpact, getPriceImpactLevel } from '../../utils/quote';
|
|
|
48
48
|
import { getTotalFeeInUsd } from '../../utils/swap';
|
|
49
49
|
|
|
50
50
|
import {
|
|
51
|
+
BasicInfoOutput,
|
|
51
52
|
basicInfoStyles,
|
|
52
53
|
ChainImageContainer,
|
|
53
54
|
Chains,
|
|
@@ -290,16 +291,13 @@ export function Quote(props: QuoteProps) {
|
|
|
290
291
|
<FrameIcon>
|
|
291
292
|
<InfoIcon size={12} color="gray" />
|
|
292
293
|
</FrameIcon>
|
|
293
|
-
<
|
|
294
|
-
size="small"
|
|
295
|
-
variant="body"
|
|
296
|
-
style={{ letterSpacing: 0.4 }}>
|
|
294
|
+
<BasicInfoOutput size="small" variant="body">
|
|
297
295
|
{`${roundedInput} ${
|
|
298
296
|
steps[0].from.token.displayName
|
|
299
297
|
} = ${roundedOutput} ${
|
|
300
298
|
steps[steps.length - 1].to.token.displayName
|
|
301
299
|
}`}
|
|
302
|
-
</
|
|
300
|
+
</BasicInfoOutput>
|
|
303
301
|
<Typography
|
|
304
302
|
color="$neutral600"
|
|
305
303
|
ml={2}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { darkTheme, styled } from '@rango-dev/ui';
|
|
2
|
+
|
|
3
|
+
export const Container = styled('div', {
|
|
4
|
+
$$color: '$colors$neutral100',
|
|
5
|
+
[`.${darkTheme} &`]: {
|
|
6
|
+
$$color: '$colors$neutral300',
|
|
7
|
+
},
|
|
8
|
+
backgroundColor: '$$color',
|
|
9
|
+
borderBottomLeftRadius: '$xm',
|
|
10
|
+
borderBottomRightRadius: '$xm',
|
|
11
|
+
padding: '$15 ',
|
|
12
|
+
variants: {
|
|
13
|
+
rounded: {
|
|
14
|
+
true: {
|
|
15
|
+
borderRadius: '$xm',
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
export const Chains = styled('div', {
|
|
22
|
+
paddingTop: '$2',
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
export const Steps = styled('div', {
|
|
26
|
+
paddingLeft: '$8',
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
export const StepSeparator = styled('div', {
|
|
30
|
+
borderLeft: '1px dashed black',
|
|
31
|
+
minHeight: ' 0',
|
|
32
|
+
margin: '0px 11.5px',
|
|
33
|
+
alignSelf: 'stretch',
|
|
34
|
+
variants: {
|
|
35
|
+
hideSeparator: {
|
|
36
|
+
true: {
|
|
37
|
+
minHeight: 'unset',
|
|
38
|
+
height: '0',
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
});
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { PropTypes } from './QuoteSkeleton.types';
|
|
2
|
+
|
|
3
|
+
import { Divider, Skeleton } from '@rango-dev/ui';
|
|
4
|
+
import React from 'react';
|
|
5
|
+
|
|
6
|
+
import { Chains, Container, Steps } from './QuoteSkeleton.styles';
|
|
7
|
+
import { QuoteSummarySkeleton } from './QuoteSummarySkeleton';
|
|
8
|
+
import { StepSkeleton } from './StepSkeleton';
|
|
9
|
+
|
|
10
|
+
export function QuoteSkeleton(props: PropTypes) {
|
|
11
|
+
const { type, expanded, tag = false } = props;
|
|
12
|
+
|
|
13
|
+
return (
|
|
14
|
+
<Container rounded={type !== 'basic'}>
|
|
15
|
+
<QuoteSummarySkeleton type={type} tag={tag} />
|
|
16
|
+
<Chains>
|
|
17
|
+
<Skeleton height={15} variant="rounded" />
|
|
18
|
+
</Chains>
|
|
19
|
+
|
|
20
|
+
{expanded && (
|
|
21
|
+
<Steps>
|
|
22
|
+
<Divider size={20} />
|
|
23
|
+
<StepSkeleton />
|
|
24
|
+
<StepSkeleton />
|
|
25
|
+
<StepSkeleton separator={false} />
|
|
26
|
+
</Steps>
|
|
27
|
+
)}
|
|
28
|
+
</Container>
|
|
29
|
+
);
|
|
30
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { styled } from '@rango-dev/ui';
|
|
2
|
+
|
|
3
|
+
export const CostAndTag = styled('div', {
|
|
4
|
+
display: 'flex',
|
|
5
|
+
justifyContent: 'space-between',
|
|
6
|
+
alignItems: 'center',
|
|
7
|
+
height: '22px',
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
export const Cost = styled('div', {
|
|
11
|
+
display: 'flex',
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
export const BasicSummary = styled('div', {
|
|
15
|
+
padding: '$15 $0 14px $0',
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
export const Output = styled('div', {
|
|
19
|
+
padding: '$6 $0 $15 $0',
|
|
20
|
+
display: 'flex',
|
|
21
|
+
flexDirection: 'column',
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
export const OutputTokenInfo = styled('div', {
|
|
25
|
+
display: 'flex',
|
|
26
|
+
justifyContent: 'start',
|
|
27
|
+
alignItems: 'center',
|
|
28
|
+
paddingBottom: '$5',
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
export const QuoteSummary = styled('div', {
|
|
32
|
+
display: 'flex',
|
|
33
|
+
justifyContent: 'space-between',
|
|
34
|
+
alignItems: 'end',
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
export const QuoteSummarySeparator = styled('div', {
|
|
38
|
+
height: '$28',
|
|
39
|
+
marginLeft: '13px',
|
|
40
|
+
borderLeft: '1px solid $neutral700',
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
export const TokenAmount = styled('div', {
|
|
44
|
+
width: '65%',
|
|
45
|
+
display: 'flex',
|
|
46
|
+
justifyContent: 'start',
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
export const TokenAmountLabel = styled('div', {
|
|
50
|
+
display: 'flex',
|
|
51
|
+
flexDirection: 'column',
|
|
52
|
+
alignItems: 'start',
|
|
53
|
+
flexGrow: 1,
|
|
54
|
+
maxWidth: '148px',
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
export const SwapPreview = styled('div', { padding: '$15 $0 $15 $0' });
|