Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
Thunnini committed Dec 22, 2023
2 parents 1f4fae4 + ac59d9e commit bc34762
Show file tree
Hide file tree
Showing 34 changed files with 283 additions and 265 deletions.
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "0.12.54",
"version": "0.12.55-rc.0",
"useWorkspaces": true,
"npmClient": "yarn",
"command": {
Expand Down
2 changes: 1 addition & 1 deletion packages/analytics/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@keplr-wallet/analytics",
"version": "0.12.54",
"version": "0.12.55-rc.0",
"main": "build/index.js",
"author": "chainapsis",
"license": "Apache-2.0",
Expand Down
24 changes: 12 additions & 12 deletions packages/background/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@keplr-wallet/background",
"version": "0.12.54",
"version": "0.12.55-rc.0",
"main": "build/index.js",
"author": "chainapsis",
"license": "Apache-2.0",
Expand Down Expand Up @@ -28,17 +28,17 @@
"@ethersproject/hash": "^5.7.0",
"@ethersproject/transactions": "^5.7.0",
"@ethersproject/wallet": "^5.7.0",
"@keplr-wallet/chain-validator": "0.12.54",
"@keplr-wallet/common": "0.12.54",
"@keplr-wallet/cosmos": "0.12.54",
"@keplr-wallet/crypto": "0.12.54",
"@keplr-wallet/ledger-cosmos": "0.12.54",
"@keplr-wallet/popup": "0.12.54",
"@keplr-wallet/proto-types": "0.12.54",
"@keplr-wallet/router": "0.12.54",
"@keplr-wallet/simple-fetch": "0.12.54",
"@keplr-wallet/types": "0.12.54",
"@keplr-wallet/unit": "0.12.54",
"@keplr-wallet/chain-validator": "0.12.55-rc.0",
"@keplr-wallet/common": "0.12.55-rc.0",
"@keplr-wallet/cosmos": "0.12.55-rc.0",
"@keplr-wallet/crypto": "0.12.55-rc.0",
"@keplr-wallet/ledger-cosmos": "0.12.55-rc.0",
"@keplr-wallet/popup": "0.12.55-rc.0",
"@keplr-wallet/proto-types": "0.12.55-rc.0",
"@keplr-wallet/router": "0.12.55-rc.0",
"@keplr-wallet/simple-fetch": "0.12.55-rc.0",
"@keplr-wallet/types": "0.12.55-rc.0",
"@keplr-wallet/unit": "0.12.55-rc.0",
"@ledgerhq/hw-app-eth": "^6.29.3",
"@ledgerhq/hw-transport": "^6.20.0",
"@ledgerhq/hw-transport-webhid": "^6.20.0",
Expand Down
8 changes: 4 additions & 4 deletions packages/chain-validator/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@keplr-wallet/chain-validator",
"version": "0.12.54",
"version": "0.12.55-rc.0",
"main": "build/index.js",
"author": "chainapsis",
"license": "Apache-2.0",
Expand All @@ -16,9 +16,9 @@
"lint-fix": "eslint --fix \"src/**/*\" && prettier --write \"src/**/*\""
},
"dependencies": {
"@keplr-wallet/cosmos": "0.12.54",
"@keplr-wallet/simple-fetch": "0.12.54",
"@keplr-wallet/types": "0.12.54",
"@keplr-wallet/cosmos": "0.12.55-rc.0",
"@keplr-wallet/simple-fetch": "0.12.55-rc.0",
"@keplr-wallet/types": "0.12.55-rc.0",
"joi": "^17.5.0",
"utility-types": "^3.10.0"
}
Expand Down
6 changes: 3 additions & 3 deletions packages/common/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@keplr-wallet/common",
"version": "0.12.54",
"version": "0.12.55-rc.0",
"main": "build/index.js",
"author": "chainapsis",
"license": "Apache-2.0",
Expand All @@ -16,8 +16,8 @@
"lint-fix": "eslint --fix \"src/**/*\" && prettier --write \"src/**/*\""
},
"dependencies": {
"@keplr-wallet/crypto": "0.12.54",
"@keplr-wallet/types": "0.12.54",
"@keplr-wallet/crypto": "0.12.55-rc.0",
"@keplr-wallet/types": "0.12.55-rc.0",
"buffer": "^6.0.3",
"delay": "^4.4.0",
"mobx": "^6.1.7"
Expand Down
4 changes: 2 additions & 2 deletions packages/cosmjs-test/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cosmjs-test",
"version": "0.12.54",
"version": "0.12.55-rc.0",
"author": "chainapsis",
"license": "Apache-2.0",
"private": true,
Expand All @@ -12,7 +12,7 @@
},
"devDependencies": {
"@cosmjs/stargate": "^0.29.3",
"@keplr-wallet/provider-mock": "0.12.54",
"@keplr-wallet/provider-mock": "0.12.55-rc.0",
"secretjs": "^1.6.0"
}
}
14 changes: 7 additions & 7 deletions packages/cosmos/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@keplr-wallet/cosmos",
"version": "0.12.54",
"version": "0.12.55-rc.0",
"main": "build/index.js",
"author": "chainapsis",
"license": "Apache-2.0",
Expand All @@ -17,12 +17,12 @@
},
"dependencies": {
"@ethersproject/address": "^5.6.0",
"@keplr-wallet/common": "0.12.54",
"@keplr-wallet/crypto": "0.12.54",
"@keplr-wallet/proto-types": "0.12.54",
"@keplr-wallet/simple-fetch": "0.12.54",
"@keplr-wallet/types": "0.12.54",
"@keplr-wallet/unit": "0.12.54",
"@keplr-wallet/common": "0.12.55-rc.0",
"@keplr-wallet/crypto": "0.12.55-rc.0",
"@keplr-wallet/proto-types": "0.12.55-rc.0",
"@keplr-wallet/simple-fetch": "0.12.55-rc.0",
"@keplr-wallet/types": "0.12.55-rc.0",
"@keplr-wallet/unit": "0.12.55-rc.0",
"bech32": "^1.1.4",
"buffer": "^6.0.3",
"long": "^4.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/crypto/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@keplr-wallet/crypto",
"version": "0.12.54",
"version": "0.12.55-rc.0",
"main": "build/index.js",
"author": "chainapsis",
"license": "Apache-2.0",
Expand Down
40 changes: 20 additions & 20 deletions packages/extension/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@keplr-wallet/extension",
"version": "0.12.54",
"version": "0.12.55-rc.0",
"author": "chainapsis",
"license": "Apache-2.0",
"private": true,
Expand All @@ -25,25 +25,25 @@
"@ethersproject/transactions": "^5.7.0",
"@floating-ui/react": "^0.23.0",
"@floating-ui/react-dom": "^1.3.0",
"@keplr-wallet/analytics": "0.12.54",
"@keplr-wallet/background": "0.12.54",
"@keplr-wallet/chain-validator": "0.12.54",
"@keplr-wallet/common": "0.12.54",
"@keplr-wallet/cosmos": "0.12.54",
"@keplr-wallet/crypto": "0.12.54",
"@keplr-wallet/hooks": "0.12.54",
"@keplr-wallet/ledger-cosmos": "0.12.54",
"@keplr-wallet/popup": "0.12.54",
"@keplr-wallet/proto-types": "0.12.54",
"@keplr-wallet/provider": "0.12.54",
"@keplr-wallet/router": "0.12.54",
"@keplr-wallet/router-extension": "0.12.54",
"@keplr-wallet/simple-fetch": "0.12.54",
"@keplr-wallet/stores": "0.12.54",
"@keplr-wallet/stores-core": "0.12.54",
"@keplr-wallet/stores-etc": "0.12.54",
"@keplr-wallet/types": "0.12.54",
"@keplr-wallet/unit": "0.12.54",
"@keplr-wallet/analytics": "0.12.55-rc.0",
"@keplr-wallet/background": "0.12.55-rc.0",
"@keplr-wallet/chain-validator": "0.12.55-rc.0",
"@keplr-wallet/common": "0.12.55-rc.0",
"@keplr-wallet/cosmos": "0.12.55-rc.0",
"@keplr-wallet/crypto": "0.12.55-rc.0",
"@keplr-wallet/hooks": "0.12.55-rc.0",
"@keplr-wallet/ledger-cosmos": "0.12.55-rc.0",
"@keplr-wallet/popup": "0.12.55-rc.0",
"@keplr-wallet/proto-types": "0.12.55-rc.0",
"@keplr-wallet/provider": "0.12.55-rc.0",
"@keplr-wallet/router": "0.12.55-rc.0",
"@keplr-wallet/router-extension": "0.12.55-rc.0",
"@keplr-wallet/simple-fetch": "0.12.55-rc.0",
"@keplr-wallet/stores": "0.12.55-rc.0",
"@keplr-wallet/stores-core": "0.12.55-rc.0",
"@keplr-wallet/stores-etc": "0.12.55-rc.0",
"@keplr-wallet/types": "0.12.55-rc.0",
"@keplr-wallet/unit": "0.12.55-rc.0",
"@keystonehq/animated-qr": "^0.8.6",
"@keystonehq/keystone-sdk": "^0.2.3",
"@ledgerhq/devices": "^6.20.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/extension/src/manifest.v2.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

"name": "Keplr",
"description": "Keplr is a browser extension wallet for the Inter blockchain ecosystem.",
"version": "0.12.54",
"version": "0.12.55",
"icons": {
"16": "assets/icon-16.png",
"48": "assets/icon-48.png",
Expand Down
2 changes: 1 addition & 1 deletion packages/extension/src/manifest.v3.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

"name": "Keplr",
"description": "Keplr is a browser extension wallet for the Inter blockchain ecosystem.",
"version": "0.12.54",
"version": "0.12.55",
"icons": {
"16": "assets/icon-16.png",
"48": "assets/icon-48.png",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ export const ClaimAll: FunctionComponent<{ isNotReady?: boolean }> = observer(
average?: number;
high?: number;
}>(
"https://base-fee-step.s3.us-west-2.amazonaws.com/osmosis-base-fee-beta.json"
"https://gjsttg7mkgtqhjpt3mv5aeuszi0zblbb.lambda-url.us-west-2.on.aws/osmosis/osmosis-base-fee-beta.json"
);

await queryBaseFee.waitFreshResponse();
Expand Down
64 changes: 41 additions & 23 deletions packages/extension/src/pages/main/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,13 @@ type TabStatus = "available" | "staked";
export const MainPage: FunctionComponent<{
setIsNotReady: (isNotReady: boolean) => void;
}> = observer(({ setIsNotReady }) => {
const { analyticsStore, hugeQueriesStore, uiConfigStore, keyRingStore } =
useStore();
const {
analyticsStore,
hugeQueriesStore,
uiConfigStore,
keyRingStore,
priceStore,
} = useStore();

const isNotReady = useIsNotReady();
const intl = useIntl();
Expand All @@ -101,22 +106,25 @@ export const MainPage: FunctionComponent<{
}
return result;
}, [hugeQueriesStore.allKnownBalances]);
const availableTotalPriceEmbedOnly = useMemo(() => {
const availableTotalPriceEmbedOnlyUSD = useMemo(() => {
let result: PricePretty | undefined;
for (const bal of hugeQueriesStore.allKnownBalances) {
if (!(bal.chainInfo.embedded as ChainInfoWithCoreTypes).embedded) {
continue;
}
if (bal.price) {
if (!result) {
result = bal.price;
} else {
result = result.add(bal.price);
const price = priceStore.calculatePrice(bal.token, "usd");
if (price) {
if (!result) {
result = price;
} else {
result = result.add(price);
}
}
}
}
return result;
}, [hugeQueriesStore.allKnownBalances]);
}, [hugeQueriesStore.allKnownBalances, priceStore]);
const availableChartWeight = (() => {
if (!isNotReady && uiConfigStore.isPrivacyMode) {
if (tabStatus === "available") {
Expand Down Expand Up @@ -151,17 +159,20 @@ export const MainPage: FunctionComponent<{
}
return result;
}, [hugeQueriesStore.delegations, hugeQueriesStore.unbondings]);
const stakedTotalPriceEmbedOnly = useMemo(() => {
const stakedTotalPriceEmbedOnlyUSD = useMemo(() => {
let result: PricePretty | undefined;
for (const bal of hugeQueriesStore.delegations) {
if (!(bal.chainInfo.embedded as ChainInfoWithCoreTypes).embedded) {
continue;
}
if (bal.price) {
if (!result) {
result = bal.price;
} else {
result = result.add(bal.price);
const price = priceStore.calculatePrice(bal.token, "usd");
if (price) {
if (!result) {
result = price;
} else {
result = result.add(price);
}
}
}
}
Expand All @@ -172,15 +183,18 @@ export const MainPage: FunctionComponent<{
continue;
}
if (bal.viewToken.price) {
if (!result) {
result = bal.viewToken.price;
} else {
result = result.add(bal.viewToken.price);
const price = priceStore.calculatePrice(bal.viewToken.token, "usd");
if (price) {
if (!result) {
result = price;
} else {
result = result.add(price);
}
}
}
}
return result;
}, [hugeQueriesStore.delegations, hugeQueriesStore.unbondings]);
}, [hugeQueriesStore.delegations, hugeQueriesStore.unbondings, priceStore]);
const stakedChartWeight = (() => {
if (!isNotReady && uiConfigStore.isPrivacyMode) {
if (tabStatus === "staked") {
Expand All @@ -198,11 +212,11 @@ export const MainPage: FunctionComponent<{
const lastTotalStakedAmbiguousAvg = useRef(-1);
useEffect(() => {
if (!isNotReady) {
const totalAvailableAmbiguousAvg = availableTotalPriceEmbedOnly
? amountToAmbiguousAverage(availableTotalPriceEmbedOnly)
const totalAvailableAmbiguousAvg = availableTotalPriceEmbedOnlyUSD
? amountToAmbiguousAverage(availableTotalPriceEmbedOnlyUSD)
: 0;
const totalStakedAmbiguousAvg = stakedTotalPriceEmbedOnly
? amountToAmbiguousAverage(stakedTotalPriceEmbedOnly)
const totalStakedAmbiguousAvg = stakedTotalPriceEmbedOnlyUSD
? amountToAmbiguousAverage(stakedTotalPriceEmbedOnlyUSD)
: 0;
if (
lastTotalAvailableAmbiguousAvg.current !== totalAvailableAmbiguousAvg ||
Expand All @@ -224,7 +238,11 @@ export const MainPage: FunctionComponent<{
lastTotalStakedAmbiguousAvg.current = totalStakedAmbiguousAvg;
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [availableTotalPriceEmbedOnly, isNotReady, stakedTotalPriceEmbedOnly]);
}, [
availableTotalPriceEmbedOnlyUSD,
isNotReady,
stakedTotalPriceEmbedOnlyUSD,
]);

const [isOpenDepositModal, setIsOpenDepositModal] = React.useState(false);
const [isOpenBuy, setIsOpenBuy] = React.useState(false);
Expand Down
2 changes: 1 addition & 1 deletion packages/extension/src/stores/ui-config/new-chain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ export class NewChainSuggestionConfig {
const res = await simpleFetch<{
info: Remote[];
}>(
"https://keplr-new-chain-added-tooltip.s3.us-west-2.amazonaws.com/info.json"
"https://gjsttg7mkgtqhjpt3mv5aeuszi0zblbb.lambda-url.us-west-2.on.aws/new-chain/info.json"
);

const validated = await Schema.validateAsync(res.data);
Expand Down
22 changes: 11 additions & 11 deletions packages/hooks/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@keplr-wallet/hooks",
"version": "0.12.54",
"version": "0.12.55-rc.0",
"main": "build/index.js",
"author": "chainapsis",
"license": "Apache-2.0",
Expand All @@ -17,16 +17,16 @@
},
"dependencies": {
"@ethersproject/address": "^5.6.0",
"@keplr-wallet/background": "0.12.54",
"@keplr-wallet/common": "0.12.54",
"@keplr-wallet/cosmos": "0.12.54",
"@keplr-wallet/crypto": "0.12.54",
"@keplr-wallet/proto-types": "0.12.54",
"@keplr-wallet/simple-fetch": "0.12.54",
"@keplr-wallet/stores": "0.12.54",
"@keplr-wallet/stores-etc": "0.12.54",
"@keplr-wallet/types": "0.12.54",
"@keplr-wallet/unit": "0.12.54",
"@keplr-wallet/background": "0.12.55-rc.0",
"@keplr-wallet/common": "0.12.55-rc.0",
"@keplr-wallet/cosmos": "0.12.55-rc.0",
"@keplr-wallet/crypto": "0.12.55-rc.0",
"@keplr-wallet/proto-types": "0.12.55-rc.0",
"@keplr-wallet/simple-fetch": "0.12.55-rc.0",
"@keplr-wallet/stores": "0.12.55-rc.0",
"@keplr-wallet/stores-etc": "0.12.55-rc.0",
"@keplr-wallet/types": "0.12.55-rc.0",
"@keplr-wallet/unit": "0.12.55-rc.0",
"buffer": "^6.0.3",
"long": "^4.0.0",
"utility-types": "^3.10.0"
Expand Down
Loading

0 comments on commit bc34762

Please sign in to comment.