Skip to content

Commit 5c448f3

Browse files
committed
Merge branch 'develop'
2 parents 76ed391 + 10efa73 commit 5c448f3

File tree

55 files changed

+687
-452
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+687
-452
lines changed

apps/extension/package.json

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@keplr-wallet/extension",
3-
"version": "0.12.215",
3+
"version": "0.12.216-rc.0",
44
"author": "chainapsis",
55
"license": "Apache-2.0",
66
"private": true,
@@ -26,33 +26,33 @@
2626
"@ethersproject/transactions": "^5.7.0",
2727
"@floating-ui/react": "^0.23.0",
2828
"@floating-ui/react-dom": "^1.3.0",
29-
"@keplr-wallet/analytics": "0.12.215",
30-
"@keplr-wallet/background": "0.12.215",
31-
"@keplr-wallet/chain-validator": "0.12.215",
32-
"@keplr-wallet/common": "0.12.215",
33-
"@keplr-wallet/cosmos": "0.12.215",
34-
"@keplr-wallet/crypto": "0.12.215",
35-
"@keplr-wallet/hooks": "0.12.215",
36-
"@keplr-wallet/hooks-bitcoin": "0.12.215",
37-
"@keplr-wallet/hooks-internal": "0.12.215",
38-
"@keplr-wallet/hooks-starknet": "0.12.215",
39-
"@keplr-wallet/ledger-cosmos": "0.12.215",
40-
"@keplr-wallet/popup": "0.12.215",
41-
"@keplr-wallet/proto-types": "0.12.215",
42-
"@keplr-wallet/provider": "0.12.215",
43-
"@keplr-wallet/router": "0.12.215",
44-
"@keplr-wallet/router-extension": "0.12.215",
45-
"@keplr-wallet/simple-fetch": "0.12.215",
46-
"@keplr-wallet/stores": "0.12.215",
47-
"@keplr-wallet/stores-bitcoin": "0.12.215",
48-
"@keplr-wallet/stores-core": "0.12.215",
49-
"@keplr-wallet/stores-etc": "0.12.215",
50-
"@keplr-wallet/stores-eth": "0.12.215",
51-
"@keplr-wallet/stores-ibc": "0.12.215",
52-
"@keplr-wallet/stores-internal": "0.12.215",
53-
"@keplr-wallet/stores-starknet": "0.12.215",
54-
"@keplr-wallet/types": "0.12.215",
55-
"@keplr-wallet/unit": "0.12.215",
29+
"@keplr-wallet/analytics": "0.12.216-rc.0",
30+
"@keplr-wallet/background": "0.12.216-rc.0",
31+
"@keplr-wallet/chain-validator": "0.12.216-rc.0",
32+
"@keplr-wallet/common": "0.12.216-rc.0",
33+
"@keplr-wallet/cosmos": "0.12.216-rc.0",
34+
"@keplr-wallet/crypto": "0.12.216-rc.0",
35+
"@keplr-wallet/hooks": "0.12.216-rc.0",
36+
"@keplr-wallet/hooks-bitcoin": "0.12.216-rc.0",
37+
"@keplr-wallet/hooks-internal": "0.12.216-rc.0",
38+
"@keplr-wallet/hooks-starknet": "0.12.216-rc.0",
39+
"@keplr-wallet/ledger-cosmos": "0.12.216-rc.0",
40+
"@keplr-wallet/popup": "0.12.216-rc.0",
41+
"@keplr-wallet/proto-types": "0.12.216-rc.0",
42+
"@keplr-wallet/provider": "0.12.216-rc.0",
43+
"@keplr-wallet/router": "0.12.216-rc.0",
44+
"@keplr-wallet/router-extension": "0.12.216-rc.0",
45+
"@keplr-wallet/simple-fetch": "0.12.216-rc.0",
46+
"@keplr-wallet/stores": "0.12.216-rc.0",
47+
"@keplr-wallet/stores-bitcoin": "0.12.216-rc.0",
48+
"@keplr-wallet/stores-core": "0.12.216-rc.0",
49+
"@keplr-wallet/stores-etc": "0.12.216-rc.0",
50+
"@keplr-wallet/stores-eth": "0.12.216-rc.0",
51+
"@keplr-wallet/stores-ibc": "0.12.216-rc.0",
52+
"@keplr-wallet/stores-internal": "0.12.216-rc.0",
53+
"@keplr-wallet/stores-starknet": "0.12.216-rc.0",
54+
"@keplr-wallet/types": "0.12.216-rc.0",
55+
"@keplr-wallet/unit": "0.12.216-rc.0",
5656
"@keystonehq/animated-qr": "^0.8.6",
5757
"@keystonehq/hw-app-base": "0.1.1",
5858
"@keystonehq/hw-transport-webusb": "0.4.0",

