Skip to content
This repository was archived by the owner on Aug 7, 2026. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/snap/snap.manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/MetaMask/snap-solana-wallet.git"
},
"source": {
"shasum": "WQc7czpO0Kr5fD5MLK7A6XgyBoI+BH6Vevn288QiWag=",
"shasum": "YUgx/nvWBS3TnFVDPF47wtL9fUWPz+70+wNaGjY3AsI=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jest.mock('../../../../snapContext', () => ({
getAll: jest.fn(),
},
assetsService: {
getAccountAssetsByScope: jest.fn(),
getAccountAssetsForAllActiveScopes: jest.fn(),
},
configProvider: {
getActiveNetworks: jest.fn(),
Expand All @@ -68,7 +68,9 @@ const setupTest = () => {
(configProvider.getActiveNetworks as jest.Mock).mockResolvedValue([
'solana:mainnet',
]);
(assetsService.getAccountAssetsByScope as jest.Mock).mockResolvedValue([
(
assetsService.getAccountAssetsForAllActiveScopes as jest.Mock
).mockResolvedValue([
{
assetType: KnownCaip19Id.SolMainnet,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@ import { DEFAULT_SEND_CONTEXT } from '../../../../features/send/render';
import { Send } from '../../../../features/send/Send';
import type { SendContext } from '../../../../features/send/types';
import {
accountsService,
assetsService,
configProvider,
priceApiClient,
state,
accountsService,
} from '../../../../snapContext';
import type { UnencryptedStateValue } from '../../../services/state/State';
import { trackError } from '../../../utils/errors';
Expand All @@ -25,10 +24,9 @@ export const refreshSend: OnCronjobHandler = async () => {

logger.info(`Background event triggered`);

const [accounts, activeNetworks, mapInterfaceNameToId, preferences] =
const [keyringAccounts, mapInterfaceNameToId, preferences] =
await Promise.all([
accountsService.getAll(),
configProvider.getActiveNetworks(),
state.getKey<UnencryptedStateValue['mapInterfaceNameToId']>(
'mapInterfaceNameToId',
),
Expand All @@ -37,10 +35,8 @@ export const refreshSend: OnCronjobHandler = async () => {

const assets = (
await Promise.all(
accounts.flatMap((account) =>
activeNetworks.map((network) =>
assetsService.getAccountAssetsByScope(network, account.id),
),
keyringAccounts.map((account) =>
assetsService.getAccountAssetsForAllActiveScopes(account.id),
),
)
).flat();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,6 @@ describe('SolanaKeyring', () => {
});

mockAssetsService = {
fetch: jest.fn().mockResolvedValue(MOCK_ASSET_ENTITIES),
saveMany: jest.fn(),
getAccountAssetsForAllActiveScopes: jest.fn(),
getAccountAssetsByIDs: jest.fn(),
getNativeAssetTypes: jest
Expand Down Expand Up @@ -349,7 +347,7 @@ describe('SolanaKeyring', () => {
} as unknown as AssetEntity;

jest.spyOn(mockAssetsService, 'getAccountAssetsByIDs').mockResolvedValue({
[KnownCaip19Id.SolMainnet]: invalidAsset,
[invalidAsset.assetType]: invalidAsset,
});

await expect(
Expand Down
264 changes: 0 additions & 264 deletions packages/snap/src/core/services/assets/AssetsRepository.test.ts

This file was deleted.

Loading
Loading