From 9edd1192c2e370301614b2ca96b77ba1375e15be Mon Sep 17 00:00:00 2001 From: Gamaliel Padillo Date: Thu, 19 Dec 2024 15:52:27 -0800 Subject: [PATCH] fix: activity not showing in bnb --- .../extension/src/providers/ethereum/networks/arb-nova.ts | 3 ++- packages/extension/src/providers/ethereum/networks/bsc.ts | 4 +++- packages/extension/src/providers/ethereum/networks/holesky.ts | 3 ++- packages/extension/src/providers/ethereum/networks/op-bnb.ts | 3 ++- packages/extension/src/providers/ethereum/networks/palm.ts | 3 ++- 5 files changed, 11 insertions(+), 5 deletions(-) diff --git a/packages/extension/src/providers/ethereum/networks/arb-nova.ts b/packages/extension/src/providers/ethereum/networks/arb-nova.ts index 527404a50..7c299eb0d 100644 --- a/packages/extension/src/providers/ethereum/networks/arb-nova.ts +++ b/packages/extension/src/providers/ethereum/networks/arb-nova.ts @@ -3,6 +3,7 @@ import { CoingeckoPlatform, NetworkNames } from '@enkryptcom/types'; import { EvmNetwork, EvmNetworkOptions } from '../types/evm-network'; import assetsInfoHandler from '@/providers/ethereum/libs/assets-handlers/assetinfo-mew'; import shNFTHandler from '@/libs/nft-handlers/simplehash'; +import wrapActivityHandler from '@/libs/activity-state/wrap-activity-handler'; const arbNovaOptions: EvmNetworkOptions = { name: NetworkNames.ArbitrumNova, @@ -20,7 +21,7 @@ const arbNovaOptions: EvmNetworkOptions = { coingeckoPlatform: CoingeckoPlatform.ArbitrumNova, assetsInfoHandler, NFTHandler: shNFTHandler, - activityHandler: () => Promise.resolve([]), + activityHandler: wrapActivityHandler(() => Promise.resolve([])), }; const arb = new EvmNetwork(arbNovaOptions); diff --git a/packages/extension/src/providers/ethereum/networks/bsc.ts b/packages/extension/src/providers/ethereum/networks/bsc.ts index 53a1fb00a..7eaebd53c 100644 --- a/packages/extension/src/providers/ethereum/networks/bsc.ts +++ b/packages/extension/src/providers/ethereum/networks/bsc.ts @@ -2,6 +2,8 @@ import icon from './icons/bsc.svg'; import { CoingeckoPlatform, NetworkNames } from '@enkryptcom/types'; import { EvmNetwork, EvmNetworkOptions } from '../types/evm-network'; import assetsInfoHandler from '@/providers/ethereum/libs/assets-handlers/assetinfo-mew'; +import { EtherscanActivity } from '../libs/activity-handlers'; +import wrapActivityHandler from '@/libs/activity-state/wrap-activity-handler'; import shNFTHandler from '@/libs/nft-handlers/simplehash'; const bscOptions: EvmNetworkOptions = { @@ -21,7 +23,7 @@ const bscOptions: EvmNetworkOptions = { basePath: "m/44'/714'", NFTHandler: shNFTHandler, assetsInfoHandler, - activityHandler: () => Promise.resolve([]), + activityHandler: wrapActivityHandler(() => Promise.resolve([])), }; const bsc = new EvmNetwork(bscOptions); diff --git a/packages/extension/src/providers/ethereum/networks/holesky.ts b/packages/extension/src/providers/ethereum/networks/holesky.ts index f15cb90cd..cf5eac096 100644 --- a/packages/extension/src/providers/ethereum/networks/holesky.ts +++ b/packages/extension/src/providers/ethereum/networks/holesky.ts @@ -1,6 +1,7 @@ import icon from './icons/eth.svg'; import { NetworkNames } from '@enkryptcom/types'; import { EvmNetwork, EvmNetworkOptions } from '../types/evm-network'; +import wrapActivityHandler from '@/libs/activity-state/wrap-activity-handler'; const holeskyOptions: EvmNetworkOptions = { name: NetworkNames.Holesky, @@ -14,7 +15,7 @@ const holeskyOptions: EvmNetworkOptions = { currencyNameLong: 'Holesky', node: 'wss://nodes.mewapi.io/ws/holesky', icon, - activityHandler: () => Promise.resolve([]), + activityHandler: wrapActivityHandler(() => Promise.resolve([])), }; const holesky = new EvmNetwork(holeskyOptions); diff --git a/packages/extension/src/providers/ethereum/networks/op-bnb.ts b/packages/extension/src/providers/ethereum/networks/op-bnb.ts index 330ad7a63..a76288bac 100644 --- a/packages/extension/src/providers/ethereum/networks/op-bnb.ts +++ b/packages/extension/src/providers/ethereum/networks/op-bnb.ts @@ -3,6 +3,7 @@ import { CoingeckoPlatform, NetworkNames } from '@enkryptcom/types'; import { EvmNetwork, EvmNetworkOptions } from '../types/evm-network'; import assetsInfoHandler from '@/providers/ethereum/libs/assets-handlers/assetinfo-mew'; import shNFTHandler from '@/libs/nft-handlers/simplehash'; +import wrapActivityHandler from '@/libs/activity-state/wrap-activity-handler'; const opBnbOptions: EvmNetworkOptions = { name: NetworkNames.OpBNB, @@ -20,7 +21,7 @@ const opBnbOptions: EvmNetworkOptions = { coingeckoPlatform: CoingeckoPlatform.OpBNB, assetsInfoHandler, NFTHandler: shNFTHandler, - activityHandler: () => Promise.resolve([]), + activityHandler: wrapActivityHandler(() => Promise.resolve([])), }; const op = new EvmNetwork(opBnbOptions); diff --git a/packages/extension/src/providers/ethereum/networks/palm.ts b/packages/extension/src/providers/ethereum/networks/palm.ts index 9b3e66fcf..12f2d37c7 100644 --- a/packages/extension/src/providers/ethereum/networks/palm.ts +++ b/packages/extension/src/providers/ethereum/networks/palm.ts @@ -2,6 +2,7 @@ import icon from './icons/palm.svg'; import { NetworkNames } from '@enkryptcom/types'; import { EvmNetwork, EvmNetworkOptions } from '../types/evm-network'; import shNFTHandler from '@/libs/nft-handlers/simplehash'; +import wrapActivityHandler from '@/libs/activity-state/wrap-activity-handler'; // Palm network has an API but it seems broken (DNS won't resolve) // @see https://palm.chainlens.com/api/swagger-ui/index.html @@ -20,7 +21,7 @@ const palmNetworkOptions: EvmNetworkOptions = { icon, coingeckoID: 'palm-ai', NFTHandler: shNFTHandler, - activityHandler: () => Promise.resolve([]), + activityHandler: wrapActivityHandler(() => Promise.resolve([])), }; const palmNetwork = new EvmNetwork(palmNetworkOptions);