Skip to content

Commit abef445

Browse files
feat: update Tron methods to match Snap methods (#401)
<!-- Thanks for your contribution! Take a moment to answer these questions so that reviewers have the information they need to properly understand your changes: * What is the current state of things and why does it need to change? * What is the solution your changes offer and how does it work? Are there any issues or other links reviewers should consult to understand this pull request better? For instance: * Fixes #12345 * See: #67890 --> Related to: MetaMask/snap-tron-wallet#124 ## Examples <!-- Are there any examples of this change being used in another repository? When considering changes to the MetaMask module template, it's strongly preferred that the change be experimented with in another repository first. This gives reviewers a better sense of how the change works, making it less likely the change will need to be reverted or adjusted later. --> <!-- CURSOR_SUMMARY --> --- > [!NOTE] > Adds `signMessage` and `signTransaction` to `TrxMethod` and deprecates `signMessageV2`/`verifyMessageV2`. > > - **TRON types (`packages/keyring-api/src/trx/types.ts`)**: > - **`TrxMethod` enum**: Add `signMessage` and `signTransaction`. > - Mark `signMessageV2` as deprecated (use `signMessage`), and `verifyMessageV2` as deprecated/not supported. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 005f269. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
1 parent 8ad41fc commit abef445

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

packages/keyring-api/src/trx/types.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,12 @@ export const TrxAddressStruct = definePattern(
2222
* Supported TRON methods.
2323
*/
2424
export enum TrxMethod {
25+
SignMessage = 'signMessage',
26+
SignTransaction = 'signTransaction',
27+
28+
// @deprecated Use `SignMessage` instead.
2529
SignMessageV2 = 'signMessageV2',
30+
// @deprecated Not supported anymore.
2631
VerifyMessageV2 = 'verifyMessageV2',
2732
}
2833

0 commit comments

Comments
 (0)