apps/extension/src/bottom-tabs.tsx

Lines changed: 59 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import { useTheme } from "styled-components";
66
import { YAxis } from "./components/axis";
77
import { Caption2 } from "./components/typography";
88
import { Box } from "./components/box";
9+
import { Tooltip } from "./components/tooltip";
910

1011
export const BottomTabsHeightRem = "3.75rem";
1112

@@ -25,6 +26,9 @@ export const BottomTabsRouteProvider: FunctionComponent<
2526
pathname: string;
2627
icon: React.ReactNode;
2728
text: string;
29+
30+
disabled?: boolean;
31+
tooltip?: string;
2832
}[];
2933

3034
forceHideBottomTabs?: boolean;
@@ -80,6 +84,7 @@ export const BottomTabsRouteProvider: FunctionComponent<
8084
}}
8185
>
8286
{tabs.map((tab, i) => {
87+
const disabled = !!tab.disabled;
8388
const isActive = tab.pathname === location.pathname;
8489

8590
return (
@@ -90,11 +95,10 @@ export const BottomTabsRouteProvider: FunctionComponent<
9095
width: "1px",
9196
}}
9297
>
93-
<Link
94-
to={tab.pathname}
95-
style={{
96-
textDecoration: "none",
97-
}}
98+
<LinkComp
99+
pathname={tab.pathname}
100+
disabled={disabled}
101+
tooltip={tab.tooltip}
98102
>
99103
<div
100104
style={{
@@ -103,8 +107,14 @@ export const BottomTabsRouteProvider: FunctionComponent<
103107
flexDirection: "column",
104108
alignItems: "center",
105109
justifyContent: "center",
106-
opacity: isNotReady ? 0 : 1,
110+
opacity: isNotReady ? 0 : disabled ? 0.6 : 1,
107111
color: (() => {
112+
if (disabled) {
113+
return theme.mode === "light"
114+
? ColorPalette["gray-100"]
115+
: ColorPalette["gray-400"];
116+
}
117+
108118
if (theme.mode === "light") {
109119
return isActive
110120
? ColorPalette["blue-400"]
@@ -138,6 +148,12 @@ export const BottomTabsRouteProvider: FunctionComponent<
138148
wordBreak: "keep-all",
139149
}}
140150
color={(() => {
151+
if (disabled) {
152+
return theme.mode === "light"
153+
? ColorPalette["gray-200"]
154+
: ColorPalette["gray-300"];
155+
}
156+
141157
if (theme.mode === "light") {
142158
return isActive
143159
? ColorPalette["blue-400"]
@@ -154,7 +170,7 @@ export const BottomTabsRouteProvider: FunctionComponent<
154170
</BottomTabActiveStateContext.Provider>
155171
</YAxis>
156172
</div>
157-
</Link>
173+
</LinkComp>
158174
</Box>
159175
);
160176
})}
@@ -164,6 +180,42 @@ export const BottomTabsRouteProvider: FunctionComponent<
164180
);
165181
};
166182

183+
const LinkComp: FunctionComponent<
184+
PropsWithChildren<{
185+
pathname: string;
186+
disabled: boolean;
187+
tooltip?: string;
188+
}>
189+
> = ({ children, pathname, disabled, tooltip }) => {
190+
if (!disabled) {
191+
return (
192+
<Tooltip content={tooltip}>
193+
<Link
194+
to={pathname}
195+
style={{
196+
textDecoration: "none",
197+
}}
198+
>
199+
{children}
200+
</Link>
201+
</Tooltip>
202+
);
203+
} else {
204+
return (
205+
<Tooltip content={tooltip}>
206+
<div
207+
style={{
208+
textDecoration: "none",
209+
cursor: "not-allowed",
210+
}}
211+
>
212+
{children}
213+
</div>
214+
</Tooltip>
215+
);
216+
}
217+
};
218+
167219
const useIsTabActive = () => {
168220
const context = React.useContext(BottomTabActiveStateContext);
169221
if (context == null) {

apps/extension/src/components/button/right-arrow-icon.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,18 @@ export const RightArrowIcon: FunctionComponent<IconProps> = ({
88
}) => {
99
return (
1010
<svg
11+
xmlns="http://www.w3.org/2000/svg"
1112
width={width}
1213
height={height}
1314
viewBox="0 0 24 24"
1415
fill="none"
15-
xmlns="http://www.w3.org/2000/svg"
1616
>
1717
<path
1818
fillRule="evenodd"
1919
clipRule="evenodd"
20-
d="M4.1001 12.0002C4.1001 11.5031 4.50304 11.1002 5.0001 11.1002L17.7656 11.1002L12.7763 6.34894C12.418 6.00443 12.4068 5.43469 12.7513 5.0764C13.0959 4.7181 13.6656 4.70693 14.0239 5.05144L20.6239 11.3514C20.8004 11.5211 20.9001 11.7554 20.9001 12.0002C20.9001 12.245 20.8004 12.4793 20.6239 12.6489L14.0239 18.9489C13.6656 19.2935 13.0959 19.2823 12.7513 18.924C12.4068 18.5657 12.418 17.996 12.7763 17.6514L17.7656 12.9002L5.0001 12.9002C4.50304 12.9002 4.1001 12.4973 4.1001 12.0002Z"
21-
fill={color || "#F6F6F9"}
20+
d="M3.6001 12.0002C3.6001 11.5031 4.00304 11.1002 4.5001 11.1002L17.2656 11.1002L12.2763 6.34894C11.918 6.00443 11.9068 5.43469 12.2513 5.0764C12.5959 4.7181 13.1656 4.70693 13.5239 5.05144L20.1239 11.3514C20.3004 11.5211 20.4001 11.7554 20.4001 12.0002C20.4001 12.245 20.3004 12.4793 20.1239 12.6489L13.5239 18.9489C13.1656 19.2935 12.5959 19.2823 12.2513 18.924C11.9068 18.5657 11.918 17.996 12.2763 17.6514L17.2656 12.9002L4.5001 12.9002C4.00304 12.9002 3.6001 12.4973 3.6001 12.0002Z"
21+
fill={color ?? "currentColor"}
22+
strokeWidth="0.1"
2223
/>
2324
</svg>
2425
);

apps/extension/src/config.ts

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3346,6 +3346,57 @@ export const EmbedChainInfos: (ChainInfo | ModularChainInfo)[] = [
33463346
],
33473347
features: [],
33483348
},
3349+
{
3350+
chainId: "bbn-1",
3351+
chainName: "Babylon Genesis",
3352+
chainSymbolImageUrl:
3353+
"https://raw.githubusercontent.com/chainapsis/keplr-chain-registry/main/images/bbn/chain.png",
3354+
rpc: "https://rpc-babylon.keplr.app",
3355+
rest: "https://lcd-babylon.keplr.app",
3356+
walletUrlForStaking: "https://wallet.keplr.app/chains/babylon-genesis",
3357+
bip44: {
3358+
coinType: 118,
3359+
},
3360+
bech32Config: {
3361+
bech32PrefixAccAddr: "bbn",
3362+
bech32PrefixAccPub: "bbnpub",
3363+
bech32PrefixValAddr: "bbnvaloper",
3364+
bech32PrefixValPub: "bbnvaloperpub",
3365+
bech32PrefixConsAddr: "bbnvalcons",
3366+
bech32PrefixConsPub: "bbnvalconspub",
3367+
},
3368+
currencies: [
3369+
{
3370+
coinDenom: "BABY",
3371+
coinMinimalDenom: "ubbn",
3372+
coinDecimals: 6,
3373+
coinImageUrl:
3374+
"https://raw.githubusercontent.com/chainapsis/keplr-chain-registry/main/images/bbn/chain.png",
3375+
},
3376+
],
3377+
feeCurrencies: [
3378+
{
3379+
coinDenom: "BABY",
3380+
coinMinimalDenom: "ubbn",
3381+
coinDecimals: 6,
3382+
coinImageUrl:
3383+
"https://raw.githubusercontent.com/chainapsis/keplr-chain-registry/main/images/bbn/chain.png",
3384+
gasPriceStep: {
3385+
low: 0.007,
3386+
average: 0.007,
3387+
high: 0.01,
3388+
},
3389+
},
3390+
],
3391+
stakeCurrency: {
3392+
coinDenom: "BABY",
3393+
coinMinimalDenom: "ubbn",
3394+
coinDecimals: 6,
3395+
coinImageUrl:
3396+
"https://raw.githubusercontent.com/chainapsis/keplr-chain-registry/main/images/bbn/chain.png",
3397+
},
3398+
features: ["cosmwasm"],
3399+
},
33493400
];
33503401

33513402
// The origins that are able to pass any permission that external webpages can have.

apps/extension/src/index.tsx

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -362,6 +362,21 @@ const RoutesAfterReady: FunctionComponent = observer(() => {
362362
text: intl.formatMessage({
363363
id: "bottom-tabs.swap",
364364
}),
365+
...(() => {
366+
for (const modularChainInfo of chainStore.modularChainInfosInUI) {
367+
if ("cosmos" in modularChainInfo) {
368+
return {
369+
disabled: false,
370+
};
371+
}
372+
}
373+
return {
374+
disabled: true,
375+
tooltip: intl.formatMessage({
376+
id: "bottom-tabs.swap.disabled",
377+
}),
378+
};
379+
})(),
365380
},
366381
{
367382
pathname: "/activities",

apps/extension/src/languages/en.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
"bottom-tabs.swap": "Swap",
2828
"bottom-tabs.activity": "Activity",
2929
"bottom-tabs.settings": "Settings",
30+
"bottom-tabs.swap.disabled": "Swap only works with Cosmos or Ethereum-based chains. Please add one to use it.",
3031

3132
"pages.register.components.header.intro-title": "Your Interchain Gateway",
3233
"pages.register.components.header.header-step.title": "Step",

apps/extension/src/languages/ko.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
"bottom-tabs.swap": "스왑",
2828
"bottom-tabs.activity": "활동내역",
2929
"bottom-tabs.settings": "설정",
30+
"bottom-tabs.swap.disabled": "스왑은 현재 코스모스, 이더리움 계열 체인들만 지원하고 있습니다. 사용하려면 코스모스나 이더리움 계열 체인을 추가해주세요",
3031

3132
"pages.register.components.header.intro-title": "내 손 안의 인터체인",
3233
"pages.register.components.header.header-step.title": "단계",

apps/extension/src/manifest.v2.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
"name": "Keplr",
55
"description": "Keplr is a browser extension wallet for the Inter blockchain ecosystem.",
6-
"version": "0.12.215",
6+
"version": "0.12.216",
77
"icons": {
88
"16": "assets/icon-16.png",
99
"48": "assets/icon-48.png",

apps/extension/src/manifest.v3.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
"name": "Keplr",
55
"description": "Keplr is a browser extension wallet for the Inter blockchain ecosystem.",
6-
"version": "0.12.215",
6+
"version": "0.12.216",
77
"icons": {
88
"16": "assets/icon-16.png",
99
"48": "assets/icon-48.png",

0 commit comments

Comments
 (0)