Skip to content

Commit 12029f3

Browse files
committed
Merge remote-tracking branch 'origin/develop' into editaahn/refactor-modular-merge
2 parents f9bdcb3 + b4d5833 commit 12029f3

File tree

46 files changed

+426
-415
lines changed

Some content is hidden

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

46 files changed

+426
-415
lines changed

apps/extension/package.json

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@keplr-wallet/extension",
3-
"version": "0.12.296",
3+
"version": "0.12.297",
44
"author": "chainapsis",
55
"license": "Apache-2.0",
66
"private": true,
@@ -26,34 +26,34 @@
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.296",
30-
"@keplr-wallet/background": "0.12.296",
31-
"@keplr-wallet/chain-validator": "0.12.296",
32-
"@keplr-wallet/common": "0.12.296",
33-
"@keplr-wallet/cosmos": "0.12.296",
34-
"@keplr-wallet/crypto": "0.12.296",
35-
"@keplr-wallet/hooks": "0.12.296",
36-
"@keplr-wallet/hooks-bitcoin": "0.12.296",
37-
"@keplr-wallet/hooks-internal": "0.12.296",
38-
"@keplr-wallet/hooks-starknet": "0.12.296",
39-
"@keplr-wallet/ledger-cosmos": "0.12.296",
40-
"@keplr-wallet/popup": "0.12.296",
41-
"@keplr-wallet/proto-types": "0.12.296",
42-
"@keplr-wallet/provider": "0.12.296",
43-
"@keplr-wallet/router": "0.12.296",
44-
"@keplr-wallet/router-extension": "0.12.296",
45-
"@keplr-wallet/simple-fetch": "0.12.296",
46-
"@keplr-wallet/stores": "0.12.296",
47-
"@keplr-wallet/stores-bitcoin": "0.12.296",
48-
"@keplr-wallet/stores-core": "0.12.296",
49-
"@keplr-wallet/stores-etc": "0.12.296",
50-
"@keplr-wallet/stores-eth": "0.12.296",
51-
"@keplr-wallet/stores-ibc": "0.12.296",
52-
"@keplr-wallet/stores-internal": "0.12.296",
53-
"@keplr-wallet/stores-starknet": "0.12.296",
54-
"@keplr-wallet/topup-client": "0.12.296",
55-
"@keplr-wallet/types": "0.12.296",
56-
"@keplr-wallet/unit": "0.12.296",
29+
"@keplr-wallet/analytics": "0.12.297",
30+
"@keplr-wallet/background": "0.12.297",
31+
"@keplr-wallet/chain-validator": "0.12.297",
32+
"@keplr-wallet/common": "0.12.297",
33+
"@keplr-wallet/cosmos": "0.12.297",
34+
"@keplr-wallet/crypto": "0.12.297",
35+
"@keplr-wallet/hooks": "0.12.297",
36+
"@keplr-wallet/hooks-bitcoin": "0.12.297",
37+
"@keplr-wallet/hooks-internal": "0.12.297",
38+
"@keplr-wallet/hooks-starknet": "0.12.297",
39+
"@keplr-wallet/ledger-cosmos": "0.12.297",
40+
"@keplr-wallet/popup": "0.12.297",
41+
"@keplr-wallet/proto-types": "0.12.297",
42+
"@keplr-wallet/provider": "0.12.297",
43+
"@keplr-wallet/router": "0.12.297",
44+
"@keplr-wallet/router-extension": "0.12.297",
45+
"@keplr-wallet/simple-fetch": "0.12.297",
46+
"@keplr-wallet/stores": "0.12.297",
47+
"@keplr-wallet/stores-bitcoin": "0.12.297",
48+
"@keplr-wallet/stores-core": "0.12.297",
49+
"@keplr-wallet/stores-etc": "0.12.297",
50+
"@keplr-wallet/stores-eth": "0.12.297",
51+
"@keplr-wallet/stores-ibc": "0.12.297",
52+
"@keplr-wallet/stores-internal": "0.12.297",
53+
"@keplr-wallet/stores-starknet": "0.12.297",
54+
"@keplr-wallet/topup-client": "0.12.297",
55+
"@keplr-wallet/types": "0.12.297",
56+
"@keplr-wallet/unit": "0.12.297",
5757
"@keystonehq/animated-qr": "^0.8.6",
5858
"@keystonehq/hw-app-base": "0.1.1",
5959
"@keystonehq/hw-transport-webusb": "0.4.0",

