Skip to content

Commit

Permalink
devop: merge
Browse files Browse the repository at this point in the history
  • Loading branch information
kvhnuke committed Oct 23, 2024
2 parents c49dc6d + 0bf8040 commit 4a762a1
Show file tree
Hide file tree
Showing 31 changed files with 1,102 additions and 509 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
diff --git a/lib/cjs/constants.js b/lib/cjs/constants.js
index 5772226ef895bff7a6f7fa291fc1138b10049dab..c65a57bf3535e6c6d4d894657da9b571d7f40d8a 100644
--- a/lib/cjs/constants.js
+++ b/lib/cjs/constants.js
@@ -29,7 +29,7 @@ exports.AMPLITUDE_ORIGINS_MAP = {
EU: exports.AMPLITUDE_ORIGIN_EU,
STAGING: exports.AMPLITUDE_ORIGIN_STAGING,
};
-exports.AMPLITUDE_VISUAL_TAGGING_SELECTOR_SCRIPT_URL = 'https://cdn.amplitude.com/libs/visual-tagging-selector-1.0.0-alpha.js.gz';
+exports.AMPLITUDE_VISUAL_TAGGING_SELECTOR_SCRIPT_URL = '';
// This is the class name used by the visual tagging selector to highlight the selected element.
// Should not use this class in the selector.
exports.AMPLITUDE_VISUAL_TAGGING_HIGHLIGHT_CLASS = 'amp-visual-tagging-selector-highlight';
diff --git a/lib/esm/constants.js b/lib/esm/constants.js
index 17e665c05e62e488032673d312a69432297cb6fd..7d75951a29fad79ba49c83c076785294166dd0bf 100644
--- a/lib/esm/constants.js
+++ b/lib/esm/constants.js
@@ -27,7 +27,7 @@ export var AMPLITUDE_ORIGINS_MAP = {
EU: AMPLITUDE_ORIGIN_EU,
STAGING: AMPLITUDE_ORIGIN_STAGING,
};
-export var AMPLITUDE_VISUAL_TAGGING_SELECTOR_SCRIPT_URL = 'https://cdn.amplitude.com/libs/visual-tagging-selector-1.0.0-alpha.js.gz';
+export var AMPLITUDE_VISUAL_TAGGING_SELECTOR_SCRIPT_URL = '';
// This is the class name used by the visual tagging selector to highlight the selected element.
// Should not use this class in the selector.
export var AMPLITUDE_VISUAL_TAGGING_HIGHLIGHT_CLASS = 'amp-visual-tagging-selector-highlight';
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
"resolutions": {
"@ledgerhq/compressjs": "https://registry.yarnpkg.com/@favware/skip-dependency/-/skip-dependency-1.2.1.tgz",
"@noble/hashes": "^1.4.0",
"fork-ts-checker-webpack-plugin": "^6.5.3"
"fork-ts-checker-webpack-plugin": "^6.5.3",
"@amplitude/plugin-autocapture-browser@^1.0.2": "patch:@amplitude/plugin-autocapture-browser@npm%3A1.0.3#./.yarn/patches/@amplitude-plugin-autocapture-browser-npm-1.0.3-edb25bef55.patch"
}
}
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.44.4",
"version": "1.45.0",
"private": true,
"scripts": {
"zip": "cd dist; zip -r release.zip *;",
Expand Down
2 changes: 1 addition & 1 deletion packages/extension/src/libs/market-data/ethvm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export const getMarketInfoByIDs = (
return ethvmPost(
'{"operationName":null,"variables":{},"query":"{\\n getCoinGeckoTokenMarketDataByIds(coinGeckoTokenIds: [' +
params +
']) {\\n id\\n symbol\\n name\\n image\\n market_cap\\n market_cap_rank\\n high_24h\\n low_24h\\n price_change_24h\\n price_change_percentage_24h\\n sparkline_in_7d {\\n price\\n }\\n price_change_percentage_7d_in_currency\\n current_price\\n }\\n}\\n"}'
']) {\\n id\\n symbol\\n name\\n image\\n market_cap\\n market_cap_rank\\n high_24h\\n low_24h\\n price_change_24h\\n price_change_percentage_24h\\n sparkline_in_24h {\\n price\\n }\\n price_change_percentage_24h_in_currency\\n current_price\\n }\\n}\\n"}'
).then((json) => {
return json.data.getCoinGeckoTokenMarketDataByIds as CoinGeckoTokenMarket[];
});
Expand Down
4 changes: 2 additions & 2 deletions packages/extension/src/libs/market-data/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ export interface CoinGeckoTokenMarket {
low_24h: number;
price_change_24h: number;
price_change_percentage_24h: number;
sparkline_in_7d: { price: number[] };
price_change_percentage_7d_in_currency: number;
sparkline_in_24h: { price: number[] };
price_change_percentage_24h_in_currency: number;
}
export interface FiatMarket {
fiat_currency: string;
Expand Down
2 changes: 1 addition & 1 deletion packages/extension/src/manifest/base.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"run_at": "document_start"
}
],
"description": "Everything in the blockchain made easy",
"description": "The best multichain crypto wallet",
"icons": {
"16": "assets/img/icons/icon16.png",
"32": "assets/img/icons/icon32.png",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,10 +141,10 @@ export class BitcoinNetwork extends BaseNetwork {
contract: "",
decimals: this.decimals,
sparkline: marketData.length
? new Sparkline(marketData[0]!.sparkline_in_7d.price, 25).dataValues
? new Sparkline(marketData[0]!.sparkline_in_24h.price, 25).dataValues
: "",
priceChangePercentage: marketData.length
? marketData[0]!.price_change_percentage_7d_in_currency
? marketData[0]!.price_change_percentage_24h_in_currency
: 0,
};
return [nativeAsset];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -263,8 +263,8 @@ export default (
low_24h: 0,
price_change_24h: 0,
price_change_percentage_24h: 0,
sparkline_in_7d: { price: [] },
price_change_percentage_7d_in_currency: 0,
sparkline_in_24h: { price: [] },
price_change_percentage_24h_in_currency: 0,
};
}

Expand Down Expand Up @@ -303,9 +303,10 @@ export default (
valuef: formatFiatValue(currentPrice.toString()).value,
contract: address,
decimals: tokenInfo[address].decimals,
sparkline: new Sparkline(market.sparkline_in_7d.price, 25).dataValues,
sparkline: new Sparkline(market.sparkline_in_24h.price, 25)
.dataValues,
priceChangePercentage:
market.price_change_percentage_7d_in_currency || 0,
market.price_change_percentage_24h_in_currency || 0,
};
if (address !== NATIVE_TOKEN_ADDRESS) assets.push(asset);
else nativeAsset = asset;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,11 +160,13 @@ async function getPreconfiguredTokens(
).value,
decimals: assetDecimals,
sparkline: nativeAssetMarketData[index]
? new Sparkline(nativeAssetMarketData[index]?.sparkline_in_7d.price, 25)
.dataValues
? new Sparkline(
nativeAssetMarketData[index]?.sparkline_in_24h.price,
25
).dataValues
: "",
priceChangePercentage:
nativeAssetMarketData[index]?.price_change_percentage_7d_in_currency ??
nativeAssetMarketData[index]?.price_change_percentage_24h_in_currency ??
0,
contract: asset.address,
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,10 +156,11 @@ export class EvmNetwork extends BaseNetwork {
).value,
decimals: this.decimals,
sparkline: nativeMarketData
? new Sparkline(nativeMarketData.sparkline_in_7d.price, 25).dataValues
? new Sparkline(nativeMarketData.sparkline_in_24h.price, 25)
.dataValues
: "",
priceChangePercentage:
nativeMarketData?.price_change_percentage_7d_in_currency ?? 0,
nativeMarketData?.price_change_percentage_24h_in_currency ?? 0,
contract: NATIVE_TOKEN_ADDRESS,
};

