Conversation
|
Hi @Johnosezele, this is ready for review when you have a chance. It implements the selected broadcast endpoint fix discussed in #123. |
|
Not blocking, just something I noticed while reading through: |
|
tACK f91ca62 on Linux. tested locally across send_page_test.dart and blockchain_service_test.dart everything is green and static analysis is clean. verified that broadcasting now resolves through endpointConfigProvider and passes the active EndpointConfig directly to the client factory. |
Johnosezele
left a comment
There was a problem hiding this comment.
@j-kon bug fix looks right, instead of resolving the endpoint in the SendPage UI and changing the factory to take EndpointConfig, resolve inside blockchainClientFactoryProvider and leave the typedef as was.
You can remove backendForNetwork in another commit here, kindly add a commit description for it and edit PR and corresponding issue
Keep the send UI and blockchain client factory keyed by wallet network while resolving the user's selected endpoint inside the provider. Add focused provider and UI coverage for the boundary.
Remove backendForNetwork because client creation now derives the backend directly from the resolved endpoint configuration. The helper only reflected defaults and had no remaining callers.
Remove the now-unused constants import and apply the repository formatter to the provider regression test.
f91ca62 to
3910c97
Compare
|
Addressed the requested changes:
|
Summary
BlockchainClientFactorykeyed byWalletNetworkEndpointConfiginsideblockchainClientFactoryProviderbackendForNetworkhelper in a separate commitWhy
Wallet sync and fee estimates already honor the server selected in the demo app, but transaction broadcast created a new client from
defaultEndpoints. Switching away from an unavailable default server could therefore restore sync while sends still tried the unavailable server.The send page now passes the active wallet network to the existing factory contract. The provider resolves the current endpoint selection for that network and creates the broadcast client from the resolved client type and URL.
Validation
dart format --output=none --set-exit-if-changed bdk_demo/lib bdk_demo/testdart analyze --fatal-infos --fatal-warnings lib test exampleflutter analyzedart testflutter testCloses #123