Conversation
Signed-off-by: rmeena840 <rmeena840@gmail.com>
Contributor
Reviewer's guide (collapsed on small PRs)Reviewer's GuideAligns nBTC controller, UI, and server types with updated indexer/rpc type definitions and API expectations, including a new setupId, updated BTC indexer call, expanded Sui indexer mock interface, and corrected Redeem type imports and status labels. Class diagram for updated nBTC controller and indexer RPC typesclassDiagram
class Controller {
+ BtcIndexerRpc btcindexer
+ SuiIndexerRpc suiIndexer
+ BitcoinNetworkType network
+ ParamsDB paramsDB
+ number setupId
}
class BtcIndexerRpc {
+ nbtcMintTxsBySuiAddr(suiAddr: string)
+ depositsBySender(btcAddr: string, setupId: number)
}
class SuiIndexerRpc {
+ finalizeRedeems()
+ putRedeemTx()
+ getBroadcastedRedeemTxIds()
+ confirmRedeem()
+ redeemsBySuiAddr()
+ getConfirmingRedeems()
+ updateRedeemStatus()
+ updateRedeemStatuses()
}
Controller --> BtcIndexerRpc : uses
Controller --> SuiIndexerRpc : uses
File-Level Changes
Assessment against linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Contributor
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- The new
setupId: number = 1field inControlleris a hard-coded magic value with a TODO; consider deriving it deterministically fromnetwork(e.g., via a mapping or config) or injecting it via the constructor so behavior is explicit and testable. - The change to
depositsBySender(btcAddr, this.setupId)alters the second argument from a network enum to a numeric setup ID; if both are still needed, consider overloading or wrapping this call to avoid conflating concepts and to keep the caller API self-explanatory.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The new `setupId: number = 1` field in `Controller` is a hard-coded magic value with a TODO; consider deriving it deterministically from `network` (e.g., via a mapping or config) or injecting it via the constructor so behavior is explicit and testable.
- The change to `depositsBySender(btcAddr, this.setupId)` alters the second argument from a network enum to a numeric setup ID; if both are still needed, consider overloading or wrapping this call to avoid conflating concepts and to keep the caller API self-explanatory.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Signed-off-by: rmeena840 <rmeena840@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Closes: #825
Author Checklist
All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues._
I have...
!to the type prefix if API or client breaking changeSummary by Sourcery
Align NBTC controller, tests, and UI with updated indexer and RPC types while adjusting redeem flow status messaging.
Bug Fixes:
Enhancements: