@rango-dev/ui 0.54.1-next.2 → 0.54.1-next.3

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 +1 @@
1
- {"version":3,"file":"ClickableWallet.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Wallet/ClickableWallet.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAGzD,OAAO,KAAK,MAAM,OAAO,CAAC;AAkB1B,iBAAS,MAAM,CAAC,KAAK,EAAE,eAAe,qBAuErC;AAED,eAAe,MAAM,CAAC"}
1
+ {"version":3,"file":"ClickableWallet.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Wallet/ClickableWallet.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAGzD,OAAO,KAAK,MAAM,OAAO,CAAC;AAkB1B,iBAAS,MAAM,CAAC,KAAK,EAAE,eAAe,qBA4DrC;AAED,eAAe,MAAM,CAAC"}
@@ -1,4 +1,4 @@
1
- import type { Info, MakeInfoOptions } from './Wallet.types.js';
1
+ import type { Info } from './Wallet.types.js';
2
2
  import { WalletState } from './Wallet.types.js';
3
- export declare function makeInfo(state: WalletState, options?: MakeInfoOptions): Info;
3
+ export declare function makeInfo(state: WalletState): Info;
4
4
  //# sourceMappingURL=Wallet.helpers.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Wallet.helpers.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Wallet/Wallet.helpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAI/D,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD,wBAAgB,QAAQ,CAAC,KAAK,EAAE,WAAW,EAAE,OAAO,CAAC,EAAE,eAAe,GAAG,IAAI,CA0C5E"}
1
+ {"version":3,"file":"Wallet.helpers.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Wallet/Wallet.helpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAI9C,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD,wBAAgB,QAAQ,CAAC,KAAK,EAAE,WAAW,GAAG,IAAI,CAmCjD"}
@@ -19,9 +19,6 @@ export type WalletInfo = {
19
19
  needsNamespace?: LegacyWalletInfo['needsNamespace'];
20
20
  needsDerivationPath?: LegacyWalletInfo['needsDerivationPath'];
21
21
  };
