Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions packages/xrpl/HISTORY.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ Subscribe to [the **xrpl-announce** mailing list](https://groups.google.com/g/xr

## Unreleased

### Fixed
* Fix `AccountRoot` ledger object to correctly parse `FirstNFTokenSequence` field.

## 4.3.0 (2025-6-09)

### Added
Expand Down
2 changes: 1 addition & 1 deletion packages/xrpl/src/models/ledger/AccountRoot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export default interface AccountRoot extends BaseLedgerEntry, HasPreviousTxnID {
/** Total NFTokens this account's issued that have been burned. This number is always equal or less than MintedNFTokens. */
BurnedNFTokens?: number
/** The sequence that the account first minted an NFToken */
FirstNFTSequence: number
FirstNFTokenSequence?: number
/** Total NFTokens have been minted by and on behalf of this account. */
MintedNFTokens?: number
/** Another account that can mint NFTokens on behalf of this account. */
Expand Down
23 changes: 23 additions & 0 deletions packages/xrpl/test/integration/transactions/nftokenMint.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { assert } from 'chai'

import {
AccountInfoRequest,
convertStringToHex,
getNFTokenID,
NFTokenMint,
Expand Down Expand Up @@ -48,6 +49,8 @@ describe('NFTokenMint', function () {
)
assert.equal(response.type, 'response')

const mintTransactionSeq = response.result.tx_json.Sequence

const txRequest: TxRequest = {
command: 'tx',
transaction: hashSignedTx(response.result.tx_blob),
Expand Down Expand Up @@ -93,6 +96,26 @@ describe('NFTokenMint', function () {
getNFTokenID(binaryTxResponse.result.meta_blob) ?? 'undefined',
`getNFTokenID produced a different outcome when decoding the metadata in binary format.`,
)

// Check if AccountRoot ledger object reflects minted token
const accountInfoRequest: AccountInfoRequest = {
command: 'account_info',
account: testContext.wallet.address,
ledger_index: 'validated',
}
const accountInfoResponse = await testContext.client.request(
accountInfoRequest,
)
assert.equal(
accountInfoResponse.result.account_data.FirstNFTokenSequence,
mintTransactionSeq,
`FirstNFTokenSequence is not same as NFTokenMint's transaction sequence.`,
)
assert.equal(
accountInfoResponse.result.account_data.MintedNFTokens,
1,
`MintedNFTokens is not 1.`,
)
},
TIMEOUT,
)
Expand Down
Loading