Skip to content
Draft
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
5 changes: 3 additions & 2 deletions packages/tron-wallet-snap/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Add `bip44:discover` support to `createAccounts`: checks on-chain activity across all Tron networks before persisting; returns `[]` if no activity to signal end-of-discovery to the client. ([#56](https://github.com/MetaMask/internal-snaps/pull/56))
- Add `endowment:keyring` capabilities to manifest declaring the `tron:728126428` scope, hexadecimal private key export, and BIP-44 derivation strategies. ([#56](https://github.com/MetaMask/internal-snaps/pull/56))
- Wire Core messenger endowment and instantiate `RemoteFeatureFlagsProvider` and `AssetsProvider` from `@metamask/snap-networks-utils` v1.0.0 (plumbing only; no Core routing yet).
- Route fungible asset reads through the shared `AssetsProvider` from `@metamask/snap-networks-utils` using account-scoped `AssetsController:getAccountAssetByID`, `AssetsController:getAccountAssetsByIDs`, and `AssetsController:getAccountAssetsByScope` actions based on migration stage (TRX, TRC10, TRC20). Protocol assets (energy, bandwidth, staking, lock/withdrawal, rewards) remain Snap-owned. Resolution order: remote feature flags → Off default.

### Fixed
### Changed

- Fix `bip44:discover` always failing due to `Network` enum being compiled bidirectionally by TypeScript when initialised from another enum's members, causing `Object.values(Network)` to include human-readable names (`"Mainnet"` etc.) alongside scope IDs; replaced enum initialisers with string literals so TypeScript emits a one-way mapping. ([#101](https://github.com/MetaMask/internal-snaps/pull/101))
- Update `snap.manifest.json` bundle shasum ([#82](https://github.com/MetaMask/internal-snaps/pull/82))

## [2.0.0]

Expand Down
3 changes: 3 additions & 0 deletions packages/tron-wallet-snap/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@
"test:verbose": "NODE_OPTIONS=--experimental-vm-modules jest --verbose",
"test:watch": "NODE_OPTIONS=--experimental-vm-modules jest --watch"
},
"dependencies": {
"@metamask/snap-networks-utils": "workspace:^"
},
"devDependencies": {
"@metamask/assets-controller": "^13.0.0",
"@metamask/auto-changelog": "^6.1.1",
Expand Down
23 changes: 4 additions & 19 deletions 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": "K7bx3ON8enrNS41Zaa7mCpiK5jmUOoo4DerjiQ3VmDw=",
"shasum": "mmM+5X+wVXS5Xhoa2fhXaeB0IKoqwRduZ7vY7iU4wFs=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand All @@ -23,22 +23,7 @@
},
"initialPermissions": {
"endowment:keyring": {
"allowedOrigins": ["https://portfolio.metamask.io"],
"capabilities": {
"scopes": ["tron:728126428"],
"privateKey": {
"exportFormats": [
{
"encoding": "hexadecimal"
}
]
},
"bip44": {
"deriveIndex": true,
"deriveIndexRange": true,
"discover": true
}
}
"allowedOrigins": ["https://portfolio.metamask.io"]
},
"snap_getBip32Entropy": [
{
Expand Down Expand Up @@ -66,10 +51,10 @@
},
"endowment:messenger": {
"actions": [
"RemoteFeatureFlagController:getState",
"AssetsController:getAccountAssetByID",
"AssetsController:getAccountAssetsByIDs",
"AssetsController:getAccountAssetsByScope"
"AssetsController:getAccountAssetsByScope",
"RemoteFeatureFlagController:getState"
]
}
},
Expand Down
2 changes: 2 additions & 0 deletions packages/tron-wallet-snap/src/context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,8 @@ const assetsService = new AssetsService({
priceApiClient,
tokenApiClient,
snapClient,
coreMessenger,
assetsProvider,
});

const transactionsService = new TransactionsService({
Expand Down
Loading
Loading