Skip to content
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/tron-wallet-snap/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added

- Add Core messenger plumbing (`coreMessenger`, `RemoteFeatureFlagsProvider`, `AssetsProvider`) for upcoming AssetsController migration ([#95](https://github.com/MetaMask/internal-snaps/pull/95))
- Add `CoreAssetsAdapter` and initialize it in `AssetsService` for upcoming AssetsController routing ([#127](https://github.com/MetaMask/internal-snaps/pull/127))
- Route fungible asset reads through Core AssetsController when migration is active ([#127](https://github.com/MetaMask/internal-snaps/pull/127))

### Fixed

Expand Down
2 changes: 1 addition & 1 deletion packages/tron-wallet-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/internal-snaps.git"
},
"source": {
"shasum": "1GetcX2q26WkRq3aUu5hrAElNLvZXEfzEK2rAZv6ddI=",
"shasum": "PK+oD+ZnCIhUsMHOMTX2UeJo1cRp15+XVTXQsfTKN4Y=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ describe('KeyringHandler', () => {
}),
} as unknown as jest.Mocked<AccountsService>;
mockAssetsService = {
getByKeyringAccountId: jest.fn().mockResolvedValue([]),
getAccountAssets: jest.fn().mockResolvedValue([]),
} as unknown as jest.Mocked<AssetsService>;
mockTransactionsService = {
checkAddressActivity: jest.fn(),
Expand Down Expand Up @@ -649,7 +649,7 @@ describe('KeyringHandler', () => {
const result = await keyringHandler.getAccountAssets(mockAccount.id);

expect(result).toStrictEqual([]);
expect(mockAssetsService.getByKeyringAccountId).toHaveBeenCalledWith(
expect(mockAssetsService.getAccountAssets).toHaveBeenCalledWith(
mockAccount.id,
);
});
Expand Down
5 changes: 2 additions & 3 deletions packages/tron-wallet-snap/src/handlers/keyring/keyring.ts

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Only a rename

Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ export class KeyringHandler implements KeyringSnapRpc {
this.#logger.info('Listing account assets', { accountId });

const assetEntities =
await this.#assetsService.getByKeyringAccountId(accountId);
await this.#assetsService.getAccountAssets(accountId);
const result = assetEntities
.filter(
(asset) =>
Expand Down Expand Up @@ -280,8 +280,7 @@ export class KeyringHandler implements KeyringSnapRpc {

await this.#getAccountOrThrow(accountId);

const assetsList =
await this.#assetsService.getByKeyringAccountId(accountId);
const assetsList = await this.#assetsService.getAccountAssets(accountId);

const assetsToUse = assetsList
.filter((asset) => assets.includes(asset.assetType))
Expand Down
Loading
Loading