Repository navigation
Fix Credentials support in DepositPreAuth, AccountDelete, Payment, EscrowFinish, PaymentChannelClaim #1234
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
Merged
achowdhry-ripple
merged 27 commits into
staging
from
copilot/fix-bee91805-20d7-4a5a-82d1-51d38507fddd
Dec 16, 2025
Merged
Fix Credentials support in DepositPreAuth, AccountDelete, Payment, EscrowFinish, PaymentChannelClaim #1234
Changes from all commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
e09638e
Initial plan
Copilot 80e4764
Implement XLS-70 CredentialIDs and DepositPreauth credentials support
Copilot 45f7edb
Fix DepositPreauth credentials display by adding parser for nested st…
Copilot 21f8349
Fix parser to handle both nested and flat credential structures, use …
Copilot be82a21
copilot-setup-steps
mvadari 45142b3
Fix linting, TypeScript, and test failures
Copilot 2ce9473
fix extraneous typing in accountdelete
achowdhry-ripple 6f0ee1e
cleanup, formatting, tested'
achowdhry-ripple d6a45ab
lock sync
achowdhry-ripple ecda0b9
transalations null
achowdhry-ripple b23fb1f
lint
achowdhry-ripple b48e726
typescript check
achowdhry-ripple 17e6044
Add unit tests for Payment and EscrowFinish CredentialIDs support
Copilot c863f9a
Fix linting issues in test files
Copilot 7f9c5b6
Remove inline styles and add PaymentChannelClaim CredentialIDs test
Copilot 3366662
Merge branch 'staging' into copilot/fix-bee91805-20d7-4a5a-82d1-51d38…
achowdhry-ripple abf6e8a
Add unit tests for DepositPreauth TableDetail component
Copilot 7331a7a
revert package and package lock
achowdhry-ripple 40f06bb
fix desc for depositpreauth
achowdhry-ripple 9261c43
fix SimpleGroup display
pdp2121 64d3a99
Merge branch 'copilot/fix-bee91805-20d7-4a5a-82d1-51d38507fddd' of ht…
pdp2121 40146ce
translations
achowdhry-ripple 851c3c2
fix payment
achowdhry-ripple 6e2ce73
fix SimpleGroups for Unauthorize
pdp2121 cc4e2bf
Merge branch 'copilot/fix-bee91805-20d7-4a5a-82d1-51d38507fddd' of ht…
pdp2121 dc06b62
fix tests
pdp2121 a1f12f4
fix tests
achowdhry-ripple File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| name: Copilot Setup Steps | ||
|
|
||
| env: | ||
| NODE_VERSION: 22.x | ||
| VITE_VALIDATOR: vl.ripple.com | ||
| VITE_RIPPLED_WS_PORT: 51233 | ||
| VITE_RIPPLED_HOST: fake.rippled.example.com | ||
| VITE_MAINNET_LINK: mainnet.example.com | ||
| VITE_TESTNET_LINK: testnet.example.com | ||
| VITE_CUSTOMNETWORK_LINK: custom.example.com | ||
| VITE_DATA_URL: https://data.xrpl.org/v1/network | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| push: | ||
| branches: [main] | ||
| pull_request: | ||
| branches: [main] | ||
|
|
||
| jobs: | ||
| copilot-setup: | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Use Node.js ${{ env.NODE_VERSION }} | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: ${{ env.NODE_VERSION }} | ||
|
|
||
| - name: Cache node modules | ||
| id: cache-nodemodules | ||
| uses: actions/cache@v4 | ||
| env: | ||
| cache-name: cache-node-modules | ||
| with: | ||
| # caching node_modules | ||
| path: node_modules | ||
| key: ${{ env.NODE_VERSION }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} | ||
| restore-keys: | | ||
| ${{ env.NODE_VERSION }}-build-${{ env.cache-name }}- | ||
| ${{ env.NODE_VERSION }}-build- | ||
|
|
||
| - name: Install Dependencies | ||
| if: steps.cache-nodemodules.outputs.cache-hit != 'true' | ||
| run: npm ci | ||
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
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
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
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
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
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
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
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
39 changes: 31 additions & 8 deletions
39
src/containers/shared/components/Transaction/AccountDelete/test/AccountDeleteSimple.test.tsx
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,28 +1,51 @@ | ||
| import i18n from '../../../../../../i18n/testConfigEnglish' | ||
|
|
||
| import { createSimpleWrapperFactory } from '../../test/createWrapperFactory' | ||
| import { | ||
| createSimpleWrapperFactory, | ||
| expectSimpleRowText, | ||
| expectSimpleRowLabel, | ||
| } from '../../test' | ||
| import { Simple } from '../Simple' | ||
| import mockAccountDelete from './mock_data/AccountDelete.json' | ||
| import mockAccountDeleteWithDestinationTag from './mock_data/AccountDeleteWithDestinationTag.json' | ||
| import mockAccountDeleteWithCredentialIDs from './mock_data/AccountDeleteWithCredentialIDs.json' | ||
|
|
||
| const createWrapper = createSimpleWrapperFactory(Simple, i18n) | ||
| const createWrapper = createSimpleWrapperFactory(Simple) | ||
|
|
||
| describe('AccountDelete: Simple', () => { | ||
| it('renders', () => { | ||
| const wrapper = createWrapper(mockAccountDelete) | ||
| expect(wrapper.find('.label')).toHaveText('destination') | ||
| expect(wrapper.find('.value')).toHaveText( | ||
| expectSimpleRowText( | ||
| wrapper, | ||
| 'destination', | ||
| 'raT74sdzpxJUaubcBAQNS8aLqFMU85Rr5J', | ||
| ) | ||
| wrapper.unmount() | ||
| }) | ||
|
|
||
| it('renders with destination tag', () => { | ||
| const wrapper = createWrapper(mockAccountDeleteWithDestinationTag) | ||
| expect(wrapper.find('.label')).toHaveText('destination') | ||
| expect(wrapper.find('.value')).toHaveText( | ||
| expectSimpleRowText( | ||
| wrapper, | ||
| 'destination', | ||
| 'rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn:123123', | ||
| ) | ||
| wrapper.unmount() | ||
| }) | ||
|
|
||
| it('renders with CredentialIDs', () => { | ||
| const wrapper = createWrapper(mockAccountDeleteWithCredentialIDs) | ||
|
|
||
| expectSimpleRowText( | ||
| wrapper, | ||
| 'destination', | ||
| 'raT74sdzpxJUaubcBAQNS8aLqFMU85Rr5J', | ||
| ) | ||
| expectSimpleRowText( | ||
| wrapper, | ||
| 'credential-id-0', | ||
| '7B685088D546B9E8905D26206F452BB2F44D9A33C9BD9BCF280F7BA39015A955', | ||
| ) | ||
| expectSimpleRowLabel(wrapper, 'credential-id-0', 'credential_ids') | ||
|
|
||
| wrapper.unmount() | ||
| }) | ||
| }) |
62 changes: 62 additions & 0 deletions
62
...d/components/Transaction/AccountDelete/test/mock_data/AccountDeleteWithCredentialIDs.json
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,62 @@ | ||
| { | ||
| "tx": { | ||
| "Account": "raf19Ns8czi85kTfia3KJ9ndjSp9baTLyH", | ||
| "Destination": "raT74sdzpxJUaubcBAQNS8aLqFMU85Rr5J", | ||
| "CredentialIDs": ["7B685088D546B9E8905D26206F452BB2F44D9A33C9BD9BCF280F7BA39015A955"], | ||
| "Fee": "5000000", | ||
| "Flags": 2147483648, | ||
| "Sequence": 58118671, | ||
| "SigningPubKey": "0211DA2A9AEF04FB772776CD35291AF20DC09A6F0EF52C1A58E4ED43C8685D7093", | ||
| "TransactionType": "AccountDelete", | ||
| "TxnSignature": "304402202E61AC4B56BFFD2186D3E9BDECE7B68CD21B9486F691C5B31AA0E84E161E2C1C022048B70011A1D04566883EFEC3E988C31A853B89D18E0159315EF488DE89F7BA8B" | ||
| }, | ||
| "meta": { | ||
| "AffectedNodes": [ | ||
| { | ||
| "DeletedNode": { | ||
| "FinalFields": { | ||
| "Account": "raf19Ns8czi85kTfia3KJ9ndjSp9baTLyH", | ||
| "Balance": "0", | ||
| "Flags": 0, | ||
| "MessageKey": "020000000000000000000000007C50654DCAE0020232ABB4C236F7CE03CF2784B0", | ||
| "OwnerCount": 0, | ||
| "PreviousTxnID": "9A0AD95BA92118D66BDB3DCF86575BAEBE34D3F640146BD5A68D4AC355E56A21", | ||
| "PreviousTxnLgrSeq": 58233607, | ||
| "Sequence": 58118672 | ||
| }, | ||
| "LedgerEntryType": "AccountRoot", | ||
| "LedgerIndex": "1F8BBAE9AD8533D18C1A2DD03E22232D49A28CCF2383D80CEE50735E82900068", | ||
| "PreviousFields": { | ||
| "Balance": "19999988", | ||
| "Sequence": 58118671 | ||
| } | ||
| } | ||
| }, | ||
| { | ||
| "ModifiedNode": { | ||
| "FinalFields": { | ||
| "Account": "raT74sdzpxJUaubcBAQNS8aLqFMU85Rr5J", | ||
| "Balance": "11468518495", | ||
| "Flags": 0, | ||
| "OwnerCount": 0, | ||
| "Sequence": 58233435 | ||
| }, | ||
| "LedgerEntryType": "AccountRoot", | ||
| "LedgerIndex": "40D5C5FF088C4BC3CA79974DCB585DDD04E9D88FF732AE6E7E36F0FF1CDD4220", | ||
| "PreviousFields": { | ||
| "Balance": "11453518507" | ||
| }, | ||
| "PreviousTxnID": "9A0AD95BA92118D66BDB3DCF86575BAEBE34D3F640146BD5A68D4AC355E56A21", | ||
| "PreviousTxnLgrSeq": 58233607 | ||
| } | ||
| } | ||
| ], | ||
| "DeliveredAmount": "14999988", | ||
| "TransactionIndex": 34, | ||
| "TransactionResult": "tesSUCCESS", | ||
| "delivered_amount": "14999988" | ||
| }, | ||
| "hash": "91BCF2965F7381EC01EDA6A36948A23480B566A0DDD3B13610ED8FD59840956D", | ||
| "ledger_index": 58233707, | ||
| "date": "2020-09-16T23:18:20Z" | ||
| } |
28 changes: 28 additions & 0 deletions
28
src/containers/shared/components/Transaction/CredentialIDs.tsx
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| import { useTranslation } from 'react-i18next' | ||
| import { SimpleRow } from './SimpleRow' | ||
|
|
||
| interface CredentialIDsProps { | ||
| credentialIDs: string[] | ||
| } | ||
|
|
||
| export const CredentialIDs = ({ credentialIDs }: CredentialIDsProps) => { | ||
| const { t } = useTranslation() | ||
|
|
||
| if (!credentialIDs || credentialIDs.length === 0) { | ||
| return null | ||
| } | ||
|
|
||
| return ( | ||
| <> | ||
| {credentialIDs.map((id, index) => ( | ||
| <SimpleRow | ||
| key={id} | ||
| label={index === 0 ? t('credential_ids') : ''} | ||
| data-testid={`credential-id-${index}`} | ||
| > | ||
| {id} | ||
| </SimpleRow> | ||
| ))} | ||
| </> | ||
| ) | ||
| } |
Oops, something went wrong.
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.
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.
thoughts on keeping this file? not sure if we actually plan to use copilot going forward cc @mvadari
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.
Up to you guys, feel free to remove
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.
@pdp2121 @Patel-Raj11 @ckeshava thoughts? Personally leaning towards removing this since none of us have access yet and the team hasn't agreed on using this going forward
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.
what is the purpose of this file? I do not observe any co-pilot specific Github Actions steps here.
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.
It's telling Copilot how to set up a dev environment to run stuff for the explorer