fix(ledger): use parentAccountId if exists#376
Conversation
🦋 Changeset detectedLatest commit: a1141ab The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
0637aaa to
676e8aa
Compare
There was a problem hiding this comment.
Pull Request Overview
This PR updates the ledger-connector to emit a parent account’s ID when available instead of always using the account’s own ID.
- Changed the
$currentAccountIdobservable to preferparentAccountId. - Adjusted the pipe to inline the fallback logic.
Comments suppressed due to low confidence (1)
packages/widget/src/providers/ledger/ledger-connector.ts:48
- Add a unit test case where an account has a
parentAccountIdto verify that the observable emits the parent ID rather than the account’s ownid.
map((v) => v?.parentAccountId || v?.id)
676e8aa to
d459cca
Compare
There was a problem hiding this comment.
Pull Request Overview
This PR updates the ledger connector logic to prioritize using parentAccountId for the current account when available.
- Updates the RXJS pipe mapping logic in the ledger connector to use parentAccountId if it exists, otherwise fallback to id.
- Updates the changeset file to reflect the patch version and title.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| packages/widget/src/providers/ledger/ledger-connector.ts | Adjusted logic to use parentAccountId if exists |
| .changeset/warm-hoops-enter.md | Updated changeset message to match new logic |
d459cca to
a1141ab
Compare
Added
Description of new functionality, feature, or content that has been added in this pull request.
Changed
Description of the modifications made to existing functionality, feature, or content in this pull request. This could include changes to code, CI, documentation, etc.