22
- export interface MakeInfoOptions {
23
- hasDeepLink: boolean;
24
- }
25
22
  export interface Info {
26
23
  color: string;
27
24
  description: string;
@@ -40,7 +37,6 @@ export interface WalletPropTypes {
40
37
  link: InstallObjects | string;
41
38
  type: WalletType;
42
39
  onClick: (type: WalletType) => void;
43
- hasDeepLink: boolean;
44
40
  selected?: boolean;
45
41
  description?: string;
46
42
  isLoading?: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"Wallet.types.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Wallet/Wallet.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AACvE,OAAO,KAAK,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAC5E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEnD,oBAAY,WAAW;IACrB,aAAa,kBAAkB;IAC/B,YAAY,iBAAiB;IAC7B,UAAU,eAAe;IACzB,SAAS,cAAc;IACvB,mBAAmB,wBAAwB;CAC5C;AAED,MAAM,MAAM,UAAU,GAAG;IACvB,KAAK,EAAE,WAAW,CAAC;IACnB,IAAI,EAAE,cAAc,GAAG,MAAM,CAAC;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,IAAI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AU,CAAC;IACjB,OAAO,EAAE,CAAC,IAAI,EAAE,UAAU,KAAK,IAAI,CAAC;IACpC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,SAAS,CAAC,EAAE,WAAW,CAAC;IACxB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,MAAM,mBAAmB,GAAG,eAAe,GAAG;IAClD,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,EAAE,EAAE,MAAM,CAAC;IACX,gBAAgB,EAAE,MAAM,CAAC;CAC1B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"ConnectWalletsModal.d.ts","sourceRoot":"","sources":["../../../../../../src/containers/ConnectWalletsModal/ConnectWalletsModal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;AAGnF,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,4BAA4B,qBA2BtE"}
1
+ {"version":3,"file":"ConnectWalletsModal.d.ts","sourceRoot":"","sources":["../../../../../../src/containers/ConnectWalletsModal/ConnectWalletsModal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;AAGnF,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,4BAA4B,qBAoBtE"}
@@ -1,11 +1,9 @@
1
1
  import type { WalletInfo } from '../../components/index.js';
2
- import type { InstallObjects, WalletType } from '@rango-dev/wallets-shared';
2
+ import type { WalletType } from '@rango-dev/wallets-shared';
3
3
  export interface ConnectWalletsModalPropTypes {
4
4
  open: boolean;
5
5
  list: WalletInfo[];
6
6
  onSelect: (walletType: WalletType) => void;
7
- getWalletLink: (walletType: WalletType) => string | InstallObjects;
8
- checkHasDeepLink: (walletType: WalletType) => boolean;
9
7
  id: string;
10
8
  onClose: () => void;
11
9
  error?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"ConnectWalletsModal.types.d.ts","sourceRoot":"","sources":["../../../../../../src/containers/ConnectWalletsModal/ConnectWalletsModal.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,KAAK,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAE5E,MAAM,WAAW,4BAA4B;IAC3C,IAAI,EAAE,OAAO,CAAC;IACd,IAAI,EAAE,UAAU,EAAE,CAAC;IACnB,QAAQ,EAAE,CAAC,UAAU,EAAE,UAAU,KAAK,IAAI,CAAC;IAC3C,aAAa,EAAE,CAAC,UAAU,EAAE,UAAU,KAAK,MAAM,GAAG,cAAc,CAAC;IACnE,gBAAgB,EAAE,CAAC,UAAU,EAAE,UAAU,KAAK,OAAO,CAAC;IACtD,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB"}
1
+ {"version":3,"file":"ConnectWalletsModal.types.d.ts","sourceRoot":"","sources":["../../../../../../src/containers/ConnectWalletsModal/ConnectWalletsModal.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAE5D,MAAM,WAAW,4BAA4B;IAC3C,IAAI,EAAE,OAAO,CAAC;IACd,IAAI,EAAE,UAAU,EAAE,CAAC;IACnB,QAAQ,EAAE,CAAC,UAAU,EAAE,UAAU,KAAK,IAAI,CAAC;IAC3C,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rango-dev/ui",
3
- "version": "0.54.1-next.2",
3
+ "version": "0.54.1-next.3",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "source": "./src/index.ts",
@@ -53,7 +53,7 @@
53
53
  "@radix-ui/react-select": "^2.0.0",
54
54
  "@radix-ui/react-switch": "^1.0.1",
55
55
  "@radix-ui/react-tooltip": "^1.0.2",
56
- "@rango-dev/wallets-shared": "^0.51.1-next.0",
56
+ "@rango-dev/wallets-shared": "^0.51.1-next.1",
57
57
  "@stitches/react": "^1.2.8",
58
58
  "copy-to-clipboard": "^3.3.3",
59
59
  "rango-types": "^0.1.89",
@@ -62,4 +62,4 @@
62
62
  "publishConfig": {
63
63
  "access": "public"
64
64
  }
65
- }
65
+ }
@@ -20,16 +20,8 @@ import {
20
20
  import { WalletState } from './Wallet.types.js';
21
21
 
22
22
  function Wallet(props: WalletPropTypes) {
23
- const {
24
- title,
25
- type,
26
- image,
27
- onClick,
28
- isLoading,
29
- disabled = false,
30
- hasDeepLink,
31
- } = props;
32
- const info = makeInfo(props.state, { hasDeepLink });
23
+ const { title, type, image, onClick, isLoading, disabled = false } = props;
24
+ const info = makeInfo(props.state);
33
25
 
34
26
  if (isLoading) {
35
27
  return (
@@ -51,8 +43,7 @@ function Wallet(props: WalletPropTypes) {
51
43
  <Tooltip
52
44
  container={props.container}
53
45
  content={info.tooltipText}
54
- side="top"
55
- >
46
+ side="top">
56
47
  {children}
57
48
  </Tooltip>
58
49
  );
@@ -68,8 +59,7 @@ function Wallet(props: WalletPropTypes) {
68
59
  } else {
69
60
  onClick(type);
70
61
  }
71
- }}
72
- >
62
+ }}>
73
63
  <WalletImageContainer>
74
64
  <Image src={image} size={35} />
75
65
  </WalletImageContainer>
@@ -83,8 +73,7 @@ function Wallet(props: WalletPropTypes) {
83
73
  variant="body"
84
74
  size="xsmall"
85
75
  noWrap={false}
86
- color={info.color}
87
- >
76
+ color={info.color}>
88
77
  {info.description}
89
78
  </Typography>
90
79
  </Text>
@@ -1,10 +1,10 @@
1
- import type { Info, MakeInfoOptions } from './Wallet.types.js';
1
+ import type { Info } from './Wallet.types.js';
2
2
 
3
3
  import { i18n } from '@lingui/core';
4
4
 
5
5
  import { WalletState } from './Wallet.types.js';
6
6
 
7
- export function makeInfo(state: WalletState, options?: MakeInfoOptions): Info {
7
+ export function makeInfo(state: WalletState): Info {
8
8
  switch (state) {
9
9
  case WalletState.CONNECTED:
10
10
  return {
@@ -19,13 +19,6 @@ export function makeInfo(state: WalletState, options?: MakeInfoOptions): Info {
19
19
  tooltipText: i18n.t('Connect other chains'),
20
20
  };
21
21
  case WalletState.NOT_INSTALLED:
22
- if (options?.hasDeepLink) {
23
- return {
24
- color: 'info500',
25
- description: i18n.t('Open'),
26
- tooltipText: i18n.t('Open'),
27
- };
28
- }
29
22
  return {
30
23
  color: 'info500',
31
24
  description: i18n.t('Install'),
@@ -21,9 +21,7 @@ export type WalletInfo = {
21
21
  needsNamespace?: LegacyWalletInfo['needsNamespace'];
22
22
  needsDerivationPath?: LegacyWalletInfo['needsDerivationPath'];
23
23
  };
24
- export interface MakeInfoOptions {
25
- hasDeepLink: boolean;
26
- }
24
+
27
25
  export interface Info {
28
26
  color: string;
29
27
  description: string;
@@ -44,7 +42,6 @@ export interface WalletPropTypes {
44
42
  link: InstallObjects | string;
45
43
  type: WalletType;
46
44
  onClick: (type: WalletType) => void;
47
- hasDeepLink: boolean;
48
45
  selected?: boolean;
49
46
  description?: string;
50
47
  isLoading?: boolean;
@@ -8,8 +8,7 @@ import { Modal, Wallet } from '../../components/index.js';
8
8
  import { ModalContent } from './ConnectWalletsModal.styles.js';
9
9
 
10
10
  export function ConnectWalletsModal(props: ConnectWalletsModalPropTypes) {
11
- const { open, list, onSelect, onClose, id, checkHasDeepLink, getWalletLink } =
12
- props;
11
+ const { open, list, onSelect, onClose, id } = props;
13
12
 
14
13
  return (
15
14
  <Modal
@@ -23,13 +22,7 @@ export function ConnectWalletsModal(props: ConnectWalletsModalPropTypes) {
23
22
  >
24
23
  <ModalContent>
25
24
  {list.map((info) => (
26
- <Wallet
27
- {...info}
28
- key={info.title}
29
- onClick={onSelect}
30
- hasDeepLink={checkHasDeepLink(info.type)}
31
- link={getWalletLink(info.type)}
32
- />
25
+ <Wallet {...info} key={info.title} onClick={onSelect} />
33
26
  ))}
34
27
  </ModalContent>
35
28
  </Modal>
@@ -1,12 +1,10 @@
1
1
  import type { WalletInfo } from '../../components/index.js';
2
- import type { InstallObjects, WalletType } from '@rango-dev/wallets-shared';
2
+ import type { WalletType } from '@rango-dev/wallets-shared';
3
3
 
4
4
  export interface ConnectWalletsModalPropTypes {
5
5
  open: boolean;
6
6
  list: WalletInfo[];
7
7
  onSelect: (walletType: WalletType) => void;
8
- getWalletLink: (walletType: WalletType) => string | InstallObjects;
9
- checkHasDeepLink: (walletType: WalletType) => boolean;
10
8
  id: string;
11
9
  onClose: () => void;
12
10
  error?: string;