Describe the bug
The browser extension fails to sign TRON smart-contract transactions requested by a dApp
(e.g. a standard TRC-20 approve on USDT TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t). Connecting
works and the tx is shown with a fee, but pressing Confirm throws and the dApp never receives
a signature. The same transaction signs fine in TronLink and in Trust Wallet mobile, so the
transaction is valid — only recent desktop-extension builds are affected.
Error (extension DevTools console):
TypeError: Cannot read properties of undefined (reading 'Tron')
at TronService.signTransaction (background.js)
To Reproduce
- Connect the browser extension to a TRON dApp.
- Request a USDT (TRC-20)
approve.
- Click Confirm.
- Error appears; the dApp never receives a signature.
Expected behavior
The transaction is signed and returned to the dApp (as it already is in TronLink and Trust Wallet mobile).
Additional context
Root cause, traced on the shipped background.js:
- The crash is in the Tronify path:
rentEnergyForTransaction → getSwapDomain → reads
AmberDomainType.Tron, but the Amber module (import_trust_sdk$15) is undefined.
- Version bisect:
| Version |
Bundler |
Result |
| 2.91.2 |
webpack (__webpack_require__, eager) |
works |
| 2.91.4 / 2.91.5 / 26.x |
esbuild (import_trust_sdk$15, lazy) |
crash |
- Regression introduced in v2.91.3/2.91.4 with the webpack→esbuild switch: under esbuild the
Amber module isn't initialized before getSwapDomain uses it in the service worker → undefined
→ crash. Only the dApp/WalletConnect signing path is affected (in-app USDT send works).
Suggested fix: eagerly initialize the Amber module before the Tronify path calls getSwapDomain
(or guard / fall back to the regular fee on error). Interim: roll back the
extension-tronify-enabled experiment.
Describe the bug
The browser extension fails to sign TRON smart-contract transactions requested by a dApp
(e.g. a standard TRC-20
approveon USDTTR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t). Connectingworks and the tx is shown with a fee, but pressing Confirm throws and the dApp never receives
a signature. The same transaction signs fine in TronLink and in Trust Wallet mobile, so the
transaction is valid — only recent desktop-extension builds are affected.
Error (extension DevTools console):
TypeError: Cannot read properties of undefined (reading 'Tron')
at TronService.signTransaction (background.js)
To Reproduce
approve.Expected behavior
The transaction is signed and returned to the dApp (as it already is in TronLink and Trust Wallet mobile).
Additional context
Root cause, traced on the shipped
background.js:rentEnergyForTransaction→getSwapDomain→ readsAmberDomainType.Tron, but the Amber module (import_trust_sdk$15) isundefined.__webpack_require__, eager)import_trust_sdk$15, lazy)Amber module isn't initialized before
getSwapDomainuses it in the service worker →undefined→ crash. Only the dApp/WalletConnect signing path is affected (in-app USDT send works).
Suggested fix: eagerly initialize the Amber module before the Tronify path calls
getSwapDomain(or guard / fall back to the regular fee on error). Interim: roll back the
extension-tronify-enabledexperiment.