-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rollback signTron #301
Rollback signTron #301
Conversation
Warning Rate limit exceeded@haunv3 has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 23 minutes and 50 seconds before requesting another review. How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. WalkthroughThis update transitions the Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant EvmWallet
participant TronWeb
User->>EvmWallet: submitTronSmartContract(address, functionSelector, options, parameters, issuerAddress)
EvmWallet->>EvmWallet: Check if options is defined
EvmWallet->>EvmWallet: Set feeLimit if not provided
EvmWallet->>TronWeb: sign(transaction)
TronWeb-->>EvmWallet: Return signed transaction
EvmWallet-->>User: Return EvmResponse
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configuration File (
|
Code Coverage Summary
Diff against main
Results for commit: 4ce0852 Minimum allowed coverage is ♻️ This comment has been updated with latest results |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 3
Outside diff range, codebase verification and nitpick comments (5)
packages/oraidex-common/src/wallet.ts (5)
133-134
: Remove commented-out code.The commented-out code related to
TransactionBuilder
andTrx
should be removed to improve code readability.- // const transactionBuilder = new TransactionBuilder(this.tronWeb); - // const trx = new Trx(this.tronWeb);
149-149
: Avoid usingconsole.log
in production code.The
console.log
statement should be removed or replaced with a proper logging mechanism.- console.log("before building tx: ", issuerAddress, "options:", options); + // Use a proper logging mechanism instead of console.log + // logger.info("before building tx: ", issuerAddress, "options:", options);
151-158
: Remove commented-out code.The commented-out code related to
transactionBuilder.triggerSmartContract
should be removed to improve code readability.- // const transaction = await transactionBuilder.triggerSmartContract( - // address, - // functionSelector, - // !options?.feeLimit - // ? { ...options, feeLimit: 40 * 1e6 } // submitToCosmos costs about 40 TRX - // : options, - // parameters, - // ethToTronAddress(issuerAddress) - // );
175-175
: Avoid usingconsole.log
in production code.The
console.log
statement should be removed or replaced with a proper logging mechanism.- console.log("signed tx: ", singedTransaction); + // Use a proper logging mechanism instead of console.log + // logger.info("signed tx: ", singedTransaction);
181-185
: Remove commented-out code.The commented-out code related to
trx.sign
andtrx.sendRawTransaction
should be removed to improve code readability.- // sign from inject tronWeb - // const singedTransaction = await trx.sign(transaction.transaction); - // console.log("signed tx: ", singedTransaction); - // const result = await trx.sendRawTransaction(singedTransaction); - // return { transactionHash: result.transaction.txID };
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (2)
- packages/oraidex-common/package.json (1 hunks)
- packages/oraidex-common/src/wallet.ts (3 hunks)
Files skipped from review due to trivial changes (1)
- packages/oraidex-common/package.json
Additional comments not posted (1)
packages/oraidex-common/src/wallet.ts (1)
124-124
: Ensureoptions
parameter is provided.The method signature has been updated to enforce the presence of the
options
parameter, which enhances error handling.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- packages/oraidex-common/package.json (1 hunks)
Files skipped from review as they are similar to previous changes (1)
- packages/oraidex-common/package.json
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Summary by CodeRabbit
New Features
Bug Fixes