Skip to content

Commit

Permalink
Merge pull request #257 from enkryptcom/develop
Browse files Browse the repository at this point in the history
Release: v1.15.0
  • Loading branch information
kvhnuke authored Mar 29, 2023
2 parents b86505c + feccec9 commit 22700f1
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 10 deletions.
2 changes: 1 addition & 1 deletion packages/extension/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@enkryptcom/extension",
"version": "1.14.0",
"version": "1.15.0",
"private": true,
"scripts": {
"zip": "cd dist; zip -r release.zip *;",
Expand Down
9 changes: 4 additions & 5 deletions packages/extension/src/libs/activity-state/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,13 @@ class ActivityState {
.filter((item) => item.status === ActivityStatus.success && item.nonce)
.map((item) => item.nonce);
for (let i = 0; i < combined.length; i++) {
if (
!existingHashes.includes(combined[i].transactionHash) &&
combined[i].timestamp > currentTime - MAX_PENDING_TIME
) {
if (!existingHashes.includes(combined[i].transactionHash)) {
if (
combined[i].status !== ActivityStatus.pending ||
!combined[i].nonce ||
!minedNonces.includes(combined[i].nonce)
!minedNonces.includes(combined[i].nonce) ||
(combined[i].status === ActivityStatus.pending &&
combined[i].timestamp > currentTime - MAX_PENDING_TIME)
)
cleanArr.push(combined[i]);
}
Expand Down
3 changes: 2 additions & 1 deletion packages/extension/src/libs/market-data/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
import BigNumber from "bignumber.js";
import cacheFetch from "../cache-fetch";
import { CoingeckoPlatform } from "@enkryptcom/types";
const COINGECKO_ENDPOINT = "https://api.coingecko.com/api/v3/";
const COINGECKO_ENDPOINT = "https://partners.mewapi.io/coingecko/api/v3/";
const FIAT_EXCHANGE_RATE_ENDPOINT =
"https://mainnet.mewwallet.dev/v2/prices/exchange-rates";
const REFRESH_DELAY = 1000 * 60 * 5;
Expand Down Expand Up @@ -142,6 +142,7 @@ class MarketData {
)
.then((res) => res.json())
.then((json) => {
console.log(json);
const allTokens = json as CoinGeckoToken[];
const tokens: Record<string, CoinGeckoToken> = {};
allTokens.forEach((token) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ export class ChangellySwapProvider extends SwapProvider {
urlSearchParams.append("vs_currencies", "usd");

const pricesRes = await fetch(
`https://api.coingecko.com/api/v3/simple/price?${urlSearchParams.toString()}`
`https://partners.mewapi.io/coingecko/api/v3/simple/price?${urlSearchParams.toString()}`
);

const prices = await pricesRes.json();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ onMounted(async () => {
params.append("ids", network.value.coingeckoID!);
params.append("vs_currencies", "usd");
fetch(
`https://api.coingecko.com/api/v3/simple/price?${params.toString()}`
`https://partners.mewapi.io/coingecko/api/v3/simple/price?${params.toString()}`
)
.then((res) => {
clearTimeout(timeoutId);
Expand Down
5 changes: 5 additions & 0 deletions packages/hw-wallets/src/configs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,11 @@ const bip44Paths = {
basePath: "m/44'/60'/0'/0",
label: "Ethereum",
},
rootstock: {
path: "m/44'/137'/0'/0/{index}",
basePath: "m/44'/137'/0'/0",
label: "Rootstock",
},
rootstockLedger: {
path: "m/44'/137'/0'/{index}",
basePath: "m/44'/137'/0'/0",
Expand Down
1 change: 1 addition & 0 deletions packages/hw-wallets/src/trezor/configs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@ const supportedPaths = {
[NetworkNames.EthereumClassic]: [bip44Paths.ethereumClassic],
[NetworkNames.Ropsten]: [bip44Paths.ethereumTestnet],
[NetworkNames.Goerli]: [bip44Paths.ethereumTestnet],
[NetworkNames.Rootstock]: [bip44Paths.rootstock],
};
export { supportedPaths };
2 changes: 1 addition & 1 deletion packages/hw-wallets/src/trezor/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ class TrezorEthereum implements HWWalletProvider {
}).then((result) => {
if (!result.success)
throw new Error((result.payload as any).error as string);
const rv = BigInt(result.payload.v.replace("0x", ""));
const rv = BigInt(parseInt(result.payload.v, 16));
const cv = tx.common.chainId() * 2n + 35n;
return toRpcSig(
bigIntToHex(rv - cv),
Expand Down

2 comments on commit 22700f1

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.