mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-11-20 12:15:51 +00:00
Update getNFTokenID to properly handle binary blob (#2247)
* Update NFTokenMint test * Ensure the binary version works as well * Remove meta being undefined in txResponse * Remove error test * Re-add test, error, and lint * Add meta to test, and add string to allowed type * Re-add meta being undefined with proper docs
This commit is contained in:
@@ -19,10 +19,11 @@ async function getTransaction(): Promise<void> {
|
||||
})
|
||||
console.log(tx)
|
||||
|
||||
// The meta field would be a string(hex) when the `binary` parameter is `true` for the `tx` request.
|
||||
// The meta field can be undefined if the transaction has not been validated yet (and so has not changed the ledger).
|
||||
if (tx.result.meta == null) {
|
||||
throw new Error('meta not included in the response')
|
||||
}
|
||||
|
||||
/*
|
||||
* delivered_amount is the amount actually received by the destination account.
|
||||
* Use this field to determine how much was delivered, regardless of whether the transaction is a partial payment.
|
||||
|
||||
Reference in New Issue
Block a user