Expand Down Expand Up @@ -273,11 +274,11 @@ export class EvmNetwork extends BaseNetwork {
marketInfo.current_price?.toString() ?? "0"
).value;
asset.sparkline = new Sparkline(
marketInfo.sparkline_in_7d.price,
marketInfo.sparkline_in_24h.price,
25
).dataValues;
asset.priceChangePercentage =
marketInfo.price_change_percentage_7d_in_currency || 0;
marketInfo.price_change_percentage_24h_in_currency || 0;
}

return asset;
Expand Down
11 changes: 5 additions & 6 deletions packages/extension/src/providers/kadena/libs/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ class API implements ProviderAPIInterface {
this.displayAddress(address),
chainId
);

if (balance.result.status === "failure") {
const error = balance.result.error as { message: string | undefined };
const message = error.message ?? "Unknown error retrieving balances";
Expand All @@ -78,11 +77,11 @@ class API implements ProviderAPIInterface {
}
throw new Error(message);
}

const balanceValue = parseFloat(balance.result.data.toString()).toFixed(
this.decimals
);

const balanceValue = parseFloat(
balance.result.data.decimal
? balance.result.data.decimal
: balance.result.data.toString()
).toString();
return toBase(balanceValue, this.decimals);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,10 @@ export class KadenaNetwork extends BaseNetwork {
contract: "",
decimals: this.decimals,
sparkline: marketData.length
? new Sparkline(marketData[0]!.sparkline_in_7d.price, 25).dataValues
? new Sparkline(marketData[0]!.sparkline_in_24h.price, 25).dataValues
: "",
priceChangePercentage: marketData.length
? marketData[0]!.price_change_percentage_7d_in_currency
? marketData[0]!.price_change_percentage_24h_in_currency
: 0,
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,9 +166,9 @@ export class SubstrateNetwork extends BaseNetwork {
name: st.name,
symbol: st.symbol,
priceChangePercentage:
market[idx]?.price_change_percentage_7d_in_currency || 0,
market[idx]?.price_change_percentage_24h_in_currency || 0,
sparkline: market[idx]
? new Sparkline(market[idx]?.sparkline_in_7d.price, 25).dataValues
? new Sparkline(market[idx]?.sparkline_in_24h.price, 25).dataValues
: "",
value: market[idx]?.current_price?.toString() || "0",
valuef: formatFloatingPointValue(
Expand Down
4 changes: 2 additions & 2 deletions packages/extension/src/providers/solana/types/sol-network.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,10 +136,10 @@ export class SolanaNetwork extends BaseNetwork {
contract: "",
decimals: this.decimals,
sparkline: marketData.length
? new Sparkline(marketData[0]!.sparkline_in_7d.price, 25).dataValues
? new Sparkline(marketData[0]!.sparkline_in_24h.price, 25).dataValues
: "",
priceChangePercentage: marketData.length
? marketData[0]!.price_change_percentage_7d_in_currency
? marketData[0]!.price_change_percentage_24h_in_currency
: 0,
};
return [nativeAsset];
Expand Down
Loading

1 comment on commit 4a762a1

@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.