apps/extension/src/hooks/use-topup.ts

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -50,15 +50,26 @@ export function useTopUp({
5050

5151
const remainingText = (() => {
5252
if (remainingTimeMs === undefined) return undefined;
53-
const minutes = Math.floor(remainingTimeMs / 60000);
54-
const seconds = Math.floor((remainingTimeMs % 60000) / 1000);
55-
return intl.formatMessage(
56-
{ id: "components.top-up.wait-time" },
57-
{
58-
minutes: minutes.toString(),
59-
seconds: seconds.toString().padStart(2, "0"),
60-
}
61-
);
53+
54+
const HOUR_MS = 60 * 60 * 1000;
55+
const MINUTE_MS = 60 * 1000;
56+
let time: string;
57+
58+
if (remainingTimeMs >= HOUR_MS) {
59+
const hours = Math.floor(remainingTimeMs / HOUR_MS);
60+
const minutes = Math.floor((remainingTimeMs % HOUR_MS) / MINUTE_MS);
61+
time = `${hours.toString().padStart(2, "0")}h ${minutes
62+
.toString()
63+
.padStart(2, "0")}m`;
64+
} else {
65+
const minutes = Math.floor(remainingTimeMs / MINUTE_MS);
66+
const seconds = Math.floor((remainingTimeMs % MINUTE_MS) / 1000);
67+
time = `${minutes.toString().padStart(2, "0")}m ${seconds
68+
.toString()
69+
.padStart(2, "0")}s`;
70+
}
71+
72+
return intl.formatMessage({ id: "components.top-up.wait-time" }, { time });
6273
})();
6374

6475
useEffect(() => {

apps/extension/src/languages/en.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -889,7 +889,7 @@
889889
"components.top-up.tx-fee": "Tx Fee",
890890
"components.top-up.covered-by-keplr": "Covered by Keplr",
891891
"components.top-up.keep-window-open": "Keep this window open during the transaction",
892-
"components.top-up.wait-time": "Next free tx in {minutes}:{seconds}",
892+
"components.top-up.wait-time": "Next free tx in {time}",
893893

894894
"button.confirm": "Confirm",
895895
"button.ok": "OK",

apps/extension/src/languages/ko.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -795,7 +795,7 @@
795795
"components.top-up.tx-fee": "트랜잭션 수수료",
796796
"components.top-up.covered-by-keplr": "Keplr가 대신 지불",
797797
"components.top-up.keep-window-open": "거래 진행 중에는 이 창을 열어두세요",
798-
"components.top-up.wait-time": "다음 수수료 지원까지 {minutes}:{seconds}",
798+
"components.top-up.wait-time": "다음 수수료 지원까지 {time}",
799799

800800
"button.confirm": "확인",
801801
"button.ok": "확인",

apps/extension/src/languages/zh-cn.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -738,7 +738,7 @@
738738
"components.top-up.tx-fee": "交易手续费",
739739
"components.top-up.covered-by-keplr": "由 Keplr 支付",
740740
"components.top-up.keep-window-open": "交易期间请保持此窗口打开",
741-
"components.top-up.wait-time": "下次免费交易在 {minutes}:{seconds}",
741+
"components.top-up.wait-time": "下次免费交易在 {time}",
742742

743743
"button.confirm": "确定",
744744
"button.ok": "好的",

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.296",
6+
"version": "0.12.297",
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.296",
6+
"version": "0.12.297",
77
"icons": {
88
"16": "assets/icon-16.png",
99
"48": "assets/icon-48.png",

apps/hooks-internal/package.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@keplr-wallet/hooks-internal",
3-
"version": "0.12.296",
3+
"version": "0.12.297",
44
"main": "build/index.js",
55
"author": "chainapsis",
66
"license": "Apache-2.0",
@@ -14,13 +14,13 @@
1414
"lint-fix": "npx eslint --fix \"src/**/*\" && npx prettier --write \"src/**/*\""
1515
},
1616
"dependencies": {
17-
"@keplr-wallet/cosmos": "0.12.296",
18-
"@keplr-wallet/hooks": "0.12.296",
19-
"@keplr-wallet/stores": "0.12.296",
20-
"@keplr-wallet/stores-eth": "0.12.296",
21-
"@keplr-wallet/stores-internal": "0.12.296",
22-
"@keplr-wallet/types": "0.12.296",
23-
"@keplr-wallet/unit": "0.12.296"
17+
"@keplr-wallet/cosmos": "0.12.297",
18+
"@keplr-wallet/hooks": "0.12.297",
19+
"@keplr-wallet/stores": "0.12.297",
20+
"@keplr-wallet/stores-eth": "0.12.297",
21+
"@keplr-wallet/stores-internal": "0.12.297",
22+
"@keplr-wallet/types": "0.12.297",
23+
"@keplr-wallet/unit": "0.12.297"
2424
},
2525
"peerDependencies": {
2626
"mobx": "^6",

apps/stores-internal/package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@keplr-wallet/stores-internal",
3-
"version": "0.12.296",
3+
"version": "0.12.297",
44
"main": "build/index.js",
55
"author": "chainapsis",
66
"license": "Apache-2.0",
@@ -14,12 +14,12 @@
1414
"lint-fix": "npx eslint --fix \"src/**/*\" && npx prettier --write \"src/**/*\""
1515
},
1616
"dependencies": {
17-
"@keplr-wallet/common": "0.12.296",
18-
"@keplr-wallet/cosmos": "0.12.296",
19-
"@keplr-wallet/simple-fetch": "0.12.296",
20-
"@keplr-wallet/stores": "0.12.296",
21-
"@keplr-wallet/types": "0.12.296",
22-
"@keplr-wallet/unit": "0.12.296",
17+
"@keplr-wallet/common": "0.12.297",
18+
"@keplr-wallet/cosmos": "0.12.297",
19+
"@keplr-wallet/simple-fetch": "0.12.297",
20+
"@keplr-wallet/stores": "0.12.297",
21+
"@keplr-wallet/types": "0.12.297",
22+
"@keplr-wallet/unit": "0.12.297",
2323
"joi": "^17.5.0",
2424
"utility-types": "^3.10.0"
2525
},

lerna.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "0.12.296",
2+
"version": "0.12.297",
33
"useWorkspaces": true,
44
"npmClient": "yarn",
55
"command": {

0 commit comments

Comments
 (0)