From 3ced8a5bc833342f1825a8cf92bab195011112c2 Mon Sep 17 00:00:00 2001 From: kvhnuke <10602065+kvhnuke@users.noreply.github.com> Date: Tue, 9 Jan 2024 13:26:01 -0800 Subject: [PATCH 1/4] devop: prep release --- packages/extension/package.json | 2 +- packages/extension/src/providers/ethereum/networks/aat.ts | 1 - .../src/providers/polkadot/methods/dot_signer_signRaw.ts | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/extension/package.json b/packages/extension/package.json index ca80c10f8..fefbf1342 100644 --- a/packages/extension/package.json +++ b/packages/extension/package.json @@ -1,6 +1,6 @@ { "name": "@enkryptcom/extension", - "version": "1.30.0", + "version": "1.31.0", "private": true, "scripts": { "zip": "cd dist; zip -r release.zip *;", diff --git a/packages/extension/src/providers/ethereum/networks/aat.ts b/packages/extension/src/providers/ethereum/networks/aat.ts index 753dde9a8..954d6b479 100644 --- a/packages/extension/src/providers/ethereum/networks/aat.ts +++ b/packages/extension/src/providers/ethereum/networks/aat.ts @@ -2,7 +2,6 @@ import { NetworkNames } from "@enkryptcom/types"; import { EvmNetwork, EvmNetworkOptions } from "../types/evm-network"; import { EtherscanActivity } from "../libs/activity-handlers"; import wrapActivityHandler from "@/libs/activity-state/wrap-activity-handler"; -import assetsInfoHandler from "@/providers/ethereum/libs/assets-handlers/assetinfo-mew"; const artheraTestOptions: EvmNetworkOptions = { name: NetworkNames.ArtheraTest, diff --git a/packages/extension/src/providers/polkadot/methods/dot_signer_signRaw.ts b/packages/extension/src/providers/polkadot/methods/dot_signer_signRaw.ts index e21bfe41b..b06aea475 100644 --- a/packages/extension/src/providers/polkadot/methods/dot_signer_signRaw.ts +++ b/packages/extension/src/providers/polkadot/methods/dot_signer_signRaw.ts @@ -16,7 +16,7 @@ const method: MiddlewareFunction = function ( if (!payload.params?.length) return res(getCustomError("Missing Params: signer_signPayload")); const reqPayload = payload.params[0] as SignerPayloadRaw; - if (reqPayload.type !== "bytes") + if (reqPayload.type !== "bytes" && reqPayload.type !== "payload") return res(getCustomError("type is not bytes: signer_signRaw")); this.KeyRing.getAccount(polkadotEncodeAddress(reqPayload.address)).then( (account) => { From 9e655077ae8fbfb2371c278669b5ef9cf863a55a Mon Sep 17 00:00:00 2001 From: kvhnuke <10602065+kvhnuke@users.noreply.github.com> Date: Wed, 10 Jan 2024 11:21:38 -0800 Subject: [PATCH 2/4] fix: assets loading for wrong network --- packages/extension/src/providers/ethereum/networks/aa.ts | 2 +- packages/extension/src/providers/ethereum/networks/aat.ts | 2 +- packages/extension/src/ui/action/views/network-assets/index.vue | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/extension/src/providers/ethereum/networks/aa.ts b/packages/extension/src/providers/ethereum/networks/aa.ts index b40a38806..8aa20b659 100644 --- a/packages/extension/src/providers/ethereum/networks/aa.ts +++ b/packages/extension/src/providers/ethereum/networks/aa.ts @@ -13,7 +13,7 @@ const artheraOptions: EvmNetworkOptions = { isTestNetwork: false, currencyName: "AA", currencyNameLong: "Arthera", - node: "wss://ws.arthera.net", + node: "https://rpc.arthera.net", icon: require("./icons/aa.svg"), activityHandler: wrapActivityHandler(EtherscanActivity), }; diff --git a/packages/extension/src/providers/ethereum/networks/aat.ts b/packages/extension/src/providers/ethereum/networks/aat.ts index 954d6b479..5ddff0941 100644 --- a/packages/extension/src/providers/ethereum/networks/aat.ts +++ b/packages/extension/src/providers/ethereum/networks/aat.ts @@ -5,7 +5,7 @@ import wrapActivityHandler from "@/libs/activity-state/wrap-activity-handler"; const artheraTestOptions: EvmNetworkOptions = { name: NetworkNames.ArtheraTest, - name_long: "Arthera", + name_long: "Arthera Test", homePage: "https://arthera.net/", blockExplorerTX: "https://explorer-test.arthera.net/tx/[[txHash]]", blockExplorerAddr: "https://explorer-test.arthera.net/address/[[address]]", diff --git a/packages/extension/src/ui/action/views/network-assets/index.vue b/packages/extension/src/ui/action/views/network-assets/index.vue index 1fca880d5..26046ee70 100644 --- a/packages/extension/src/ui/action/views/network-assets/index.vue +++ b/packages/extension/src/ui/action/views/network-assets/index.vue @@ -97,9 +97,11 @@ const selected: string = route.params.id as string; const updateAssets = () => { isLoading.value = true; assets.value = []; + const currentNetwork = selectedNetworkName.value; props.network .getAllTokenInfo(props.accountInfo.selectedAccount?.address || "") .then((_assets) => { + if (selectedNetworkName.value !== currentNetwork) return; assets.value = _assets; isLoading.value = false; }); From 1ef2ab5f04235210da22545ea8e1dfb4bc802e55 Mon Sep 17 00:00:00 2001 From: kvhnuke <10602065+kvhnuke@users.noreply.github.com> Date: Wed, 10 Jan 2024 11:28:19 -0800 Subject: [PATCH 3/4] fix: network ordering when testnets active --- .../views/add-network/views/add-network-list.vue | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/extension/src/ui/action/views/add-network/views/add-network-list.vue b/packages/extension/src/ui/action/views/add-network/views/add-network-list.vue index cc0032711..ca0897db4 100644 --- a/packages/extension/src/ui/action/views/add-network/views/add-network-list.vue +++ b/packages/extension/src/ui/action/views/add-network/views/add-network-list.vue @@ -108,9 +108,10 @@ const searchAllNetworks = computed(() => { a.name_long.toLowerCase().startsWith(searchInput.value.toLowerCase()) ); }); -onBeforeMount(async () => { + +const setNetworkLists = async (isTestActive: boolean) => { const allNetworksNotTestNets = (await getAllNetworksAndStatus()) - .filter(({ isTestNetwork }) => !isTestNetwork) + .filter(({ isTestNetwork }) => !isTestNetwork || isTestActive) .sort((a, b) => a.name_long.localeCompare(b.name_long)); const popularNetworks = allNetworksNotTestNets @@ -119,16 +120,15 @@ onBeforeMount(async () => { all.value = allNetworksNotTestNets; popular.value = popularNetworks; +}; + +onBeforeMount(async () => { + await setNetworkLists(showTestNets.value); }); const onTestNetCheck = async () => { showTestNets.value = !showTestNets.value; - - if (showTestNets.value) { - all.value = await getAllNetworksAndStatus(); - } else { - all.value = all.value.filter(({ isTestNetwork }) => !isTestNetwork); - } + await setNetworkLists(showTestNets.value); }; const onToggle = async (networkName: string, isActive: boolean) => { From dc9b9843c9335a531ed8e85ab581b7bdc94f0478 Mon Sep 17 00:00:00 2001 From: kvhnuke <10602065+kvhnuke@users.noreply.github.com> Date: Wed, 10 Jan 2024 15:16:38 -0800 Subject: [PATCH 4/4] fix: dynamic component rendering --- packages/extension/src/ui/action/App.vue | 1 + .../extension/src/ui/action/views/send-transaction/index.vue | 1 + 2 files changed, 2 insertions(+) diff --git a/packages/extension/src/ui/action/App.vue b/packages/extension/src/ui/action/App.vue index 47b555068..c2c2bd430 100644 --- a/packages/extension/src/ui/action/App.vue +++ b/packages/extension/src/ui/action/App.vue @@ -53,6 +53,7 @@ = { [ProviderName.bitcoin]: SendTransactionBTC, [ProviderName.enkrypt]: null, }; + const layout = shallowRef(); const route = useRoute(); const networkName: string = route.params.id as string;